Rivya API

Build on Rivya's multimodal model layer

Rivya API gives product teams a public, account-based way to call Rivya models from their own apps. Start with asynchronous image, video, and audio jobs, add Chat API turns with optional SSE streaming when a model is chat-capable, and keep billing inside the same Rivya credit wallet.

Quickstart shape

Model layer

Dynamic catalog

Billing

Shared credits

First version

Jobs + Chat

Access

API keys

MethodPOST
Endpoint/api/v1/generations

The real request requires a Rivya API key and available account credits. Public examples use placeholder secrets and do not call models anonymously.

Request
curl https://rivya.ai/api/v1/generations \
  -H "Authorization: Bearer rvya_sk_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: demo-job-001" \
  -d '{
    "model": "z-image",
    "prompt": "Editorial product photo on a clean studio set"
  }'
Response
{
  "id": "task_public_id",
  "status": "queued",
  "model": "z-image",
  "reserved_credits": 20,
  "result": null,
  "error": null
}

What ships first

A public API layer that stays aligned with the Rivya product

The API is designed as a Rivya product surface. It uses Rivya model IDs, Rivya credits, public task states, and docs that stay connected to the model catalog.

Image generation API

Submit image jobs with prompt and supported model parameters, then poll for public results.

Video generation API

Run asynchronous video jobs with the same task and credit controls used by Studio.

Audio generation API

Use API-accessible audio models through the same account, balance, and history boundary.

Shared credit wallet

API calls and Studio usage draw from the same Rivya balance, with reserved credits and failure handling.

Start path

From account to first API request

01

Create a key

Sign in, open API Keys in Settings, create a scoped key, and store the full secret immediately.

02

Choose a model

Read the API model reference or call /api/v1/models to inspect model IDs, parameters, chat capabilities, and input readiness before submitting.

03

Submit, poll, or subscribe

Send an idempotent generation request, poll the public task endpoint, use signed webhooks for generation callbacks, or send a Chat API turn with optional SSE streaming.

Version boundary

Clear scope, no hidden promises

The landing page can mention future surfaces, but the current product copy must not imply unfinished APIs are already live.

Chat API

Available

Available for non-streaming and SSE streaming turns with API-created sessions, account credits, and optional Files API image attachments.

Files API

Available

Available for reference image, video, and audio uploads. Use it before generation when a model page asks for params.referenceMediaItems.

User webhooks

Available

Available for production integrations that want signed callbacks for succeeded or failed generation tasks.

Online debugger

Preview the request, then run it with your own API key

The debugger starts in mock mode for every visitor. The generation selector lists non-chat models that can be tested without uploading files, while the Files panel lets signed-in users test /api/v1/files with a temporary API key. Chat examples live in the API docs.

Account state

Checking account

Active key prefix

Create a key first

Current credits

Sign in to check

Mock previewLive Public APINo active API key

Mock mode never calls a model and never consumes credits.

Paste the key only for this request. The debugger does not store it after refresh.

Files API upload test

Upload reference media through POST /api/v1/files, then copy the returned URL and duration token into params.referenceMediaItems for a model that supports reference inputs.

Mock never uploadsLive uses /api/v1/files

The selected model controls allowed MIME types, size, and duration rules. Live uploads require your temporary API key and may call the real upload service.

Request preview
{
  "model": "z-image",
  "prompt": "Editorial product photo on a clean studio set",
  "params": {
    "aspect_ratio": "1:1"
  }
}
Response
{
  "id": "mock_task_001",
  "status": "queued",
  "model": "z-image",
  "reserved_credits": 1,
  "final_credits": 0,
  "result": null,
  "error": null
}
Files API response
{
  "id": "file_mock_001",
  "object": "file",
  "kind": "image",
  "file_name": "reference.png",
  "mime_type": "image/png",
  "size_bytes": 245760,
  "url": "https://media.example/reference.png",
  "duration_seconds": null,
  "duration_token": null,
  "created_at": "2026-05-11T00:00:00.000Z",
  "expires_at": null
}
Generation params
{
  "params": {
    "referenceMediaItems": [
      {
        "url": "https://media.example/reference.png",
        "kind": "image",
        "name": "reference.png",
        "mimeType": "image/png"
      }
    ]
  }
}

Task state

Estimated base credits

1

Status

queued

API documentation

Read authentication, request bodies, responses, idempotency, model parameters, and error codes.

Open docs

API key management

Create, copy once, revoke, and rotate API keys from the protected Settings area.

Manage keys

Online debugging

Use mock examples first; real debugging requires login, an API key, and account credits.

Preview flow