Imagen 4 is an AI image generator capable of creating detailed, high-quality images in various styles with resolutions up to 2K.
Request
Header Params
Body Params application/json
Example
{"aspect_ratio":"1:1","negative_prompt":"","num_images":1,"prompt":"A raw, unflinching photograph of a weathered soldier in a desert trench. Dust and sand are kicked up by the wind, clinging to his helmet and gear. His eyes, though tired, are sharp and focused, looking out into the distance. The background is a blurry, sun-scorched landscape. The image is gritty, with high contrast and a muted color palette. Shot on a vintage film camera, documentary style, hyper-realistic."}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl--location--request POST 'https://api.302.ai/ws/api/v3/wavespeed-ai/imagen4' \
--header'Authorization: Bearer ' \
--header'Content-Type: application/json' \
--data-raw'{
"aspect_ratio": "1:1",
"negative_prompt": "",
"num_images": 1,
"prompt": "A raw, unflinching photograph of a weathered soldier in a desert trench. Dust and sand are kicked up by the wind, clinging to his helmet and gear. His eyes, though tired, are sharp and focused, looking out into the distance. The background is a blurry, sun-scorched landscape. The image is gritty, with high contrast and a muted color palette. Shot on a vintage film camera, documentary style, hyper-realistic."
}'