Images

Image Generations

OpenAI-compatible image generation endpoint.

post/v3/images/generations

Request

  • Base URL
    https://api.edenai.run
  • Auth
    HTTP bearer

Request body

tagsunknown
modelstring required

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

promptstring required
ninteger nullable
sizestring nullable

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

userstring nullable

End-user identifier for abuse tracking.

metadataobject nullable

Arbitrary metadata attached to the request.

extra_headersobject nullable

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

qualitystring nullable

Provider-specific quality string (e.g. 'low', 'medium', 'high', 'standard', 'hd', 'auto'). Accepted values depend on the model.

response_formatstring nullable

Legacy DALL-E parameter. Ignored by gpt-image-* and forwarded to the provider for any model that still honors it.

Example request

{
  "tags": {
    "client": "acme",
    "project": "invoices"
  }
}

Response

Successful Response

costnumber nullable
providerstring nullable
createdinteger nullable
usageobject nullable

Changes

No recorded changes to this operation across all 1 revision of this API.