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.
| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | 4o-image | Use the 4o-image API model id. |
| prompt | string | Yes | - | Prompt text for models that support text input. |
| params | object | No | - | Model-specific parameter object. Use the rows below for allowed keys. |
| client_request_id | string | No | - | Optional client-side id for tracing requests in your system. |
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 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.