Skip to content

/fal-ai/imagen4/preview

POST https://www.kkiai.com/fal-ai/imagen4/preview

Official documentation: https://fal.ai/models/fal-ai/imagen4/preview

Request Parameters

Authorization

Add the Authorization parameter to the Header, with the value being the Token concatenated after Bearer

Example: Authorization: Bearer ********************

Body Parameters (application/json)

ParameterTypeRequiredDescription
promptstringRequired
aspect_ratiostringOptionalImage aspect ratio, enum values: 1:1, 16:9, 9:16, 3:4, 4:3
num_imagesintegerOptionalNumber of images to generate, range: 1-4
resolutionstringOptionalResolution: enum values: "1K", "2K"

Request Example

json
{
  "prompt": "Capture an intimate close-up bathed in warm, soft, late-afternoon sunlight filtering into a quintessential 1960s kitchen. The focal point is a charmingly designed vintage package of all-purpose flour, resting invitingly on a speckled Formica countertop. The packaging itself evokes pure nostalgia: perhaps thick, slightly textured paper in a warm cream tone, adorned with simple, bold typography (a friendly serif or script) in classic red and blue \"ALL-PURPOSE FLOUR\", featuring a delightful illustration like a stylized sheaf of wheat or a cheerful baker character. In smaller bold print at the bottom of the package: \"NET WT 5 LBS (80 OZ) 2.27kg\". Focus sharply on the package details – the slightly soft edges of the paper bag, the texture of the vintage printing, the inviting \"All-Purpose Flour\" text. Subtle hints of the 1960s kitchen frame the shot – the chrome edge of the counter gleaming softly, a blurred glimpse of a pastel yellow ceramic tile backsplash, or the corner of a vintage metal canister set just out of focus. The shallow depth of field keeps attention locked on the beautifully designed package, creating an aesthetic rich in warmth, authenticity, and nostalgic appeal.",
  "aspect_ratio": "1:1",
  "num_images": 1,
  "resolution": "1K"
}

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/fal-ai/imagen4/preview' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "prompt": "Capture an intimate close-up bathed in warm, soft, late-afternoon sunlight filtering into a quintessential 1960s kitchen. The focal point is a charmingly designed vintage package of all-purpose flour, resting invitingly on a speckled Formica countertop. The packaging itself evokes pure nostalgia: perhaps thick, slightly textured paper in a warm cream tone, adorned with simple, bold typography (a friendly serif or script) in classic red and blue \"ALL-PURPOSE FLOUR\", featuring a delightful illustration like a stylized sheaf of wheat or a cheerful baker character. In smaller bold print at the bottom of the package: \"NET WT 5 LBS (80 OZ) 2.27kg\". Focus sharply on the package details – the slightly soft edges of the paper bag, the texture of the vintage printing, the inviting \"All-Purpose Flour\" text. Subtle hints of the 1960s kitchen frame the shot – the chrome edge of the counter gleaming softly, a blurred glimpse of a pastel yellow ceramic tile backsplash, or the corner of a vintage metal canister set just out of focus. The shallow depth of field keeps attention locked on the beautifully designed package, creating an aesthetic rich in warmth, authenticity, and nostalgic appeal.",
  "aspect_ratio": "1:1",
  "num_images": 1,
  "resolution": "1K"
}'

Response

🟢 200 Success

Response Example

json
{
    "status": "IN_QUEUE",
    "request_id": "484ccb37-5477-44fe-8e75-6d6f6e9160b3",
    "response_url": "https://queue.fal.run/fal-ai/imagen4/requests/484ccb37-5477-44fe-8e75-6d6f6e9160b3",
    "status_url": "https://queue.fal.run/fal-ai/imagen4/requests/484ccb37-5477-44fe-8e75-6d6f6e9160b3/status",
    "cancel_url": "https://queue.fal.run/fal-ai/imagen4/requests/484ccb37-5477-44fe-8e75-6d6f6e9160b3/cancel",
    "logs": null,
    "metrics": {},
    "queue_position": 0
}