Rivya API 개요
API keys, account credits, optional SSE streaming으로 자체 제품에서 Rivya API v1을 사용해 Rivya generation 및 chat models를 호출하세요.
최근 검토일 2026/05/11
Rivya API v1은 자체 제품에서 Rivya model capabilities를 호출하기 위한 developer entry point입니다.
public API는 비동기 image, video, audio generation과 non-streaming 또는 SSE streaming responses가 있는 Chat API turns를 지원합니다. generation에는 Rivya model IDs, Rivya account credits, public task IDs를 사용하고, Chat API에는 server-side chat sessions를 사용합니다.
API가 적합한 작업
다음이 필요할 때 API를 사용하세요.
- 자체 app에서 image, video, audio generation jobs 제출
- non-streaming 또는 streaming chat turns 전송 및 API-created chat sessions 이어가기
- 같은 Rivya account credit wallet 안에서 billing 유지
- public task ID로 task status polling
- 더 안전한 production requests를 위한 idempotent retries 사용
- Studio와 API usage를 같은 account boundary 안에 유지
API는 Rivya product layer입니다. Public responses는 Rivya names와 public fields만 사용합니다.
현재 Version Scope
현재 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
현재 버전에는 비동기 generation results를 위한 signed webhooks, Chat API, server-side streaming support가 있는 TypeScript SDK beta가 포함됩니다.
Authentication
Generation, status, credit endpoints에는 다음이 필요합니다.
Authorization: Bearer rvya_sk_...API Keys settings에서 keys를 만들고 교체하세요. production에서 key를 사용하기 전에 API 인증을 읽으세요.
Billing Model
API calls는 Studio와 같은 Rivya account credits를 사용합니다.
Generation jobs는 task가 시작될 때 credits를 예약하거나 소비합니다. Chat turns는 model call 전에 credits를 예약하고 assistant message가 저장될 때 token usage에서 final credits를 정산합니다. generation 또는 chat turn이 기존 Rivya failure rules에 따라 실패하면 같은 refund handling이 적용됩니다.
사용자-facing wallet model은 API Credits와 Rivya의 크레딧과 결제를 읽으세요.
첫 Integration 경로
- Settings에서 API key를 만듭니다.
- List API Models를 호출해 public model ID를 선택합니다.
- model의 parameters는 Model API Reference를 읽습니다.
- model에 reference media가 필요하면 Files API로 업로드합니다.
- Generation 만들기로 job을 제출합니다.
- task가 성공하거나 실패할 때까지 Generation Status를 poll하거나, signed completion events를 위해 API Webhooks를 구독합니다.
- chat models의 경우 generation endpoint 대신 Chat API를 사용하세요. Chat image attachments는 Files API
file_id값을 참조해야 합니다.