Docs Replicate official format /replicate/v1/models/google/imagen-4/predictions
API reference

Create task google/imagen-4

Official document: https://replicate.com/google/imagen-4

POST/replicate/v1/models/google/imagen-4/predictions

Body Parametersapplication/json

input object

Input content

properties
aspect_ratio string

The aspect ratio of the generated image. Default value: "1:1". Support: 1:1, 9:16, 16:9, 3:4, 4:3

output_format string

The format of the output image. Default value: "jpg".

prompt* string

Image-generated text prompts.

safety_filter_level string

block_low_and_above is the most strict, block_medium_and_above will block some prompts, and block_only_high is the loosest, but some prompts will still be blocked. Default value: "block_only_high"

Responses

200 application/json
response-200 object
properties
created_at string

Creation time

data_removed boolean

Whether sensitive data has been removed

error string nullable

Error message

id* string

Resource or task ID

input object

Input content

logs string

Run logs

model string

Model name / model ID

output string nullable

Output result

status* string

Status

urls object

List of resource URLs

version string

Version

400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example
1{
2"input": {
3"aspect_ratio": "16:9",
4"output_format": "jpg",
5"prompt": "The photo: Create a cinematic, photorealistic medium shot capturing the nostalgic warmth of a late 90s indie film. The focus is a young woman with brightly dyed pink-gold hair and freckled skin, looking directly and intently into the camera lens with a hopeful yet slightly uncertain smile, she is slightly off-center. She wears an oversized, vintage band t-shirt that says \"Replicate\" (slightly worn) over a long-sleeved striped top and simple silver stud earrings. The lighting is soft, golden hour sunlight streaming through a slightly dusty window, creating lens flare and illuminating dust motes in the air. The background shows a blurred, cluttered bedroom with posters on the wall and fairy lights, rendered with a shallow depth of field. Natural film grain, a warm, slightly muted color palette, and sharp focus on her expressive eyes enhance the intimate, authentic feel",
6"safety_filter_level": "block_medium_and_above"
7}
8}
Code Sample cURL
1curl -X POST "https://api.digislash.com/replicate/v1/models/google/imagen-4/predictions" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"input": {
6"aspect_ratio": "16:9",
7"output_format": "jpg",
8"prompt": "The photo: Create a cinematic, photorealistic medium shot capturing the nostalgic warmth of a late 90s indie film. The focus is a young woman with brightly dyed pink-gold hair and freckled skin, looking directly and intently into the camera lens with a hopeful yet slightly uncertain smile, she is slightly off-center. She wears an oversized, vintage band t-shirt that says \"Replicate\" (slightly worn) over a long-sleeved striped top and simple silver stud earrings. The lighting is soft, golden hour sunlight streaming through a slightly dusty window, creating lens flare and illuminating dust motes in the air. The background shows a blurred, cluttered bedroom with posters on the wall and fairy lights, rendered with a shallow depth of field. Natural film grain, a warm, slightly muted color palette, and sharp focus on her expressive eyes enhance the intimate, authentic feel",
9"safety_filter_level": "block_medium_and_above"
10}
11}'
Response
1▼{
2"created_at": "2025-07-30T03:34:41.761Z",
3"data_removed": false,
4"id": "yj1hjjc3c5rme0crb5jtqtxxmw",
5▼"input": {
6"aspect_ratio": "16:9",
7"output_format": "jpg",
8"prompt": "The photo: Create a cinematic, photorealistic medium shot capturing the nostalgic warmth of a late 90s indie film. The focus is a young woman with brightly dyed pink-gold hair and freckled skin, looking directly and intently into the camera lens with a hopeful yet slightly uncertain smile, she is slightly off-center. She wears an oversized, vintage band t-shirt that says \"Replicate\" (slightly worn) over a long-sleeved striped top and simple silver stud earrings. The lighting is soft, golden hour"…,
9"safety_filter_level": "block_medium_and_above"
10},
11"logs": "",
12"model": "google/imagen-4",
13"status": "starting",
14▼"urls": {
15"cancel": "https://api.replicate.com/v1/predictions/yj1hjjc3c5rme0crb5jtqtxxmw/cancel",
16"get": "https://api.replicate.com/v1/predictions/yj1hjjc3c5rme0crb5jtqtxxmw",
17"stream": "https://stream.replicate.com/v1/files/bcwr-wzn4sniemyumrzyhr364uivh625z7wk5w2qlbvbzqci3lgvzhwrq",
18"web": "https://replicate.com/p/yj1hjjc3c5rme0crb5jtqtxxmw"
19},
20"version": "hidden"
21}