Edit an image or combine ordered reference images with Qwen Image 2.1. Use an optional mask for local edits, then retrieve the output when the asynchronous generation completes.
Developer API pricing
Provider: SeeAPI
USD estimate: $0.0037 / credit · Estimated equivalent, not an additional charge.
1K: 5 credits/gen (≈ $0.019/gen)
2K: 10 credits/gen (≈ $0.037/gen)
After submitting a task, use the unified query endpoint to check progress and retrieve results:
Save the generation ID from the submission response. Query task status until completion and read the output image from the successful task result. The initial response is not the finished image.
Manage the secret used to verify generation webhook signatures. Callback URLs are supplied when you create each generation.
Callback URL per generation.
/v1/generationsA new, stable key for each generation request. Reuse it only when retrying the same request body.
order-20260818-001The model ID shown in the selected model's API documentation.
qwen-image-2-1qwen-image-2-1qwen-image-2-1Image to Image. Use the Endpoint ID shown in this model's API documentation.
image-to-imageimage-to-imageimage-to-imageOptional public Provider ID. Omit it to use the Endpoint default Provider (seeapi).
seeapiseeapiseeapiPlace the editing instructions and reference image URLs inside this object.
Provider parameters
seeapiDefault ProviderDescribe what should change and what should remain. For multiple references, refer to the first image, second image and so on, matching the order of input_images.
Change the ceramic mug to deep blue in the white area of the mask. Preserve the handle, lighting and everything outside the edited region.An ordered array of publicly reachable image URLs. Supply 1–10 JPEG, PNG or WebP images, up to 30 MB and 25 megapixels each. Use at most four references when fidelity is the priority.
["https://client.example.com/mug.png"]Optional publicly reachable HTTP(S) URL of a mask for local editing. White areas are edited and black areas are preserved. Supply exactly one input image and use an opaque background.
https://client.example.com/mug-mask.pngChoose the output proportions, or use auto. In mask mode, the output follows the reference image aspect ratio and this parameter is ignored.
auto1:14:33:43:22:316:99:1621:99:21autoChoose the output resolution tier. This setting affects the credits required for the generation.
1K2K1KChoose an opaque or transparent background. Transparent output requires PNG or WebP and cannot be combined with a mask.
opaquetransparentopaqueChoose the output file format. JPEG is only available with an opaque background.
pngwebpjpegpngEnable automatic prompt rewriting for general editing. This setting is ignored when mask_url is supplied.
trueOptional integer seed. Omit it for a random seed; comparisons should use the same model version and generation settings.
Enable the optional content safety check. API requests default to false.
falseAn absolute HTTPS URL that receives the terminal generation Webhook.
https://client.example.com/webhooks/seeapiUnique generation identifier. Use it to query task status and match completion events.
task_xxxqwen-image-2-1image-to-imageseeapiseeapi: SeeAPIseeapiCurrent task status. The submission response reports processing; query the task for its final result.
processingprocessingEstimated public credits. Values can include up to three decimal places.
5Consumed public credits, with up to three decimal places.
0Refunded public credits, with up to three decimal places.
0Time the generation was created.
2026-08-18T10:00:00ZTime the generation record was last updated.
2026-08-18T10:00:00ZWhether this response is an idempotent replay of an earlier request.
falseUnique generation identifier. Use it to query task status and match completion events.
task_xxxqwen-image-2-1image-to-imageseeapiseeapi: SeeAPIseeapiCurrent task status. The submission response reports processing; query the task for its final result.
processingprocessingEstimated public credits. Values can include up to three decimal places.
5Consumed public credits, with up to three decimal places.
0Refunded public credits, with up to three decimal places.
0Time the generation was created.
2026-08-18T10:00:00ZTime the generation record was last updated.
2026-08-18T10:00:00ZWhether this response is an idempotent replay of an earlier request.
falseInvalid JSON or input parameters. Check the parameter values and cross-field requirements before retrying.
Invalid API Key or authentication failed
Insufficient credits
The current request is not allowed
Model, Endpoint, or task not found
Idempotency conflict or the same request is still being created
Request body is too large
Too many requests
Service temporarily unavailable
const response = await fetch("https://api.seeapi.com/v1/generations", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Idempotency-Key": "order-20260818-001",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "qwen-image-2-1",
"endpoint": "image-to-image",
"provider": "seeapi",
"input": {
"prompt": "Change the ceramic mug to deep blue in the white area of the mask. Preserve the handle, lighting and everything outside the edited region.",
"input_images": [
"https://client.example.com/mug.png"
],
"mask_url": "https://client.example.com/mug-mask.png",
"aspect_ratio": "auto",
"resolution": "1K",
"background": "opaque",
"output_format": "png",
"enhance_prompt": true,
"nsfw_checker": false
},
"callback_url": "https://client.example.com/webhooks/seeapi"
})
});
const result = await response.json();{
"generation": {
"id": "task_xxx",
"model": "qwen-image-2-1",
"endpoint": "image-to-image",
"provider": "seeapi",
"status": "processing",
"estimated_credits": 5,
"consumed_credits": 0,
"refunded_credits": 0,
"created_at": "2026-08-18T10:00:00Z",
"updated_at": "2026-08-18T10:00:00Z"
},
"idempotent": false
}