Documentation Index
Fetch the complete documentation index at: https://docs.nano-gpt.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Use the image edits endpoint to modify one or more input images with a text prompt. This is an OpenAI-compatible image editing endpoint. Both paths are supported aliases:POST /api/v1/images/editPOST /api/v1/images/edits
Authentication
Use either header:Authorization: Bearer YOUR_API_KEYx-api-key: YOUR_API_KEY
Multipart Request
Sendmultipart/form-data when uploading files.
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Edit instruction. |
image | file or string | Yes* | Input image file, image URL, or data URL. |
image[] | repeated file or string | Yes* | Repeated image inputs for multi-image editing. |
mask | file | No | Optional mask image for inpainting-capable models. |
model | string | No | Image-edit-capable model. Defaults to an image-edit-capable default when omitted. |
size | string | No | Requested output size, when supported by the model. |
n | integer | No | Number of outputs, when supported by the model. |
image or one or more image[] fields.
Other image-generation parameters may pass through when supported by the selected model.
Multi-image Multipart
JSON Request
Send JSON when you already have images as data URLs.Multi-image JSON
Response
Responses follow the same image response conventions as image generation. Depending on request parameters and model support, returned items may containurl or b64_json.
Common Errors
| Code | Description |
|---|---|
missing_image_input | image is required. |
image_input_too_large | Upload or input image is too large. |
invalid_multipart_body | Multipart body could not be parsed. |
rate_limit_exceeded | Too many image edit uploads. |
Notes
- Multipart uploads have strict size limits.
- Generated URLs are temporary unless another page explicitly guarantees longer retention.
- Use
GET /api/v1/image-modelsto discover image-edit-capable models and supported parameters.