Rivya AI Docs

API Credits

Understand how Rivya API calls use account credits, balance checks, reserved credits, failed task refunds, and credit troubleshooting.

Last reviewed on 2026/05/10

Rivya API uses the same account credit wallet as Studio.

Use GET /api/v1/credits to read the current balance for the API key's account.

Endpoint

GET https://rivya.ai/api/v1/credits

Required header:

Authorization: Bearer rvya_sk_...

Response

{
  "current_credits": 123
}

Generation Billing

When you submit a generation, Rivya checks whether the account has enough credits.

For image, video, and audio jobs, credits are usually reserved or consumed at task start. The generation response includes:

  • reserved_credits
  • final_credits

final_credits may remain 0 while the job is still queued or processing.

Failed Jobs

If a task fails under Rivya's existing failure rules, refund handling follows the same product policy as Studio.

Use Generation Status to confirm final status and Failed Tasks and Credit Refunds for the product-level failure model.

Common Credit Errors

  • insufficient_credits: the account does not have enough credits
  • api_key_invalid: the API key cannot identify an account
  • public_api_disabled: the public API is temporarily disabled

Table of Contents