Skip to main content

Image Generation

Create an image from a text prompt using various state-of-the-art models. Our API is fully compatible with the OpenAI Image Generation schema.

Endpoint

Request Body

string
required
The model ID to use for image generation.Available models include:
  • flux-schnell (Fast, high quality)
  • flux-1.1-pro (Professional grade)
  • dall-e-3 (OpenAI’s latest)
  • ideogram-v3 (Excellent for text in images)
  • imagen-3 (Google’s latest)
string
required
A text description of the desired image(s). The maximum length is 1000 characters.
integer
default:1
The number of images to generate. Must be between 1 and 10.
string
default:"1024x1024"
The size of the generated images. Options: 256x256, 512x512, 1024x1024.
string
default:"url"
The format in which the generated images are returned. Must be one of url or b64_json.
string
A unique identifier for the end-user, for abuse monitoring.

Response

integer
Unix timestamp of when the generation was created
array
An array of image objects. Each object contains:
  • url (string): The URL of the generated image (if response_format is url)
  • b64_json (string): The base64-encoded JSON of the generated image (if response_format is b64_json)
  • revised_prompt (string): The prompt as revised by the model (if applicable)

Examples

Error Responses