Resize an image or a video
resize_creativeResize an image or a video for a platform, an aspect ratio or, for an image, an exact pixel size the Rawa way, not by a crop, a stretch or a letterbox of your own. An image is re-framed generatively: the scene extends into the new shape and the subject, the text and the brand stay intact, delivered at exactly its pixels. A plain clip (an upload, a generated clip or an edit) is cut to each shape, its footage cropped shot by shot on what matters in each; a portrait clip going to a landscape shape has its footage extended by AI into the new width instead, at the same price. A Motion ad is re-laid out on each shape by Rawa's designer, keeping its layers and animation, and takes only 1:1, 4:5, 9:16 or 16:9. Use this whenever the user wants an image or a video resized, adapted or fitted to Snapchat, Google Ads, Stories, a feed, a banner, any ratio or any size; do not resize the pixels yourself. Name platforms, shapes, sizes or a mix; every canvas comes back as its own finished creative in the brand's library, and a shape the video already has is skipped. For an image, a placement makes each canvas that platform takes at its exact size (snapchat_ad is 1080x1920); an aspect ratio makes that shape at 2048 px on the long edge; a size makes exactly those pixels. Canvases are merged only when their pixels are the same, so naming 9:16 and snapchat_ad makes two canvases, 1152x2048 and 1080x1920: when the user names a platform, pass the placement alone. A video takes shapes and placements, not sizes or a format. The source is a creative of the brand (creativeId) or an image on the web (imageUrl: a direct, public URL to a JPEG, PNG or WebP file). An image the user pasted or attached in the chat has no such URL and you cannot read it yourself: call request_image_upload right away (do not ask them to re-attach it), and once the image has landed use its creativeId here. An image you hold as a file on your own filesystem (a coding agent in a project) goes through upload_image_file instead. A linked image is added to the brand's library first and its creativeId is returned as sourceCreativeId; an image the library already holds is not added again, and sourceCreativeId is that creative, with alreadyInLibrary: true. Reuse sourceCreativeId for any further work on the same image instead of passing imageUrl again. A video is resized only from the library, by its creativeId. Cost: An image costs 30 credits per canvas up to 4.2 MP (every placement canvas, and every aspect ratio at its default size), 50 credits per canvas above that. A clip costs per shape by its length: 564 credits for 6 s, 1410 credits for 15 s, 2820 credits for 30 s, less below 1080p. A Motion ad costs a Motion redo per shape, 40 credits a second: 240 at 6 s, 600 at 15 s, 1200 at 30 s. At most 6 canvases per call; the dry run quotes the exact price. Call with dryRun: true first and tell the user the cost. Once they agree, pass the quoted credits as expectedCredits; a call that would cost a different amount is refused. Give each new generation a new requestId, and repeat it unchanged only on a retry: a retry within 2 minutes returns the first result and is not charged again. Without a requestId, the same arguments within 2 minutes count as a retry. Needs generation allowed over MCP (see get_workspace); a dry run still quotes when it is not, and says why the call would be refused in wouldRefuse. Returns a jobId (for a Motion ad, jobs: one jobId per shape), creditsCharged and creditsRemaining; ready in 1 to 5 minutes, a clip longer. If a job panel shows, it tracks the work: do not poll, end your turn with one line saying it is under way, and later use show_creatives with the creativeIds you are told. Otherwise call wait_for_jobs with the jobIds until allFinal is true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sizes | No | Exact pixel sizes to deliver, when the user names pixels (1080x1920). Each side 100 to 3840 px, at most 3:1 and 8.3 MP. | |
| dryRun | No | true: return the exact cost (credits, breakdown, balanceAfter) without charging or starting anything, and wouldRefuse when the organization's spending controls would refuse the real call. | |
| format | No | The file type of every canvas: png (the default) or jpeg, a much smaller file with no transparency. Use jpeg when the user asks for it or the platform caps the file size. | |
| brandId | No | A brand id from get_workspace or list_brands, or the brand's name. Omit it when the organization has a single brand. | |
| imageUrl | No | A direct, publicly reachable https URL of the image to work on, when it is not in the library yet. | |
| requestId | No | Your own unique id for this request. Use a new one for every new request, even with the same arguments. Repeat it unchanged only to retry this exact call within 2 minutes; the retry returns the first result. | |
| creativeId | No | A creative id from list_creatives, search_library, get_job or get_upload. | |
| placements | No | Platforms to produce every canvas of, each at its exact size; "Google Ads" is google_display, "Snapchat" is snapchat_ad (or snapchat for a Story). instagram_feed: Instagram / Facebook feed at 1080x1080, 1080x1350; instagram_story: Instagram / Facebook Stories at 1080x1920; instagram_story_ad: Instagram / Facebook Stories ad at 1080x1920; instagram_reels: Instagram Reels at 1080x1920; instagram_reels_ad: Instagram Reels ad at 1080x1920; tiktok_organic: TikTok (organic) at 1080x1920; tiktok_ad: TikTok in-feed ad at 1080x1920; snapchat: Snapchat Story at 1080x1920; snapchat_ad: Snapchat Snap Ad at 1080x1920; linkedin_feed: LinkedIn feed / sponsored (static) at 1200x1200, 1200x1500, 1200x628; linkedin_video: LinkedIn feed (video) at 1080x1920; linkedin_video_ad: LinkedIn sponsored (video) at 1080x1920; google_display: Google Display (responsive) at 1200x1200, 1200x628; youtube_instream: YouTube in-stream at 1920x1080; youtube_shorts: YouTube Shorts at 1080x1920; youtube_shorts_ad: YouTube Shorts ad at 1080x1920. | |
| aspectRatios | No | Shapes to produce at 2048 px on the long edge, by name or ratio ("9:16"). Only when the user names a shape and no platform or size. | |
| expectedCredits | No | The credits the dryRun quoted and the user agreed to. The call is refused if it would cost a different amount. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||