Dynamic models
Model identifiers, vendor pricing, and availability change frequently. Do not hardcode static price tables in your application for Rikaii metered planning.
Instead, call the public catalog endpoint and cache the result with a short TTL.
Endpoint
http
GET /v1/modelsFull URL: https://api.rikaii.com/v1/models
Authentication: Not required (GET /v1/models is public).
Response shape
The response body is a JSON array (root-level [ … ]). Each element describes one active catalog row:
| JSON key | Type | Description |
|---|---|---|
modelSlug | string | Rikaii routing slug — use this in model, Dashboard rules, and logs. |
provider | string | Upstream vendor name (for example OPENAI, ANTHROPIC). |
upstreamModelId | string | Vendor’s native model identifier for that SKU. |
inputPricePerMRetail | number | Retail USD per million input tokens, after the 4% platform markup applied to wholesale. |
outputPricePerMRetail | number | Retail USD per million output tokens, after the same markup. |
isByokOnly | boolean | When true, the model cannot be served with Rikaii-managed platform keys. The client must configure BYOK with routing enabled for that provider; otherwise POST /v1/chat/completions returns 403 with error.code byok_required. When false, PAYG traffic may use platform keys subject to routing rules. |
Numeric fields are decimal values (scaled to six fractional digits in responses).
Example response (truncated)
json
[
{
"modelSlug": "gpt-4o-mini",
"provider": "OPENAI",
"upstreamModelId": "gpt-4o-mini",
"inputPricePerMRetail": 0.165000,
"outputPricePerMRetail": 0.686400,
"isByokOnly": false
},
{
"modelSlug": "claude-opus-4",
"provider": "ANTHROPIC",
"upstreamModelId": "claude-opus-4-20250514",
"inputPricePerMRetail": 18.000000,
"outputPricePerMRetail": 90.000000,
"isByokOnly": true
}
]How to use this in production
- Fetch
GET https://api.rikaii.com/v1/modelsat startup and on a schedule (for example every 15–60 minutes). - Index rows by
modelSlugfor validation and UX (dropdowns, internal tooling). - Budget using
inputPricePerMRetailandoutputPricePerMRetail— these already include the 4% platform layer on wholesale. - Context windows and tool support are defined by each vendor for
upstreamModelId. The catalog endpoint intentionally focuses on identity and economics; consult provider documentation for context length, vision, and tool limits.