Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Information about an AI model available on OpenRouter

Example Usage

import { Model } from "@openrouter/sdk/models";

let value: Model = {
  architecture: {
    inputModalities: [
      "text",
    ],
    modality: "text->text",
    outputModalities: [
      "text",
    ],
  },
  canonicalSlug: "openai/gpt-4",
  contextLength: 8192,
  created: 1692901234,
  defaultParameters: null,
  id: "openai/gpt-4",
  links: {
    details: "/api/v1/models/openai/gpt-5.4/endpoints",
  },
  name: "GPT-4",
  perRequestLimits: null,
  pricing: {
    completion: "0.00006",
    prompt: "0.00003",
  },
  supportedParameters: [
    "temperature",
    "top_p",
    "max_tokens",
  ],
  supportedVoices: null,
  topProvider: {
    isModerated: true,
  },
};

Fields

FieldTypeRequiredDescriptionExample
architecturemodels.ModelArchitecture:heavy_check_mark:Model architecture information{"input_modalities": ["text"],"instruct_type": "chatml","modality": "text-\u003etext","output_modalities": ["text"],"tokenizer": "GPT"}
canonicalSlugstring:heavy_check_mark:Canonical slug for the modelopenai/gpt-4
contextLengthnumber:heavy_check_mark:Maximum context length in tokens8192
creatednumber:heavy_check_mark:Unix timestamp of when the model was created1692901234
defaultParametersmodels.DefaultParameters:heavy_check_mark:Default parameters for this model{"frequency_penalty": 0,"presence_penalty": 0,"repetition_penalty": 1,"temperature": 0.7,"top_k": 0,"top_p": 0.9}
descriptionstring:heavy_minus_sign:Description of the modelGPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
expirationDatestring:heavy_minus_sign:The date after which the model may be removed. ISO 8601 date string (YYYY-MM-DD) or null if no expiration.2025-06-01
huggingFaceIdstring:heavy_minus_sign:Hugging Face model identifier, if applicablemicrosoft/DialoGPT-medium
idstring:heavy_check_mark:Unique identifier for the modelopenai/gpt-4
knowledgeCutoffstring:heavy_minus_sign:The date up to which the model was trained on data. ISO 8601 date string (YYYY-MM-DD) or null if unknown.2024-10-01
linksmodels.ModelLinks:heavy_check_mark:Related API endpoints and resources for this model.{"details": "/api/v1/models/openai/gpt-5.4/endpoints"}
namestring:heavy_check_mark:Display name of the modelGPT-4
perRequestLimitsmodels.PerRequestLimits:heavy_check_mark:Per-request token limits{"completion_tokens": 1000,"prompt_tokens": 1000}
pricingmodels.PublicPricing:heavy_check_mark:Pricing information for the model{"completion": "0.00006","image": "0","prompt": "0.00003","request": "0"}
supportedParametersmodels.Parameter[]:heavy_check_mark:List of supported parameters for this model
supportedVoicesstring[]:heavy_check_mark:List of supported voice identifiers for TTS models. Null for non-TTS models.<nil>
topProvidermodels.TopProviderInfo:heavy_check_mark:Information about the top provider for this model{"context_length": 8192,"is_moderated": true,"max_completion_tokens": 4096}