edit_image

Edit one image, or compose 2–10 into one, from a text instruction (1 input = revise, 2 or more = compose): background swaps, style transfer, object add/remove, composites.

writeSellerSheet

Returns a job receipt — poll check_image_job until status is 'done', then read cdn_url and revised_prompt (the drift signal). Priced per delivered image (credits_quote gives the number; HTTP 402 with error_code insufficient_credits when the balance is short — top up at sellersheetai.com/billing); a failure is refunded.

Call it

In an AI client (MCP)

tools/call
{
  "name": "edit_image",
  "arguments": {
    "store": "myStore-US",
    "prompt": "<prompt>",
    "image_sources": []
  }
}

From code (Tool API)

curl -X POST https://api.sellersheetai.com/api/v1/tools/edit_image \
  -H "Authorization: Bearer $SELLERSHEET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"store":"myStore-US","prompt":"<prompt>","image_sources":[]}'
Early access — the Tool API is open on request, contact us.

Arguments

NameTypeDescription
promptrequiredstringthe edit or composition instruction; for a restyle, the adapted json_prompt from reverse_prompt, stringified. Restate the preserve-list every turn ("change only X; keep geometry, branding, text and camera identical") and index several inputs ("Image 1 = master, Image 2 = colour reference only").
image_sourcesrequiredobject[]1–10 sources — a public URL (a Drive link must be shared 'anyone with the link') or base64; for a refinement turn, the previous turn's cdn_url.
providerstring'openai' (default; up to 10 inputs + mask) | 'nanobanana' (first image only; priced at its ~1K canvas) | 'both'.Default: "openai"
sizestring'2048x2048' (default; best for Amazon zoom) | '1536x1536' | '1024x1024' | '1024x1536' | '1536x1024'.Default: "2048x2048"
qualitystring'low' | 'medium' | 'high' (default).Default: "high"
mask_sourcestringoptional PNG mask (transparent = edit area). Applied as a real mask only when the user's model route has a mask-capable model (get_user_context data.credits.routes[key = data.credits.route].answers.image_mask non-null); otherwise the server describes the painted box in the instruction and runs the edit unmasked (check_image_job's data.mask = 'described' — check the result stayed inside the area), and a route that cannot edit at all is refused before billing. For exact masked edits switch route on Billing & Credits.
output_formatstring'png' | 'jpeg' | 'webp'; omit and the server decides (currently jpeg).
synthetic_performerbooleanAmazon's contains-synthetic-performer disclosure (XMP metadata in the upload); omit and the server infers it from the prompt; true or false overrides. set_synthetic_performer toggles it later without regenerating.
storestringthe store ref `<store>-<CC>` (name-country, e.g. 'myStore-US') — one of get_user_context's store_refs, verbatim. Required.
parent_skustringthe family SKU; defaults to sku.
skustringthe child SKU. Required.
slotstringthe Image Library slot: 's0'–'s8' (PDP) or 'a1'–'a5' / 'p1'–'p5' (A+). Required.
filename_prefixstringupload filename prefix.Default: "edited"

Result

Every tool answers {notification, data, human_action}; data carries:

  • data.job_id — the receipt — poll check_image_job.

Gotchas

  • store, sku and slot are required — a call missing one is refused (400) before anything is charged. A single edit takes ~60–120 s (openai) or ~10–30 s (nanobanana), a compose 2–5 minutes. Never resubmit a 'processing' job (a resubmit is a new, billed job); re-run only on status 'error'.

On this page

Actions

View as Markdown

Ask an assistant

Ask ChatGPTAsk Claude