Skip to content
Docs menu

Image models

Imagen 4

On this page

Imagen 4 — fast, high-fidelity AI image generation & editing.

modelIdgoogle-imagen4-fast
Modalityimage
PricingSee this model on the Pricing page for the current per-call price (with your markup).

Operations

OperationEndpointDescription
Text to imagePOST /api/v1/generateBase generation from a text prompt.
Poll taskGET /api/v1/task/{id}?model=google-imagen4-fastRetrieve state and result URLs.

Input parameters

FieldTypeRequiredValues / example
prompttextarearequiredEnter a detailed description of the image you want to generate...
negative_prompttextareaoptionalEnter descriptions of what you want to avoid in the image...
aspect_ratioselectoptional1:1, 16:9, 9:16, 3:4, 4:3, auto
seednumberoptionalEnter seed number...
nsfw_checkerselectoptionalfalse, true

Example request

bash
curl -X POST https://you.bot/api/v1/generate \
  -H "Authorization: Bearer $YOUBOT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"modelId":"google-imagen4-fast","input":{"prompt":"A single paper origami crane resting on a rain-speckled windowsill at blue hour, soft city-light bokeh glowing beyond the wet glass.","negative_prompt":"…","aspect_ratio":"16:9","seed":8,"nsfw_checker":"true"}}'