Save an image and use it
Goal. An image exists outside Gavana: the person pasted it, ChatGPT just made it, it sits at a public URL, or it is a product on a shop page. Make it a real node on a canvas with a handle other tools accept, then use it.
Tools used. canvas_create (or canvas_list), save_image_to_canvas, get_canvas_image to verify, and then generate_image_in_canvas or generate_video if the person asked for new work.
Requires. A full-access connection. Saving a single image needs canvas:read, canvas:write, asset:read, and image:generate. Importing a product page needs canvas:read, canvas:write, and asset:read.
Saving costs nothing. save_image_to_canvas never generates or edits. The generation steps in What the handle unlocks are paid.
You finish holding. A node: handle per image and the task’s canvas: handle — exactly what generation takes as a reference or a source, and what generate_video takes as a firstFrame.
A single-image save needs image:generate even though it generates nothing. That permission governs writing image bytes into Gavana storage. A connection with canvas:write but no image:generate gets insufficient_scope here.
The sequence
Choose the task’s canvas
Every save names a destination; there is no shared default canvas.
- The image belongs with existing work: take the canvas handle from
canvas_list, or use the one the person points at. - New work: create the task canvas once and keep its handle for everything after.
{
"name": "canvas_create",
"arguments": { "title": "Hero images — spring launch", "idempotencyKey": "spring-hero-canvas-2026-10-05" }
}If you will use this image as a video first frame, save it to the same canvas you will pass as the video’s destination.
Save it
Name exactly one source. With a file the client hands to the tool — the preferred path when the client has one:
{
"name": "save_image_to_canvas",
"arguments": {
"image": {
"download_url": "https://…client-file-url…",
"file_id": "file-abc123",
"mime_type": "image/png",
"file_name": "hero-draft.png"
},
"destination": "canvas:abc123:spring-hero",
"title": "Hero draft — warm editorial",
"idempotencyKey": "hero-draft-2026-10-05-01"
}
}With a public HTTPS URL:
{
"name": "save_image_to_canvas",
"arguments": {
"imageUrl": "https://example.com/hero-draft.png",
"destination": "canvas:abc123:spring-hero",
"title": "Hero draft — warm editorial",
"idempotencyKey": "hero-draft-2026-10-05-01"
}
}With an image already uploaded to Gavana — for example by running gavana asset upload path/to/image.png on the person’s machine when the client cannot hand over the file:
{
"name": "save_image_to_canvas",
"arguments": {
"assetId": "asset:q8r2t6",
"destination": "canvas:abc123:spring-hero",
"title": "Product cut-out",
"background": "transparent",
"idempotencyKey": "product-cutout-2026-10-05-01"
}
}Set background: "transparent" whenever the person asked for a removed background: Gavana then refuses an image without real alpha pixels instead of saving an opaque or checkerboard one.
Set title to something meaningful; it defaults to Saved image. You may pass x and y (each −100,000 to 100,000), or let Gavana place the node.
Check: the response gives you a node: handle and the resolved canvas. Keep both.
Never reduce a picture the person gave you to a description in a prompt. If the client cannot hand Gavana the file and you cannot upload it, say so and ask the person to add it to the canvas.
Or import a product page
When the person names a product by its page, the page is a source, never prompt text:
{
"name": "save_image_to_canvas",
"arguments": {
"productPageUrl": "https://shop.example.com/products/canvas-tote",
"destination": "canvas:abc123:spring-hero",
"idempotencyKey": "tote-import-2026-10-05-01"
}
}Gavana imports the page’s verified gallery images into one Product References Section and returns their node handles with previews, the first few inline. Look at them before using them: an image count is not visual inspection.
If the page offers several variants, or the pictures cannot be told apart from the shop’s own graphics, the result is review_required, it lists the valid selectors or the rejected candidates, and nothing is written. Answer with one variantSelector exactly as the page spells it, or with the exact imageUrls of the product photographs (up to 12) — not both. Until an import succeeds, do not generate that product: a prompt alone draws a lookalike.
Confirm it is really there
Pull the picture back:
{
"name": "get_canvas_image",
"arguments": { "canvasId": "canvas:abc123:spring-hero", "nodeId": "node:img8q4" }
}That returns an inline preview the model can inspect. A 409 here means the node exists but has no stored result — do not treat the save as complete.
Finish with a link
Give the person the canvas url from canvas_create or canvas_get:
Saved as
node:img8q4oncanvas:abc123:spring-hero, titled “Hero draft — warm editorial”. Confirmed with stored image content. See it here:https://app.gavana.ai/…
What the handle unlocks
Everything below starts paid work. Do it only when the person asked for it in this conversation, and never retry a failed call on your own.
As a reference for new images. Pass each handle with the role it plays: identity for what must stay exact, construction, texture, fit, or style for what to borrow. Different scenes go in items, one per output, and every stated aspect ratio is passed explicitly:
{
"name": "generate_image_in_canvas",
"arguments": {
"destination": "canvas:abc123:spring-hero",
"idempotencyKey": "tote-scenes-2026-10-05-01",
"references": [{ "handle": "node:tote1a", "role": "identity" }],
"items": [
{ "prompt": "The tote on a sunlit café table", "aspectRatio": "4:5", "label": "Café" },
{ "prompt": "The tote over a shoulder on a city street", "aspectRatio": "4:5", "label": "Street" }
]
}
}As the image being edited. Pass it as source with operation: "edit". Gavana sends it to the model first and creates a new output; the original stays:
{
"name": "generate_image_in_canvas",
"arguments": {
"operation": "edit",
"source": "node:img8q4",
"prompt": "Same shot, background changed to a pale blue studio sweep",
"preserve": ["the product, its label and its shadow"],
"destination": "canvas:abc123:spring-hero",
"idempotencyKey": "hero-blue-edit-2026-10-05-01"
}
}Both return queued progress immediately, with a nextAction naming get_image_run. Report it, then follow it.
As a video first frame. A video cannot start from an image that only exists in a chat. Find the model with model_list (capability: "video.generate.fromImage"), then:
{
"name": "generate_video",
"arguments": {
"model": "model:seedance-2-pro",
"prompt": "Slow push in, warm afternoon light.",
"destination": "canvas:abc123:spring-hero",
"firstFrame": "node:img8q4",
"idempotencyKey": "hero-video-2026-10-05-01"
}
}The destination must be the canvas the node lives on. The finished video comes back as a protected link in the job result; it is not added to the canvas.
Constraints worth knowing before you call
| Constraint | Value |
|---|---|
| Sources | Exactly one of image, imageUrl, assetId, productPageUrl |
imageUrl, productPageUrl scheme | HTTPS only |
| URL length | 4,096 characters maximum |
title | 1–160 characters |
idempotencyKey | 8–200 characters, required |
x, y | −100,000 to 100,000, single images only |
| Source image size | 50 MB |
| Accepted formats | PNG, JPEG, WebP, GIF — verified by sniffing the bytes |
Product imageUrls | 1–12 HTTPS URLs, not combined with variantSelector |
When it fails
| Symptom | Cause | Fix |
|---|---|---|
| Validation error “Name exactly one source…” | No source, or more than one | Send exactly one. |
| Validation error “Agent Canvas is retired…” | destination was agent-canvas | Create a task canvas and pass its handle. |
403 insufficient_scope | On a single save, almost always image:generate | Reconnect with full access. |
review_required, nothing written | The page did not prove the product or variant | Pass the variantSelector or imageUrls it asks for. |
| Refused, nothing written | The URL is unreachable, the file is not a raster image, it is over 50 MB, or a required transparent background has no alpha | Fix the source. Retrying an unreachable URL will not help. |
413 on a later get_canvas_image | The image is large | The node saved fine. Use the full-resolution link. |
Common mistakes
| Mistake | Why it hurts |
|---|---|
| Saving to one canvas and generating on another | The reference or frame is not on that canvas. Keep one canvas per task. |
| Discarding the returned node handle | Everything downstream needs it. |
| Describing a supplied picture in the prompt instead of saving it | The model draws a lookalike. Save it and pass the handle. |
| Pasting a product page URL into an image prompt | Refused. Import the page and use the returned handles. |
| Reusing one idempotency key for several images | One key, one intended payload. |
Assuming canvas:write is enough | image:generate governs writing image bytes. |