API reference
List models
GET /v1/models lists the models your API key can call, in the OpenAI list format.
On this page
Lists the models your key can call, with their limits, capabilities, and prices. Every listed model has a published price.
Request
This endpoint takes no request body.
curl https://api.larasrouter.com/v1/models \
-H "Authorization: Bearer $LARAS_API_KEY"
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.larasrouter.com/v1",
api_key=os.environ["LARAS_API_KEY"],
)
for model in client.models.list():
print(model.id)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.larasrouter.com/v1",
apiKey: process.env.LARAS_API_KEY,
});
for await (const model of client.models.list()) {
console.log(model.id);
}
Response body
objectstringAlways
list.dataarrayThe models.
idstringModel ID to send as
model, e.g.deepseek-flash.objectstringAlways
model.createdintegerUnix timestamp in seconds.
owned_bystringAlways
larasrouter.context_lengthintegerContext window in tokens, shared by the prompt and the output.
max_output_tokensintegerThe largest
max_tokens(ormax_completion_tokens) accepted. A larger value is rejected with400 max_tokens_exceeded.default_output_tokensintegerThe output cap applied when you omit
max_tokens.capabilitiesobjectWhat the gateway accepts for this model.
falsemeans a request that uses the feature is rejected.pricingobjectThe fixed price, in USD per
unit_tokenstokens, as exact decimal strings (at least three decimals). The names differ from per-token fields such as OpenRouter’spromptandcompletionso the units cannot be mixed up.
{
"object": "list",
"data": [
{
"id": "deepseek-flash",
"object": "model",
"created": 1760241600,
"owned_by": "larasrouter",
"context_length": 1000000,
"max_output_tokens": 384000,
"default_output_tokens": 8192,
"capabilities": {
"streaming": true,
"tools": true,
"json_output": true,
"thinking": true,
"vision": false
},
"pricing": {
"version": "deepseek-flash-2026-09-v1",
"currency": "USD",
"unit_tokens": 1000000,
"input_cache_hit": "0.010",
"input": "0.400",
"output": "1.600"
}
}
]
}
id, object, created, and owned_by are the standard OpenAI model fields, so OpenAI SDKs parse the object as usual. The other fields are Laras Router extensions: the limits the gateway enforces, the features it accepts, and the price it charges, read from the same catalogue that prices your requests.
Responses
| Code | Type | Meaning |
|---|---|---|
invalid_api_key | invalid_request_error | The key is missing, malformed, revoked, or unknown. |
| Code | Type | Meaning |
|---|---|---|
billing_unavailable | api_error | Retry later. |