API reference

Retrieve a model

GET /v1/models/{id} returns one model from the priced catalogue, in the OpenAI model format.

On this page
GEThttps://api.larasrouter.com/v1/models/{id}

Returns one model from the priced catalogue by its ID. Tools call this to check that a model exists before using it.

Authentication
Send the key in either header:Authorization: Bearer lr_live_…x-api-key: lr_live_…

Request

This endpoint takes no request body.

curl https://api.larasrouter.com/v1/models/deepseek-flash \
  -H "Authorization: Bearer $LARAS_API_KEY"

Response body

  • idstring

    Model ID to send as model, e.g. deepseek-flash.

  • objectstring

    Always model.

  • createdinteger

    Unix timestamp in seconds.

  • owned_bystring

    Always larasrouter.

  • context_lengthinteger

    Context window in tokens, shared by the prompt and the output.

  • max_output_tokensinteger

    The largest max_tokens (or max_completion_tokens) accepted. A larger value is rejected with 400 max_tokens_exceeded.

  • default_output_tokensinteger

    The output cap applied when you omit max_tokens.

  • capabilitiesobject

    What the gateway accepts for this model. false means a request that uses the feature is rejected.

    • streamingboolean

      stream: true (Server-Sent Events).

    • toolsboolean

      tools, tool_choice, and parallel_tool_calls.

    • json_outputboolean

      response_format: {"type": "json_object"}.

    • thinkingboolean

      Reasoning is returned in reasoning_content and billed as output.

    • visionboolean

      Image input. While false, a message with an image part is rejected with 400 unsupported_content.

  • pricingobject

    The fixed price, in USD per unit_tokens tokens, as exact decimal strings (at least three decimals). The names differ from per-token fields such as OpenRouter’s prompt and completion so the units cannot be mixed up.

    • versionstring

      The price version, e.g. deepseek-flash-2026-09-v1. A price change is a new version.

    • currencystring

      Always USD.

    • unit_tokensinteger

      Tokens each price covers: 1000000.

    • input_cache_hitstring

      Price of input tokens served from the provider’s cache.

    • inputstring

      Price of input tokens that miss the cache.

    • outputstring

      Price of output tokens, reasoning included.

200 OK
{
  "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

200The model.
application/json
401Authentication failed.
application/json
CodeTypeMeaning
invalid_api_keyinvalid_request_errorThe key is missing, malformed, revoked, or unknown.
404The model is not served or has no published price.
application/json
CodeTypeMeaning
model_not_foundinvalid_request_errorUse deepseek-flash.
503The price catalogue is temporarily unavailable.
application/json
CodeTypeMeaning
billing_unavailableapi_errorRetry later.