Skip to main content
POST
/
generate
/
k
/
imagen4
Imagen4 Image Generation
curl --request POST \
  --url https://api.sinancode.com/v1/generate/k/imagen4 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "a futuristic cityscape at sunset",
  "aspect_ratio": "1:1",
  "negative_prompt": "blurry, low quality",
  "num_images": 1,
  "seed": 0
}
'
{
  "task_id": "01234567-89ab-cdef-0123-456789abcdef"
}
Generate high-quality images using Google DeepMind’s Imagen 4 model. Key Features:
  • 2K High Resolution - Generate detailed images up to 2K resolution
  • Realistic Texture Details - Excellent fabric, water droplet, and animal fur rendering
  • Precise Text Typography - Significantly improved text and typography generation
  • SynthID Watermark - Built-in invisible digital watermark to identify AI-generated content

Authorizations

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

prompt
string
required

Prompt (required, max 5000 characters)

Required string length: 1 - 5000
Example:

"a futuristic cityscape at sunset"

aspect_ratio
enum<string>
default:1:1

Aspect ratio (optional, default 1:1)

Available options:
1:1,
16:9,
9:16,
3:4,
4:3
Example:

"1:1"

negative_prompt
string

Negative prompt (optional)

Example:

"blurry, low quality"

num_images
integer
default:1

Number of images (optional, 1-4, default 1)

Required range: 1 <= x <= 4
Example:

1

seed
integer

Random seed (optional, integer)

Example:

0

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"