Skip to main content
POST
Generate an AI image from a text prompt.

Authorizations

X-API-Key
string
header
required

Company API key - scoped to a specific company. Generate from the Integrations page in your dashboard.

Body

application/json

Image generation parameters

Request body for generating an image

prompt
string
required

Text prompt to generate image from

companyId
string

Company ID (optional, defaults to API key company)

model
string

Model to use (e.g., gpt-image-1, leonardo models, google models)

size
string
default:1024x1024

Size for GPT Image models (e.g., 1024x1024, 1792x1024)

width
integer

Image width for Leonardo/Google models

height
integer

Image height for Leonardo/Google models

quality
string
default:auto

Quality setting: auto, standard, hd, low, medium, high

referenceImages
string[]

List of reference image URLs for edit mode

inputFidelity
string
default:low

Input fidelity for GPT Image edit mode: low, medium, high

Response

The generated image with its public URL

Generated image response

msg
string

Success message

imageId
string

ID of the generated image

url
string

Public URL of the generated image — use this directly in HTML, canvases, and content