Skip to content

Image Generation

POST/v1/generations

Generate images using AI models like FLUX, Stable Diffusion, DALL-E, and more.

Parameters

ParameterTypeRequiredDescription
modelstringModel name (e.g. flux/schnell, dall-e-3)
promptstringText description of the image
widthintegerImage width in pixels
heightintegerImage height in pixels
num_imagesintegerNumber of images to generate (default: 1)

Example

python
response = client.post("/v1/generations", json={
    "model": "flux/schnell",
    "prompt": "A futuristic city at sunset, cyberpunk style",
    "width": 1024,
    "height": 1024
})
print(response.json()["outputs"][0]["url"])

Available Models

ModelProviderPrice per image
flux/schnellBlack Forest Labs$0.003
flux/devBlack Forest Labs$0.025
dall-e-3OpenAI$0.04–$0.12
stable-diffusion-3Stability AI$0.03
ideogram/v2Ideogram$0.05

Browse all image models