Skip to main content
POST
Image Edits

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

OpenAI-compatible POST /v1/images/edits JSON request body.

References:

  • OpenAI's current /v1/images/edits JSON form for gpt-image-* takes images: [{file_id | image_url}, ...] and an optional mask: {file_id | image_url}.
  • image_url accepts an https URL or a data:image/...;base64,... URL.
model
string
required

provider/model, e.g. 'openai/gpt-image-2'

prompt
string
required
Required string length: 1 - 32000
images
ImageRef · object[]
required

One or more input images. Each entry references one image via exactly one of file_id (an Eden upload id) or image_url (https URL or base64 data URL). The first image is the canvas; subsequent images are inpaint references.

Required array length: 1 - 16 elements
n
integer | null
Required range: 1 <= x <= 10
size
string | null

Provider-specific size string. OpenAI accepts '1024x1024', '1536x1024', '1024x1536', 'auto'. Vertex Imagen accepts square or aspect-ratio strings. Validation is delegated to the provider.

user
string | null

End-user identifier for abuse tracking.

metadata
Metadata · object | null

Arbitrary metadata attached to the request.

extra_headers
Extra Headers · object | null

Additional HTTP headers forwarded to the provider API. Credential headers (Authorization, x-api-key, ...) are rejected.

mask
ImageRef · object | null

Optional mask image (PNG with transparent pixels marking the regions to edit). Same shape as an images[] entry.

Response

200 - application/json

Successful Response

OpenAI-compatible image response + Eden cost / provider fields.

Shared by POST /v3/images/generations and POST /v3/images/edits — the wire shape is identical.

cost
number | null
provider
string | null
created
integer | null
data
ImageDataItem · object[]
usage
Usage · object | null