Edit image

POST
/v1/images/edits

Edits an existing image based on a text prompt. Accepts multipart/form-data with the original image attached as image.

Response headers

  • Inference-Id — Unique ID for this request. Include this when contacting support.

Error codes

StatusMeaning
402Insufficient credits
429Rate limited
504No backend available
529No healthy backends are available for the requested model

Authorization

BearerAuth
AuthorizationBearer <token>

API key passed as Bearer token

In: header

Response Body

application/json

curl -X POST "https://example.com/v1/images/edits"
{
  "created": 0,
  "data": [
    {
      "b64_json": "string",
      "url": "string",
      "revised_prompt": "string"
    }
  ]
}