Rivya API Overview
Use Rivya API v1 to call Rivya generation and chat models from your own product with API keys, account credits, and optional SSE streaming.
Last reviewed on 2026/05/11
Rivya API v1 is the developer entry point for calling Rivya model capabilities from your own product.
The public API supports asynchronous image, video, and audio generation plus Chat API turns with non-streaming or SSE streaming responses. It uses Rivya model IDs, Rivya account credits, public task IDs for generation, and server-side chat sessions for Chat API.
What The API Is For
Use the API when you want to:
- submit image, video, or audio generation jobs from your own app
- send non-streaming or streaming chat turns and continue API-created chat sessions
- keep billing inside the same Rivya account credit wallet
- poll task status by public task ID
- use idempotent retries for safer production requests
- keep Studio and API usage under the same account boundary
The API is a Rivya product layer. Public responses use Rivya names and public fields only.
Current Version Scope
Current v1 endpoints:
GET /api/v1/modelsPOST /api/v1/generationsPOST /api/v1/filesGET /api/v1/files/{fileId}POST /api/v1/chat/completionsGET /api/v1/chat/sessionsGET /api/v1/chat/sessions/{sessionId}GET /api/v1/generations/{taskId}GET /api/v1/creditsGET /api/v1/webhooksPOST /api/v1/webhooksGET /api/v1/webhook-eventsGET /api/v1/openapi.json
The current version includes signed webhooks for asynchronous generation results, Chat API, and a TypeScript SDK beta with server-side streaming support.
Authentication
Generation, status, and credit endpoints require:
Authorization: Bearer rvya_sk_...Create and rotate keys from API Keys settings. Read API Authentication before using a key in production.
Billing Model
API calls use the same Rivya account credits as Studio.
Generation jobs reserve or consume credits when the task starts. Chat turns reserve credits before the model call and settle final credits from token usage when the assistant message is saved. If a generation or chat turn fails under the existing Rivya failure rules, the same refund handling applies.
Read API Credits and Credits & Billing in Rivya for the user-facing wallet model.
First Integration Path
- Create an API key in Settings.
- Call List API Models to choose a public model ID.
- Read Model API Reference for the model's parameters.
- If the model needs reference media, upload it with Files API.
- Submit a job with Create Generation.
- Poll Generation Status until the task succeeds or fails, or subscribe to API Webhooks for signed completion events.
- For chat models, use Chat API instead of the generation endpoint. Chat image attachments must reference Files API
file_idvalues.