4o Image API reference
Check 4o Image availability, inputs, parameters, file requirements, credit pricing, and request examples for Rivya Public API v1. Model ID: 4o-image.
4o-image
text
Not required for the minimal request
Credit rate: 3 per request The final cost is rounded up to whole credits.
Image
FIXED
No documented prompt limit
Request fields
Set model at the top level. Put model-specific controls and reference inputs in params, using the format documented for this model.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | 4o-image | Set model to 4o-image. |
| prompt | string | Yes | - | Prompt text for models that support text input. |
| params | object | No | - | The model-specific params object. Use the documented keys and reference-file format for this model. |
| client_request_id | string | No | - | Optional ID for tracing this request in your system. It does not replace Idempotency-Key. |
Model parameters
| Key | Type | Required | Default | Range | Options | Description |
|---|---|---|---|---|---|---|
| size | select | No | 1:1 | - | 1:1, 3:2, 2:3 | Aspect ratio |
Minimal request
{
"model": "4o-image",
"prompt": "A product bottle on a light gray background, lit softly from the left.",
"params": {
"size": "1:1"
}
}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_4o_image_example",
"status": "queued",
"model": "4o-image",
"reserved_credits": 3,
"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.
