{"uid":"cap_ngJN3PzLDtUFmla4MUhYs","slug":"relaystation-image-canvas-extend-2b9b4f71","name":"Relaystation Image Canvas Extend","description":"$0.0003/MP. Pad or extend an image's canvas on any side — aspect-ratio fixes without cropping. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny","url":"https://api.relaystation.ai/v1/image/extend","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","bodyType","body"],"properties":{"body":{"type":"object","properties":{"top":{"type":"integer","maximum":10000,"minimum":0},"file":{"type":"object","description":"cputools input-source: { inline: <base64 ≤ 4 MiB> } or { inputKey: <scratch key from /v1/cputools/upload-url, ≤ 50 MB> }."},"left":{"type":"integer","maximum":10000,"minimum":0},"right":{"type":"integer","maximum":10000,"minimum":0},"bottom":{"type":"integer","maximum":10000,"minimum":0},"background":{"oneOf":[{"type":"string","maxLength":32,"description":"A hex color string (\"#rrggbb\")."},{"type":"object","required":["r","g","b"],"properties":{"b":{"type":"integer","maximum":255,"minimum":0},"g":{"type":"integer","maximum":255,"minimum":0},"r":{"type":"integer","maximum":255,"minimum":0},"alpha":{"type":"number","maximum":1,"minimum":0}}}]},"extendWith":{"enum":["background","copy","repeat","mirror"],"type":"string"}}},"type":{"type":"string","const":"http"},"method":{"enum":["POST","PUT","PATCH"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":{"request":{"input":{"body":{"top":50,"file":{"inline":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="},"left":50,"right":50,"bottom":50,"background":"#FFFFFF","extendWith":"background"},"type":"http","method":"POST","bodyType":"json"},"output":{"type":"image"}},"response":{"output":{"inline":"iVBORw0KGgoAAAANSUhEUgAAAGUAAABlCAYAAABUfC3PAAAACXBIWXMAAAsTAAALEwEAmpwYAAABBklEQVR4nO3RAQnAAAzAsDm/9F3ABbyMREGhs+TM3wF8mRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEnZkyO88ecWbKJaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaYEmRJkSpApQaZszwt+/sthVOENlgAAAABJRU5ErkJggg==","filename":"extended.png","sizeBytes":340,"contentType":"image/png"}}},"exampleRequest":{"top":50,"file":{"inline":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="},"left":50,"right":50,"bottom":50,"background":"#FFFFFF","extendWith":"background"},"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_cFF1buVaHkaiK0PK3U7i5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extends an image's canvas on any side (top, bottom, left, right) by a specified number of pixels, filling the new area with a background color, copy, repeat, or mirror of the original.","exampleAgentPrompt":"Take this product photo and extend the canvas by 100 pixels on each side, filling the new space with a plain white background (#FFFFFF) so I have breathing room around the image.","exampleUseCases":[{"title":"Square canvas for social media post","prompt":"I have a landscape photo and need it square for Instagram — extend the top and bottom by 200 pixels each and fill the new area with a white background."},{"title":"Banner letterbox with mirrored edges","prompt":"Extend this banner image 150 pixels on the left and right using a mirror fill so the edges blend naturally into the new wider canvas."},{"title":"Slide header space addition","prompt":"I need 80 pixels of solid dark background (#1A1A1A) added to the top of this image so I can put a title text overlay there without covering any of the original photo."}],"resultDescription":"A PNG image (returned as base64 inline or a scratch key) with the canvas extended by the specified pixel amounts on each requested side. The response includes the filename (e.g. 'extended.png'), MIME content type ('image/png'), and the size in bytes.","failureModes":["Image file too large (>50 MB via inputKey or >4 MiB inline base64) returns an error","Invalid or malformed base64 input returns a parsing error","Padding values outside allowed range (0–10000 px) return a validation error","Unsupported extendWith enum value returns a bad request error","Invalid hex color or out-of-range RGBA values return a validation error","Missing required 'file' field returns a 400 bad request"],"whenToPreferThis":"Choose this endpoint when you need to add canvas space around an existing image without cropping or altering the original content — for aspect ratio normalization, adding title space, creating uniform borders, or fitting images to a specific canvas size. Prefer over crop-based resizing when preserving the full original image is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:51:15.776Z","isFirstParty":false}