# Imagen 4 | Fast Use this fast version of Imagen 4 when speed and cost are more important than quality ## API Information - **Model Slug:** imagen-4-fast - **Branded URL:** https://www.eachlabs.ai/google/imagen4/imagen-4-fast - **Provider:** Google - **Category:** Text to Image - **Output Type:** image - **Status:** active - **Version:** 0.0.1 - **Base Cost:** Fixed price per execution: $0.02 - **Estimated Processing Time:** 1 seconds - **Last Updated:** 2026-06-22 - **Interactive Demo:** https://www.eachlabs.ai/ai-models/imagen-4-fast ## Pricing - **Charge Type:** dynamic - **Estimated Price (default example):** $0.0200 - **Pricing Details:** Fixed price per execution: $0.02 ### Pricing Rules | Condition | Pricing | | --- | --- | | Rule 1 | Fixed price per execution: $0.02 | ## Input Schema | Parameter | Type | Required | Default | Constraints | Description | |-----------|------|----------|---------|-------------|-------------| | prompt | string | Yes | - | - | Text prompt for image generation | | aspect_ratio | string | No | 1:1 | 1:1,9:16,16:9,3:4,4:3 | An enumeration. | | safety_filter_level | string | No | block_only_high | block_low_and_above,block_medium_and_above,block_only_high | An enumeration. | | output_format | string | No | jpg | jpg,png | An enumeration. | ## Example Request ```bash curl -X POST https://api.eachlabs.ai/v1/prediction/ \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "imagen-4-fast", "input": { "prompt": "Create a cinematic photorealistic medium shot capturing the intense atmosphere of a high speed coastal highway at golden hour. Slightly off center stands a young man with wind blown dark hair sun kissed skin and a piercing focused gaze locked directly into the camera. His expression is calm yet determined with a subtle tension in his jaw. He wears a fitted storm gray and burnt orange racing jacket unzipped to clearly reveal a matte black t shirt that prominently displays the text Imagen 4 Fast in bold stylized motion lettering across the chest with on Eachlabs written just beneath it in clean modern typography both lines fully visible and unobstructed. A pair of aviator sunglasses rests naturally on his head glinting softly in the low angle sunlight. The background features a windswept coastal cliff road with a blurred motion trail of a speeding car curving into the distance. The ocean sparkles far below while warm golden highlights from the setting sun cast long dramatic shadows. The composition balances natural beauty and tension with high contrast lighting drawing crisp attention to the man face and torso while the background remains soft and slightly blurred. Every element from the movement in his hair to the clarity of the printed text reinforces a grounded high impact cinematic realism." } }' ``` ## Output Schema Response returned by `GET /v1/prediction/{id}` when the job completes: ```json { "status": "success", "predictionID": "string", "output": "string (URL of generated image)", "metrics": { "predict_time": "number (seconds)" } } ``` ## Polling ```bash curl https://api.eachlabs.ai/v1/prediction/{PREDICTION_ID} \ -H "Authorization: Bearer YOUR_API_KEY" ``` | Status | Meaning | |--------|---------| | `processing` | Still running — poll again | | `success` | Done — read `output` | | `error` | Failed — read `message` / `details` | ## Webhook (alternative to polling) Pass `"webhook_url": "https://your.host/path"` in the create request. Eachlabs POSTs this payload when the job ends: ```json { "exec_id": "prediction-uuid", "status": "succeeded", "output": "https://...", "error": "" } ``` `status` is `"succeeded"` or `"failed"`. `exec_id` equals the `predictionID` from create. Return 2xx within 30 seconds. ## Errors Error body: `{ "status": "error", "message": "...", "details": "..." }` | Code | Meaning | |------|---------| | `400` | Invalid input | | `401` | Missing / invalid `Authorization` bearer token | | `404` | Unknown model or prediction id | | `429` | Rate limit — 100 creates / min, 10 concurrent per key | | `5xx` | Retry with backoff | ## Overview **imagen-4-fast — Text-to-Image AI Model** imagen-4-fast delivers rapid photorealistic image generation from text prompts, prioritizing speed and low cost for developers and creators needing quick prototypes without sacrificing core quality. Developed by Google as part of the **imagen4** family, this **text-to-image AI model** generates images in about 4 seconds at just 2 credits per output, making it ideal when **Google text-to-image** performance matters more than ultra-high fidelity. Unlike full-quality variants, imagen-4-fast optimizes for low-latency use cases like iterative prompt testing or high-volume **text-to-image AI model** workflows on platforms like Eachlabs. ## Usage Notes - API Base URL: `https://api.eachlabs.ai/v1` - Authentication: send `Authorization: Bearer YOUR_API_KEY`. Generate a key from the Eachlabs dashboard at https://www.eachlabs.ai/dashboard/api-keys. - File-typed parameters (`*_url`, `image_url`, `video_url`, `audio_url`, etc.) accept publicly-reachable HTTPS URLs only. Upload your asset first (GCS / S3 / your CDN) and pass the resulting URL. Data-URIs and localhost URLs are rejected. - For structured parameters (arrays / objects) send real JSON values, not stringified payloads. - Monetary values are reported in USD; per-token / per-megapixel rates may be billed in micro-cents internally. - Prefer `webhook_url` over polling for long-running predictions — see the Webhook Callback section.