Imagen 4 Fast API
https://api.hiapi.ai /v1/tasks Image, video, and audio models are called through theUnified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).
Model summary
| Model name | imagen4-fast |
|---|---|
| Type | Image generation (text-to-image) |
| Endpoint | POST /v1/tasks |
| Pricing | See HiAPI Pricing |
Imagen 4 Fast text-to-image API for high-quality images from detailed prompts.
Production guidance
- Pass callback.url at the top level in production to reduce polling.
- Poll GET /v1/tasks/:id for local debugging.
Best suited for
Batch out versions to compare composition, color and style in 6 aspect ratios.
promptaspect_ratioFix the integer seed and change one thing in the prompt at a time.
seednegative_promptRequest parameters
model string required Fixed value imagen4-fast.
input object required Put model parameters inside input.
prompt string required Required image description, up to 5,000 characters.
aspect_ratio enum required Output aspect ratio.
negative_prompt string optional Optional negative prompt, up to 5,000 characters.
seed integer optional Optional integer for reproducible generation.
callback object optional Optional terminal task callback.
url string required HTTPS endpoint that receives terminal task notifications.
when enum optional Callback timing; keep final.
Example requests
A four-part prompt: the task, what to show, what to keep, and texture and limits.
{
"model": "imagen4-fast",
"input": {
"prompt": "Create a quick concept illustration for a citrus soda ad. Show one can surrounded by orange slices and a refreshing splash in saturated orange and blue. Keep a single product scene with the can large in the frame. Flat, bright illustration style. Do not add logos or text.",
"aspect_ratio": "16:9"
}
}The prompt as submitted for an example on the model page.
{
"model": "imagen4-fast",
"input": {
"prompt": "Flat vector icon set of weather symbols on a pastel background",
"aspect_ratio": "1:1"
}
}Getting the result
- The response returns a taskId immediately.
- Wait for callback.url or poll GET /v1/tasks/:id.
- When status=success, download output[].url.
FAQ
Does it accept reference images?
No. Imagen 4 Fast generates from text only.
What type is seed?
An optional integer. Note that seed is a string on Imagen 4 and Ultra.
What next once a direction is chosen?
Just change model. Carry the prompt and ratio to Google-Imagen4 or imagen4-ultra; note that seed is a string on those two.
How do I retrieve the result?
Use the taskId. The response returns it right away; download output[].url after the task succeeds.
How can I confirm the cost?
The task record is final. Check the pricing page and Playground estimate before submitting. View pricing