Skip to main content
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:
string
Returns Anthropic format response
string
Returns Gemini format response
Default returns OpenAI format response

Code Examples

Response Fields

Response Example

HTTP Status Codes

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 created timestamps of different models may vary significantly, representing model release time only
  • Python example requires openai library: pip install openai
  • Node.js example requires axios library: npm install axios