Skip to content
Observability

Billing Transparency

SIRAYA Model Router uses a transparent billing system to ensure every call is precisely metered and billed. Pricing differs across models. Each model's list price is published on the Models page. Any discount is agreed individually with SIRAYA for your account; there is no public discount schedule. Discounted amounts appear in your billing logs.

Model Prices

Model prices for each provider are listed on the model detail page.

Billing Items

Chat responses include a usage object with token counts. Responses do not include a cost or cost_details field — on chat, image, or video endpoints. To get the amount charged:

Python:

import requests
import json

response = requests.post(
    url="https://llm.siraya.ai/v1/chat/completions",
    headers={
        "Authorization": "Bearer <API_KEY>",
        "Content-Type": "application/json"
    },
    json={
        "model": "claude-sonnet-4.5",
        "messages": [
            {"role": "user", "content": "What is the meaning of life?"}
        ],
        "max_tokens": 500
    }
)
data = response.json()
usage = data["usage"]

# List prices in USD per 1M tokens, from https://siraya.ai/models/
INPUT_PRICE = 3.00
OUTPUT_PRICE = 15.00

estimated_cost = (
    usage["prompt_tokens"] * INPUT_PRICE
    + usage["completion_tokens"] * OUTPUT_PRICE
) / 1_000_000
print(f"Estimated cost: ${estimated_cost:.6f}")

This estimate prices every prompt token at the normal input price. Cached input tokens (prompt_tokens_details.cached_tokens) are billed at the model's cache-read price, so the estimate is too high when caching applies. Audio, image and video tokens may also have their own prices; see Cost Calculation.

cURL:

curl https://llm.siraya.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <API_KEY>" \
  -d '{
    "model": "claude-sonnet-4.5",
    "messages": [
      {"role": "user", "content": "What is the meaning of life?"}
    ],
    "max_tokens": 500
  }'

Response:

{
  "id": "chatcmpl-qwjFeeUOCGy9ncrWw1rV3pRG",
  "object": "chat.completion",
  "created": 1774794546,
  "model": "claude-sonnet-4.5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "This is one of humanity's oldest questions, and there's no single answer..."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 43,
    "completion_tokens": 384,
    "total_tokens": 427,
    "prompt_tokens_details": {
      "cached_tokens": 0,
      "audio_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 185,
      "audio_tokens": 0,
      "accepted_prediction_tokens": 0,
      "rejected_prediction_tokens": 0
    }
  }
}

reasoning_tokens (185) are included in completion_tokens (384) and billed at the same output price.

Streaming

For streaming requests, the final chunk (the one with an empty choices array) carries usage automatically; the router turns on stream_options.include_usage for you. It has the same shape as a non-streaming usage and does not include a cost field:

data: {"id":"chatcmpl-xxx","object":"chat.completion.chunk","choices":[],"usage":{"prompt_tokens":43,"completion_tokens":384,"total_tokens":427,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":185,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}}}

data: [DONE]

usage

prompt_tokens, completion_tokens, and total_tokens are always present on /v1/chat/completions, and so are prompt_tokens_details (cached_tokens, audio_tokens) and completion_tokens_details (reasoning_tokens, audio_tokens, and the two prediction counters), set to 0 when they do not apply. The other detail fields are omitted when zero. server_tool_use is returned for Gemini and, when the search count is reported, GPT models, but not for Claude on Chat Completions. See Usage Accounting for details.

Item Description
prompt_tokens Total input tokens, includes cached_tokens and cache_creation_tokens
completion_tokens Total output tokens, includes reasoning_tokens
total_tokens prompt_tokens + completion_tokens
prompt_tokens_details.cached_tokens Tokens served from prompt cache
prompt_tokens_details.cache_creation_tokens Tokens written to prompt cache
prompt_tokens_details.cache_creation_token_details Breakdown by TTL: ephemeral_5m_input_tokens, ephemeral_1h_input_tokens
prompt_tokens_details.audio_tokens Audio input tokens
prompt_tokens_details.image_tokens Image input tokens
prompt_tokens_details.video_tokens Video input tokens
completion_tokens_details.reasoning_tokens Tokens used for internal reasoning (e.g., GPT-5.x, Gemini, Claude extended thinking)
completion_tokens_details.audio_tokens Audio output tokens
completion_tokens_details.image_tokens Image output tokens (token-based image models)
server_tool_use.web_search_requests Number of web search requests made (when reported; not returned for Claude on Chat Completions)

Cost Calculation

The formulas below describe how charges are computed. Because responses don't return every detail field, you can only reproduce them exactly for the fields your model reports; use the Request Logs for the authoritative amount.

Input Cost

text_tokens = prompt_tokens - cached_tokens - cache_creation_tokens - audio_tokens - image_tokens - video_tokens

prompt_cost       = text_tokens × input_price
                  + audio_tokens × input_audio_price
                  + image_tokens × input_image_price
                  + video_tokens × input_video_price
cache_read_cost   = cached_tokens × cache_read_price
cache_write_cost  = cache_creation_tokens × cache_write_price

prompt_tokens is the total including all cached and multimodal tokens. We subtract them first, then price each category independently.

Output Cost

By default, all completion tokens (including reasoning and audio) are billed at the unified output_price:

completion_cost = completion_tokens × output_price
reasoning_cost  = 0
audio_cost      = 0

For models that list a separate reasoning price:

completion_cost = (completion_tokens - reasoning_tokens) × output_price
reasoning_cost  = reasoning_tokens × reasoning_price

The same applies to audio_output_price.

Image Generation Cost

Per-image models (e.g., Seedream) are billed per image generated, not per token:

image_cost = n × image_generation_price

Where n is the number of images generated. Image responses carry their own usage shape, when the model reports it: generated_images and output_tokens for Seedream, and input_tokens, output_tokens and total_tokens (with input_tokens_details / output_tokens_details) for token-based models. It is not the chat prompt_tokens / completion_tokens shape.

Token-based image models (e.g., GPT Image 2) are billed per token like chat models.

Video Generation Cost

Video generation models (e.g., Veo 3.1) are billed per second of generated video:

video_cost = seconds × video_second_price

Image (/v1/images/generations) and video (/v1/videos/generations) responses do not include a cost field. Check the Request Logs for the amount charged.

Web Search Cost

native_web_search_cost = web_search_requests × search_price_per_request

Total

cost = prompt_cost + cache_read_cost + cache_write_cost
     + completion_cost + reasoning_cost + audio_cost
     + image_cost + video_cost
     + native_web_search_cost + tools_cost

Cached input tokens are billed at the model's cache-read price and cache writes at its cache-write price. If a discount has been agreed for your account, it is applied to this total as a separate step; the Request Logs show the list price and the discounted price.