Image Edits
POST /v1/images/edits
The stable image edit API currently uses JSON plus a base64 image. Both prompt and image are required. Do not use the old Stability background-removal, mask inpaint, or upscale examples; those are not the current stable public interface.
Request
terminal
bash
curl -X POST https://api.chuizi.ai/v1/images/edits \ -H "Authorization: Bearer ck-your-key" \ -H "Content-Type: application/json" \ -d '{ "model": "qwen/qwen-image-edit-plus", "image": "iVBORw0KGgo...(base64)", "prompt": "Make the background a clean studio scene", "size": "1024x1024" }'
| Parameter | Required | Description |
|---|---|---|
model | Yes | Image-edit model ID, such as Qwen Image Edit or Gemini Image |
image | Yes | Source image as base64, with or without a data:image/...;base64, prefix |
prompt | Yes | Edit instruction |
size | No | Model-supported output size |
response_format | No | url by default, or b64_json |
Response
config.json
json
{ "created": 1778544000, "data": [ { "url": "https://media.chuizi.ai/images/example.png" } ], "x_chuizi": { "generation_id": "gen-xxxxxxxxxxxxxxxxxxxxxxxx", "provider": "qwen", "latency_ms": 8200, "quantity": 1 } }