POST /v1/edit — Edit Images with AI via API
POST /v1/edit — Edit Images with AI via API
Edit and transform existing images with AI instructions. Supply a source image and a prompt; receive a modified image URL with precise credit costs.
POST
POST /v1/edit — Edit Images with AI via API
TheDocumentation Index
Fetch the complete documentation index at: https://docs.artnex.app/llms.txt
Use this file to discover all available pages before exploring further.
/v1/edit endpoint takes an existing image and a set of instructions, then returns a modified version of that image. Use it to change styles, remove or add objects, recolor elements, apply artistic effects, or perform any other AI-driven transformation.
Endpoint
Request parameters
Instructions describing how to edit the image. Be specific about what you want to change and what you want to preserve. Maximum 4,000 characters.Example:
"Change the background to a snowy mountain scene, keep the subject unchanged"The source image to edit. Provide either:
- A publicly accessible HTTPS URL pointing to the image, or
- A base64-encoded image string (include the data URI prefix, e.g.
data:image/jpeg;base64,...).
The editing model to use. Must be one of the supported model IDs listed in the Models section below.
Response fields
true when the request completed successfully.Array containing the edited image.
Unique identifier for this request, useful for support queries or logging.
Total credits deducted from your account balance for this request.
Models
| Model ID | Credits per edit | Description |
|---|---|---|
nano-banana-edit | 240 | Fast edits at a low credit cost |
seedream-edit | 200 | Bytedance Seedream image editing |
nano-banana-pro-edit | 800 | High-fidelity edits with fine detail |
seedream-v4.5-edit | 800 | High-fidelity Seedream v4.5 editing |
nano-banana-pro-edit-ultra | 1,000 | Ultra-quality edits for demanding use cases |
gpt-image-2-edit | Varies | OpenAI GPT-Image-2 editing; credits vary by resolution and quality |
gpt-image-2-edit uses dynamic pricing based on resolution (1k, 2k, 4k) and quality (low, medium, high). Add resolution and quality fields to your request body when using this model.Example requests
Example response
Error codes
| HTTP status | Error code | Cause |
|---|---|---|
400 | missing_prompt | The prompt field is absent or empty |
400 | missing_image | The image field is absent |
400 | invalid_image_format | The image format is not supported or the file is corrupt |
400 | image_too_large | The image exceeds the 10 MB size limit |
400 | invalid_model | The model value is not a supported edit model ID |
401 | invalid_api_key | The API key is missing, malformed, or revoked |
402 | insufficient_credits | Your account does not have enough credits to complete the request |
429 | rate_limit_exceeded | You have exceeded your plan’s daily request quota |