Generate images
Generate images from a text prompt with a dedicated image model.
Authentication
AuthorizationBearer
Your production key sent as a bearer token.
Request
This endpoint expects an object.
model
Image model, for example openai/gpt-image-2.
prompt
Text prompt for the image.
customer
Customer ID (UUID) to scope this request to, applying that customer’s routing policy, provider keys, budget, and usage attribution.
vendor
Pin the vendor that runs this request.
n
Number of images, 1 to 10.
size
Image size, for example 1024x1024.
quality
Quality tier, model-specific.
output_format
Output format such as png, jpeg, or webp, model-specific.
response_format
Legacy OpenAI field; most current models return b64_json only.
Allowed values:
style
Style hint, model-specific.
user
End-user identifier forwarded to the provider.
provider_options
Provider-specific options, allowlisted per vendor family.
Response
Successful Response
created
Unix timestamp in seconds.
data
Generated images.
usage
Token usage reported by the provider; absent for flat per-image models.
images_generated
Number of images generated.
cost
Cost of the request in USD; null when the route is unpriced.
Errors
422
Unprocessable Entity Error