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

ParameterTypeRequiredDescription
category"search" | "embedding" | "rerank" | "extract" | "answer"optionalFilter to a single capability. Omit to list all.

Response

FieldTypeRequiredDescription
idstringoptionalModel slug, e.g. exa/neural.
namestringoptionalHuman-readable model name.
categorystringoptionalOne of search, embedding, rerank, extract, answer.
providerstringoptionalUpstream provider slug.
descriptionstringoptionalShort description of the model.
pricingobjectoptionalUSD-string pricing, e.g. { request: "0.005" } or { per_1m_tokens: "0.02" }. -1 = dynamic.
search_typesstring[] | nulloptionalSupported search modes (search models only).
featuresstring[]optionalCapability flags, e.g. content, domains_filter, dimensions_param.
max_resultsinteger | nulloptionalMax results per search request.
dimensionsinteger | nulloptionalEmbedding dimensionality.
max_input_tokensinteger | nulloptionalMax input tokens for embeddings.
context_lengthinteger | nulloptionalContext 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.

FieldTypeRequiredDescription
total_creditsnumberoptionalTotal credits purchased / granted.
total_usagenumberoptionalTotal 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.

FieldTypeRequiredDescription
labelstringoptionalHuman-readable name for the key.
usagenumberoptionalTotal spend attributed to this key, in USD.
limitnumber | nulloptionalSpend ceiling for the key; null = unlimited (bounded by org balance).
limit_remainingnumber | nulloptionalRemaining 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);