ModelsListResponse - TypeScript SDK
ModelsListResponse type definition
The TypeScript SDK and docs are currently in beta. Report issues on GitHub.
List of available models
Example Usage
1 import { ModelsListResponse } from "@openrouter/sdk/models"; 2 3 let value: ModelsListResponse = { 4 data: [ 5 { 6 id: "openai/gpt-4", 7 canonicalSlug: "openai/gpt-4", 8 name: "GPT-4", 9 created: 1692901234, 10 pricing: { 11 prompt: "0.00003", 12 completion: "0.00006", 13 }, 14 contextLength: 8192, 15 architecture: { 16 modality: "text->text", 17 inputModalities: [ 18 "text", 19 ], 20 outputModalities: [ 21 "text", 22 ], 23 }, 24 topProvider: { 25 isModerated: true, 26 }, 27 perRequestLimits: null, 28 supportedParameters: [ 29 "temperature", 30 "top_p", 31 "max_tokens", 32 "frequency_penalty", 33 "presence_penalty", 34 ], 35 defaultParameters: null, 36 }, 37 ], 38 };
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
data | models.Model[] | ✔️ | List of available models | [{"id": "openai/gpt-4","canonical_slug": "openai/gpt-4","name": "GPT-4","created": 1692901234,"description": "GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.","pricing": {"prompt": "0.00003","completion": "0.00006","request": "0","image": "0"},“context_length”: 8192, “architecture”: {"tokenizer": "GPT","instruct_type": "chatml","modality": "text-\u003etext","input_modalities": ["text"],"output_modalities": ["text"]},“top_provider”: {"context_length": 8192,"max_completion_tokens": 4096,"is_moderated": true},“per_request_limits”: null, “supported_parameters”: [ “temperature”, “top_p”, “max_tokens” ], “default_parameters”: null, “knowledge_cutoff”: null, “expiration_date”: null<br />}] |