Endpoint
Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | yes | — | Image editing model (e.g. qwen-image-edit, nano-banana-2-edit, xai-grok-imagine-image-edit) |
prompt | string | yes | — | Description of the edit to apply. |
input_image | string (URL) | yes | — | URL of the image to edit. Must be publicly accessible. |
response_format | string | no | "url" | "url" returns a hosted URL. "b64_json" returns base64-encoded image bytes inline. |
target_namespace | string | no | current user | Namespace to save results and bill to. Can be an organization name. |
Examples
Basic edit
Response
Same format as/images/generate:
Errors
| Condition | Error |
|---|---|
| Image URL not accessible | "... 403 Client Error: Forbidden for url: ..." |
| Model not found | "Model not found: <name>" |
input_image URL must be publicly downloadable. URLs that require authentication or block automated access will fail.