POST
/
v1beta
/
models
/
imagen-4:generateContent
curl -X POST "https://api.example.com/v1beta/models/imagen-4:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{"text": "A futuristic city at night"}]
      }
    ]
  }'
This feature is under development.
Generate high-quality images using Google Imagen 4 model.

Request Parameters

key
string
required
API key.
contents
array
required
Content array.
curl -X POST "https://api.example.com/v1beta/models/imagen-4:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{"text": "A futuristic city at night"}]
      }
    ]
  }'