Files
openrouter-python-sdk-retry…/docs/models/model.md
T
Matt Apperson 5fc522c72f Initial commit: OpenRouter Python SDK
Auto-generated Python SDK for OpenRouter API, providing comprehensive client library with:
- Chat completions and streaming support
- Embeddings API
- Model and provider information
- API key management
- Analytics and usage tracking
- OAuth authentication flows
- Full type hints and error handling
2025-11-13 10:56:25 -05:00

11 KiB
Raw Blame History

Model

Information about an AI model available on OpenRouter

Fields

Field Type Required Description Example
id str ✔️ Unique identifier for the model openai/gpt-4
canonical_slug str ✔️ Canonical slug for the model openai/gpt-4
hugging_face_id OptionalNullable[str] Hugging Face model identifier, if applicable microsoft/DialoGPT-medium
name str ✔️ Display name of the model GPT-4
created float ✔️ Unix timestamp of when the model was created 1692901234
description Optional[str] Description of the model GPT-4 is a large multimodal model that can solve difficult problems with greater accuracy.
pricing models.PublicPricing ✔️ Pricing information for the model {
"prompt": "0.00003",
"completion": "0.00006",
"request": "0",
"image": "0"
}
context_length Nullable[float] ✔️ Maximum context length in tokens 8192
architecture models.ModelArchitecture ✔️ Model architecture information {
"tokenizer": "GPT",
"instruct_type": "chatml",
"modality": "text-\u003etext",
"input_modalities": [
"text"
],
"output_modalities": [
"text"
]
}
top_provider models.TopProviderInfo ✔️ Information about the top provider for this model {
"context_length": 8192,
"max_completion_tokens": 4096,
"is_moderated": true
}
per_request_limits Nullable[models.PerRequestLimits] ✔️ Per-request token limits {
"prompt_tokens": 1000,
"completion_tokens": 1000
}
supported_parameters List[models.Parameter] ✔️ List of supported parameters for this model
default_parameters Nullable[models.DefaultParameters] ✔️ Default parameters for this model {
"temperature": 0.7,
"top_p": 0.9,
"frequency_penalty": 0
}