← Back to catalog

Imagen 4

Live
imagegen

Google Imagen 4 text-to-image with high photorealism.

Endpoint

POSThttps://brahmand-api.bulletshorts.co/v1/image/imagen-4

Authenticate with the X-API-Key request header.

Pricing

6 credits / image1 credit = ₹1. Billed on success: per image.
Price varies by resolution — pass resolution in your request. Credit cost per image:
resolutioncredits / imagevs base
1k61×
2k81.5×
4k112×

List price. Volume / bulk customers get a discounted rate — contact us for account pricing.

Parameters

NameTypeRequiredDescriptionDefault / options
promptstringrequiredText prompt describing the desired output.
nnumberoptionalNumber of images to generate (1-4).
default: 1
aspect_ratiostringoptionalOutput aspect ratio.
default: 1:1
negative_promptstringoptionalThings to avoid in the output.
seednumberoptionalRNG seed (0-4294967295) for deterministic output. Forces add_watermark off when set.
add_watermarkbooleanoptionalAdd SynthID watermark. Cannot be combined with seed.
default: true
person_generationstringoptionalAllow people in output: dont_allow | allow_adult | allow_all.
default: allow_adult
safety_settingstringoptionalSafety filter: block_low_and_above | block_medium_and_above | block_only_high | block_none.
enhance_promptbooleanoptionalLet the model LLM-rewrite the prompt for better results.
languagestringoptionalPrompt language hint (e.g. en, auto).

Request

curl
curl -X POST https://brahmand-api.bulletshorts.co/v1/image/imagen-4 \
  -H "X-API-Key: $TRINETRA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt":"A golden retriever puppy in a field of sunflowers","n":1}'
request body (JSON)
{
  "prompt": "A golden retriever puppy in a field of sunflowers",
  "n": 1
}

Response

Submitting a job returns 202 Accepted with a job id. Poll GET /v1/jobs/{id} until the job reaches a terminal state, or register a webhook to be notified.

202 Accepted
{
  "job_id": "job_imagen4_a1b2c3",
  "status": "queued"
}
GET /v1/jobs/{id} → succeeded
{
  "id": "job_imagen4_a1b2c3",
  "model": "imagen-4",
  "status": "succeeded",
  "output": {
    "outputs": [
      {
        "url": "https://cdn.trinetra.ai/out/imagen-4/a1b2c3.png",
        "type": "image"
      }
    ]
  },
  "credits_charged": 10
}

Webhook: set a webhook_url on your API key to receive a POST with the terminal job document instead of polling.