Skip to main content
POST
/
v1
/
images
/
edits
Edit images
curl --request POST \
  --url https://api.naga.ac/v1/images/edits \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form model=gpt-image-1 \
  --form 'prompt=Replace the background with a rainy cyberpunk street.'
{
  "created": 123,
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>"
    }
  ],
  "usage": {
    "output_tokens": 123,
    "total_tokens": 123,
    "input_tokens": 123
  }
}

Authorizations

Authorization
string
header
required

Primary authentication for inference endpoints. Send your Naga API key as Authorization: Bearer <api-key>.

Body

multipart/form-data
model
string
required
prompt
string
required
Required string length: 1 - 32000
background
string
mask
string | null
n
integer
Required range: x >= 1
quality
string
response_format
enum<string>
default:url
Available options:
url,
b64_json
size
string
image
string
image[]
string[]

Response

Successful Response

created
integer
required
data
ImageDataResponse · object[]
required
usage
ImageUsageResponse · object
required