Others
List Models
Get available models list
GET
Introduction
Get the list of currently available models. This interface supports automatic format detection, no manual specification needed.Automatic Format Detection
Automatically returns the corresponding format based on request headers: Anthropic, Gemini, or OpenAI format.Authentication
Bearer Token, e.g.,Bearer sk-xxxxxxxxxx
Request Headers
Response format is automatically detected based on request headers:Returns Anthropic format response
Returns Gemini format response
Default returns OpenAI format response
Code Examples
- cURL
- Python
- Node.js
Response Fields
| Field | Type | Description |
|---|---|---|
| object | string | Fixed as list |
| data | array | Model list |
| data[].id | string | Model unique identifier |
| data[].object | string | Fixed as model |
| data[].created | integer | Model creation timestamp (Unix timestamp) |
| data[].owned_by | string | Model provider (e.g., openai, anthropic, google) |
Response Example
HTTP Status Codes
| Status Code | Description |
|---|---|
| 200 | Request successful |
| 401 | API Key invalid or expired |
| 429 | Request rate too high |
| 500 | Server internal error |
Error Response Example
Notes
- Recommend caching the model list to avoid frequent requests (recommend caching for 1 hour)
- The returned model list dynamically changes based on your API Key permissions
- Can call this interface at application startup for availability check
- The
createdtimestamps of different models may vary significantly, representing model release time only - Python example requires
openailibrary:pip install openai - Node.js example requires
axioslibrary:npm install axios