↓
Rivya AI Docs
Model API guides

Google Imagen4 API reference

Check Google Imagen4 availability, inputs, parameters, file requirements, credit pricing, and request examples for Rivya Public API v1. Model ID: google-imagen4.

Available via APIText input readyImage
API model ID

google-imagen4

Inputs

text

Files API

Not required for the minimal request

Credit pricing

Credit rate: 8 per request The final cost is rounded up to whole credits.

Capability

Image

Billing

FIXED

Prompt limit

5000 characters

Request fields

Set model at the top level. Put model-specific controls and reference inputs in params, using the format documented for this model.

KeyTypeRequiredDefaultDescription
modelstringYesgoogle-imagen4Set model to google-imagen4.
promptstringYes-Maximum 5000 characters for this model.
paramsobjectNo-The model-specific params object. Use the documented keys and reference-file format for this model.
client_request_idstringNo-Optional ID for tracing this request in your system. It does not replace Idempotency-Key.

Model parameters

KeyTypeRequiredDefaultRangeOptionsDescription
aspect_ratioselectNo1:1-1:1, 16:9, 9:16, 3:4, 4:3, autoAspect ratio
negative_prompttextNo---Negative prompt
seedtextNo---Keep the prompt, reference inputs, and settings unchanged when reusing a seed. Allowed seed values and defaults depend on the model, and identical results are not guaranteed.

Minimal request

{
  "model": "google-imagen4",
  "prompt": "A product bottle on a light gray background, lit softly from the left.",
  "params": {
    "aspect_ratio": "1:1",
    "negative_prompt": "Optional things to avoid",
    "seed": "Optional seed text"
  }
}

Example response

An accepted generation request returns a task ID. Poll the status endpoint until the task succeeds or fails. A status request failure does not mean generation failed.

{
  "id": "task_google_imagen4_example",
  "status": "queued",
  "model": "google-imagen4",
  "reserved_credits": 8,
  "final_credits": 0,
  "settlement_status": "RESERVED",
  "created_at": "2026-05-11T00:00:00.000Z",
  "updated_at": "2026-05-11T00:00:00.000Z",
  "result": null,
  "error": null
}

Common errors

validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found

An accepted generation request returns a task ID. Poll the status endpoint until the task succeeds or fails. A status request failure does not mean generation failed.