Skip to main content
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
Information about a specific model endpoint

Example Usage

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

let value: PublicEndpoint = {
  name: "OpenAI: GPT-4",
  modelName: "GPT-4",
  contextLength: 8192,
  pricing: {
    prompt: "0.00003",
    completion: "0.00006",
  },
  providerName: "OpenAI",
  tag: "openai",
  quantization: "fp16",
  maxCompletionTokens: 4096,
  maxPromptTokens: 8192,
  supportedParameters: [
    "temperature",
    "top_p",
    "max_tokens",
  ],
  uptimeLast30m: 99.5,
  supportsImplicitCaching: true,
  latencyLast30m: {
    p50: 0.25,
    p75: 0.35,
    p90: 0.48,
    p99: 0.85,
  },
  throughputLast30m: {
    p50: 45.2,
    p75: 38.5,
    p90: 28.3,
    p99: 15.1,
  },
};

Fields

FieldTypeRequiredDescriptionExample
namestring:heavy_check_mark:N/A
modelNamestring:heavy_check_mark:N/A
contextLengthnumber:heavy_check_mark:N/A
pricingmodels.Pricing:heavy_check_mark:N/A
providerNamemodels.ProviderName:heavy_check_mark:N/AOpenAI
tagstring:heavy_check_mark:N/A
quantizationmodels.PublicEndpointQuantization:heavy_check_mark:N/Afp16
maxCompletionTokensnumber:heavy_check_mark:N/A
maxPromptTokensnumber:heavy_check_mark:N/A
supportedParametersmodels.Parameter[]:heavy_check_mark:N/A
statusmodels.EndpointStatus:heavy_minus_sign:N/A0
uptimeLast30mnumber:heavy_check_mark:N/A
supportsImplicitCachingboolean:heavy_check_mark:N/A
latencyLast30mmodels.PercentileStats:heavy_check_mark:Latency percentiles in milliseconds over the last 30 minutes. Latency measures time to first token. Only visible when authenticated with an API key or cookie; returns null for unauthenticated requests.
throughputLast30mmodels.PercentileStats:heavy_check_mark:N/A