API reference
Retrieve a model
GET /v1/models/{id} returns one model from the priced catalogue, in the OpenAI model format.
On this page
Returns one model from the priced catalogue by its ID. Tools call this to check that a model exists before using it.
Request
This endpoint takes no request body.
curl https://api.larasrouter.com/v1/models/deepseek-flash \
-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"],
)
print(client.models.retrieve("deepseek-flash"))
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.larasrouter.com/v1",
apiKey: process.env.LARAS_API_KEY,
});
console.log(await client.models.retrieve("deepseek-flash"));
Response body
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.streamingbooleanstream: true(Server-Sent Events).toolsbooleantools,tool_choice, andparallel_tool_calls.json_outputbooleanresponse_format: {"type": "json_object"}.thinkingbooleanReasoning is returned in
reasoning_contentand billed as output.visionbooleanImage input. While
false, a message with an image part is rejected with400 unsupported_content.
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.versionstringThe price version, e.g.
deepseek-flash-2026-09-v1. A price change is a new version.currencystringAlways
USD.unit_tokensintegerTokens each price covers:
1000000.input_cache_hitstringPrice of input tokens served from the provider’s cache.
inputstringPrice of input tokens that miss the cache.
outputstringPrice of output tokens, reasoning included.
{
"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 |
|---|---|---|
model_not_found | invalid_request_error | Use deepseek-flash. |
| Code | Type | Meaning |
|---|---|---|
billing_unavailable | api_error | Retry later. |