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
keyquerystring—Google API key (for the Gemini format)
x-api-keyheaderstring—Anthropic API key (for the Claude format)
anthropic-versionheaderstring—Anthropic API version
x-goog-api-keyheaderstring—Google API key (for the Gemini format)

Responses

200Models retrieved

FieldTypeRequiredDescription
objectstring——
dataModel[]——
idstring—Model ID
objectstring—Object type
createdinteger—Creation timestamp
owned_bystring—Model owner

401Authentication failed

FieldTypeRequiredDescription
errorobject——
messagestring—Error message
typestring—Error type
paramstring | null—The parameter involved
codestring | null—Error 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:'