Rivya AI Docs

4o Image API Integration

Use 4o Image through Rivya Public API v1 with model id 4o-image, supported inputs, parameters, Files API rules, credits, and response examples.

Available via APIText input readyImage
API model id

4o-image

Inputs

text

Files API

Not required for the minimal request

Base credits

3

Capability

Image

Billing

FIXED

Prompt limit

No documented prompt limit

Request contract

Send the model id at the top level. Model-specific controls belong in params.

KeyTypeRequiredDefaultDescription
modelstringYes4o-imageUse the 4o-image API model id.
promptstringYes-Prompt text for models that support text input.
paramsobjectNo-Model-specific parameter object. Use the rows below for allowed keys.
client_request_idstringNo-Optional client-side id for tracing requests in your system.

Model parameters

KeyTypeRequiredDefaultRangeOptionsDescription
sizeselectNo1:1-1:1, 3:2, 2:3Aspect ratio

Minimal request

{
  "model": "4o-image",
  "prompt": "A clean editorial product image on a soft studio background",
  "params": {
    "size": "1:1"
  }
}

Create response

The create endpoint returns a public task id. Poll the status endpoint until the task succeeds or fails.

{
  "id": "task_4o_image_example",
  "status": "queued",
  "model": "4o-image",
  "reserved_credits": 3,
  "final_credits": 0,
  "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

The create endpoint returns a public task id. Poll the status endpoint until the task succeeds or fails.