Reference · Image models
POST/images/qwen-image-edit
Qwen Image Edit
Qwen Image Edit — Edits a single source image
- Shapes: 16:9, 9:16, 1:1
- Reference pictures: up to 1 (at least one: it edits a picture)
- Words: up to 2,000 characters
- Price: 4 credits a picture
Pick it for: Changing one picture the way you say. Skip it if: You want to combine several pictures: it takes one.
The same run as POST /api/v1/images with "model": "qwen-image-edit": the same price, the same job. Price it first at /api/v1/images/qwen-image-edit/quote.
- Key needs
create· Make things and spend credits- Price it first
POST /images/qwen-image-edit/quote· free- Answers
- What it made, at once
Request
curl -X POST https://vessero.com/api/v1/images/qwen-image-edit \ -H "Authorization: Bearer $VESSERO_API_KEY" \ -H "Idempotency-Key: 47f8f6f5-ea00-4fb1-925f-76aac956a0ec" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A linen shirt on a wooden hanger by a window, soft morning light", "aspectRatio": "1:1", "referenceKeys": [ "https://example.com/products/linen-shirt.jpg" ], "confirmCredits": 4 }'
Response200 OK
{ "status": "done", "pictures": [ { "id": "9897acf1-abd2-470c-b0b6-7c0002ff3805", "url": "https://vessero.com/f/hSnRITVg9pUShOfHWU0DbIAn", "madeWith": "Nano Banana Pro · 4K", "useAs": { "kind": "library", "source": "studio", "id": "9897acf1-abd2-470c-b0b6-7c0002ff3805" } } ], "credits": 12 }
POST/images/qwen-image-edit/quoteFree
The same body without confirmCredits. It answers the price and your balance, and runs nothing.
Header
- Idempotency-KeystringYour id for this request: 8–64 letters, digits, - or _. A repeat within 10 minutes gets the first answer back and never runs twice. Use the same one for the quote and the run.
- Preferstring
wait=N(up to 60): hold the answer up to N seconds while the job is made, within 80 seconds for the whole call.
Body
- promptstringrequiredWhat the picture shows, e.g. "A linen shirt on a wooden hanger by a window, soft morning light".
- aspectRatiostringA shape the model lists (its aspectRatios), e.g. "16:9". Default: the model’s own.
16:99:161:1 - referenceKeysstring[] · up to 1requiredPictures to work from, up to the model’s maxPictures. A model that needs a picture (needsPicture) makes nothing without one.
- referenceNames(string | null)[] · up to 16What the words call each picture in referenceKeys, in the same order, as its tile does: its @name, such as "@vera", or null for one with no name, which the words call by its place (@Image2). Each name goes to the model as the picture it calls. Never moves the price. A picture’s @name is the atName GET /api/v1/library and POST /api/v1/library/use give.
- negativePromptstringWhat to leave out of the picture, for a model that takes it (takesNegativePrompt).
- pageobjectA long page, for a model from studio "product-pages" only (it needs one): a product page or a web page as one tall picture, its width the size’s and its height what the page needs.
- kindstringrequired"product": a page about the product, from one to three pictures of it in referenceKeys. "web": a site’s design from the words, with no referenceKeys.
productweb - lengthstringA product page’s length: "short" (about 2–5 sections), "medium" (6–10) or "long" (11–18). It sets the price. Default: medium. A web page has one length.
shortmediumlong - styleKeystringA web page’s look, the picture whose style it takes: a storage key from POST /api/v1/files or POST /api/v1/library/use, or an https link to the file (brought into their Uploads first). The words call it @style. Optional.
- subjectKeystringA web page’s subject, the picture of what it keeps, such as the product: a storage key from POST /api/v1/files or POST /api/v1/library/use, or an https link to the file (brought into their Uploads first). The words call it @subject. Optional.
- styleNamestring | nullWhat the words call the look’s picture, its @name, if not @style.
- subjectNamestring | nullWhat the words call the subject’s picture, its @name, if not @subject.
- kindstringrequired"product": a page about the product, from one to three pictures of it in referenceKeys. "web": a site’s design from the words, with no referenceKeys.
- confirmCreditsintegerrequiredThe price you agree to, in credits: the
creditsits quote gave. It runs at that price, or at a lower one when that figure was quoted for this Idempotency-Key; above the price now, nothing runs (409price_changed). Left out, nothing runs and the error carries the quote. - webhookUrlstring · httpsAn https address to POST the job to once it is done or has failed — or waits for a yes, as a UGC ad made step by step does once its previews are in — signed (see Webhooks).
Answers
- 200madeMade: the pictures, each with its link (good for about 7 days) and its id.
- 400confirm_credits_requiredA run that spends needs confirmCredits: the quote is in details.
- 402insufficient_creditsThe account has too few credits for this.
- 409price_changedThe price is above the confirmCredits sent: nothing ran; the new quote is in details.
- 422content_refusedThe content check refused it.
- 429daily_cap_reachedThe key’s daily credit cap would be passed: see Retry-After.