↓
Rivya AI Docs
Model API guides

Claude Opus 5 API reference

Check Claude Opus 5 availability, inputs, parameters, file requirements, credit pricing, and request examples for Rivya Public API v1. Model ID: claude-opus-5-chat.

Available via APIText input readyChat
API model ID

claude-opus-5-chat

Inputs

text

Files API

Not required for the minimal request

Credit pricing

Base rate per million tokens: 400 credits for input, 2,000 for output The final cost is rounded up to whole credits.

Capability

Chat

API status

Non-streaming and SSE streaming chat

Billing

TOKEN_BASED

Prompt limit

20000 characters

Request fields

Send one message per request. Rivya stores session history; include session_id to continue an API-created conversation. Do not send a messages array.

KeyTypeRequiredDefaultDescription
modelstringYesclaude-opus-5-chatSet model to claude-opus-5-chat.
session_idstringNo-ID of an API-created chat session. Omit it to start a new session.
messagestringYes-The user message for this turn. Rivya loads earlier messages from the API session; do not send a messages array.
attachmentsarrayNo-Optional image attachments as objects containing file_id values from your Files API uploads. Direct image URLs are not accepted, and the model must support images.
enable_web_searchbooleanNofalseOnly applies when the selected chat model supports web search.
reasoning_effortstringNodefaultOptional reasoning_effort value: default, minimal, low, medium, high, or xhigh. Use only values supported by the selected model.
client_request_idstringNo-Optional ID for tracing this request in your system. It does not replace Idempotency-Key.
thought_modestringNodefaultOptional thought_mode: default, on, or off. For models that support thoughts, on enables the option, off disables it, and default uses the model's default behavior. Other models ignore this field.
tool_slugstringNo-Optional slug of an existing Rivya chat tool. Rivya adds the tool's instructions to this turn. If the session already has a tool, omit this field or use the same slug.

Model parameters

Use the shared Chat API fields above. Check chat_capabilities in GET /api/v1/models for this model's web search, image attachments, thoughts, and reasoning support.

Minimal request

{
  "model": "claude-opus-5-chat",
  "message": "Outline three steps for launching a product image campaign."
}

Example response

A non-streaming Chat response includes an assistant message, token usage, credit usage, and settlement status. A completed message does not always mean the credit settlement is final.

{
  "id": "chatcmpl_assistant_message_id",
  "object": "chat.completion",
  "session_id": "chat_session_claude_opus_5_chat",
  "model": "claude-opus-5-chat",
  "created_at": "2026-05-11T00:00:00.000Z",
  "message": {
    "id": "assistant_message_id",
    "role": "assistant",
    "content": "1. Choose the product images. 2. Write the launch posts. 3. Schedule publication and review the results.",
    "created_at": "2026-05-11T00:00:00.000Z"
  },
  "usage": {
    "input_tokens": 1200,
    "output_tokens": 320,
    "total_tokens": 1520
  },
  "credits": {
    "reserved": 0,
    "final": 0,
    "settlement_status": "PENDING"
  }
}

Common errors

validation_failed, insufficient_credits, idempotency_conflict, rate_limited, not_found, chat_model_not_supported, chat_session_conflict, chat_attachment_not_supported

Chat API supports non-streaming and SSE streaming turns in Public API v1. Image attachments are not supported for this chat model.