POST

Generate an image from a text prompt with configurable aspect ratio, format, and safety level. Powered by Google Imagen 4 on Replicate

/v1/image/generate/imagen-4

Powered by Google

Request → Response

Examples from schemas.json.

Requestapplication/json
POST /v1/image/generate/imagen-4
Content-Type: application/json

{
  "prompt": "Summarize this text in one sentence.",
  "aspect_ratio": "1:1",
  "output_format": "jpg",
  "safety_filter_level": "block_only_high"
}
Responseapplication/json
HTTP/1.1 200 OK
Content-Type: application/json

// Endpoint-specific body after 402 settlement

Overview

Generate an image from a text prompt with configurable aspect ratio, format, and safety level. Powered by Google Imagen 4 on Replicate.

Technology company behind Imagen, Veo, and Safe Browsing.

Request schema

Body: JSON · application/json

FieldTypeDescription
promptstringrequired
aspect_ratiostringrequiredenum: 1:1, 3:4, 4:3, 9:16, 16:9
output_formatstringrequiredenum: jpg, png
safety_filter_levelstringrequiredenum: block_only_high, block_medium_and_above, block_low_and_above
IMPLEMENTATION
curl -X POST https://api.tools402.dev/v1/image/generate/imagen-4 \
  -H "Content-Type: application/json" \
  -d '{
  "prompt": "Summarize this text in one sentence.",
  "aspect_ratio": "1:1",
  "output_format": "jpg",
  "safety_filter_level": "block_only_high"
}'

402 payment flow omitted — see Integrations for settlement.