API Reference
Image Generations
Generate one or more images from a text prompt. Supports both synchronous and asynchronous modes.
POST
This API endpoint allows you to generate images from text prompts using various image generation models.
Create Image Generation
To generate an image, use the following endpoint:POST /v1/images/generations
Request Body
The image generation model to use (e.g., “flux-1-schnell”)
The text prompt for image generation
Provider-specific quality preset
Target image resolution (e.g., “1024x1024”)
Number of images to generate (default: 1)
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Body
application/json
Image generation model (e.g., flux-1-schnell)
The text prompt for image generation
Provider-specific quality preset
Target image resolution (e.g., 1024x1024)
Number of images to generate
Output format per image
Available options:
url, b64_json Number of diffusion steps
Random seed for reproducibility
Negative prompt for image generation
Guidance scale for image generation
Queue the request and return a task ID instead of waiting for the image result