List models

get/v1/models

List the currently available models.

The response format is detected from the request headers:

  • x-api-key together with anthropic-version returns the Anthropic format
  • x-goog-api-key or a key query parameter returns the Gemini format
  • anything else returns the OpenAI format

Authentication

Send your OLETOKEN API key as a Bearer token. Keys are created on the API Keys page of the console.

Authorization: Bearer $OLETOKEN_API_KEY

Parameters

FieldTypeRequiredDescription
keyquerystringGoogle API key (for the Gemini format)
x-api-keyheaderstringAnthropic API key (for the Claude format)
anthropic-versionheaderstringAnthropic API version
x-goog-api-keyheaderstringGoogle API key (for the Gemini format)

Responses

200Models retrieved

FieldTypeRequiredDescription
objectstring
dataModel[]
idstringModel ID
objectstringObject type
createdintegerCreation timestamp
owned_bystringModel owner

401Authentication failed

FieldTypeRequiredDescription
errorobject
messagestringError message
typestringError type
paramstring | nullThe parameter involved
codestring | nullError code

Example request

curl -X GET 'https://api.oletoken.ai/v1/models?key=string' \
  -H "Authorization: Bearer $OLETOKEN_API_KEY" \
  -H 'x-api-key:' \
  -H 'anthropic-version:' \
  -H 'x-goog-api-key:'