Models & Account
List every routable model, and inspect your credit balance and per-key usage.
List models
GET/api/v1/models
Returns every routable model across all categories - the self-describing manifest that powers the marketplace UI and routing. Each entry carries pricing, feature flags, and capability metadata.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| category | "search" | "embedding" | "rerank" | "extract" | "answer" | optional | Filter to a single capability. Omit to list all. |
Response
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | optional | Model slug, e.g. exa/neural. |
| name | string | optional | Human-readable model name. |
| category | string | optional | One of search, embedding, rerank, extract, answer. |
| provider | string | optional | Upstream provider slug. |
| description | string | optional | Short description of the model. |
| pricing | object | optional | USD-string pricing, e.g. { request: "0.005" } or { per_1m_tokens: "0.02" }. -1 = dynamic. |
| search_types | string[] | null | optional | Supported search modes (search models only). |
| features | string[] | optional | Capability flags, e.g. content, domains_filter, dimensions_param. |
| max_results | integer | null | optional | Max results per search request. |
| dimensions | integer | null | optional | Embedding dimensionality. |
| max_input_tokens | integer | null | optional | Max input tokens for embeddings. |
| context_length | integer | null | optional | Context length, where applicable. |
json
{
"data": [
{
"id": "exa/neural",
"name": "Exa Neural Search",
"category": "search",
"provider": "exa",
"description": "Embeddings-based neural web search.",
"pricing": { "unit": "USD", "request": "0.005" },
"search_types": ["neural", "auto"],
"features": ["content", "highlights", "domains_filter", "date_filter"],
"max_results": 100,
"dimensions": null,
"context_length": null,
"max_input_tokens": null
},
{
"id": "openai/text-embedding-3-small",
"name": "OpenAI text-embedding-3-small",
"category": "embedding",
"provider": "openai",
"pricing": { "unit": "USD", "per_1m_tokens": "0.02" },
"features": ["dimensions_param"],
"dimensions": 1536,
"max_input_tokens": 8191
}
]
}bash
curl https://searchrouter.ai/api/v1/models \ -H "Authorization: Bearer $SR_API_KEY" # Filter by category: curl "https://searchrouter.ai/api/v1/models?category=embedding" \ -H "Authorization: Bearer $SR_API_KEY"
ⓘPricing convention. All pricing values are strings in USD per unit (the OpenRouter convention). See Pricing for how cost is metered per request.
Get credits
GET/api/v1/credits
Returns the org-wide credit balance and total spend to date, both in USD.
| Field | Type | Required | Description |
|---|---|---|---|
| total_credits | number | optional | Total credits purchased / granted. |
| total_usage | number | optional | Total spend to date. Remaining = total_credits − total_usage. |
json
{
"total_credits": 100.0,
"total_usage": 12.84
}Get key
GET/api/v1/key
Returns usage and limits for the API key making the request.
| Field | Type | Required | Description |
|---|---|---|---|
| label | string | optional | Human-readable name for the key. |
| usage | number | optional | Total spend attributed to this key, in USD. |
| limit | number | null | optional | Spend ceiling for the key; null = unlimited (bounded by org balance). |
| limit_remaining | number | null | optional | Remaining spend before the key limit is hit. |
json
{
"label": "production",
"usage": 12.84,
"limit": 100.0,
"limit_remaining": 87.16
}Examples
Python
python
import os, requests
base = "https://searchrouter.ai/api/v1"
headers = {"Authorization": f"Bearer {os.environ['SR_API_KEY']}"}
models = requests.get(f"{base}/models", params={"category": "search"}, headers=headers).json()
credits = requests.get(f"{base}/credits", headers=headers).json()
key = requests.get(f"{base}/key", headers=headers).json()
print(len(models["data"]), "search models")
print("remaining:", credits["total_credits"] - credits["total_usage"])
print("key limit remaining:", key["limit_remaining"])JavaScript
javascript
const base = "https://searchrouter.ai/api/v1";
const headers = { Authorization: `Bearer ${process.env.SR_API_KEY}` };
const models = await (await fetch(`${base}/models?category=search`, { headers })).json();
const credits = await (await fetch(`${base}/credits`, { headers })).json();
const key = await (await fetch(`${base}/key`, { headers })).json();
console.log(models.data.length, "search models");
console.log("remaining:", credits.total_credits - credits.total_usage);
console.log("key limit remaining:", key.limit_remaining);