List models

List the models your key can use.

Returns the models the current key can call. The list is already filtered by the key's group and model limits, so it reflects what this key can actually use better than the Model Square.

GET https://tokenfunc.com/v1/models

cURL

curl https://tokenfunc.com/v1/models -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx"

Python

from openai import OpenAI

client = OpenAI(base_url="https://tokenfunc.com/v1", api_key="sk-xxxxxxxxxxxxxxxx")
for model in client.models.list():
    print(model.id)

Node.js

import OpenAI from 'openai'

const client = new OpenAI({ baseURL: 'https://tokenfunc.com/v1', apiKey: 'sk-xxxxxxxxxxxxxxxx' })
for await (const model of client.models.list()) {
  console.log(model.id)
}

200

{
  "object": "list",
  "success": true,
  "data": [
    {
      "id": "gpt-5",
      "object": "model",
      "created": 1626777600,
      "owned_by": "openai",
      "supported_endpoint_types": ["openai", "openai-response"]
    },
    {
      "id": "claude-sonnet-4-5",
      "object": "model",
      "created": 1626777600,
      "owned_by": "anthropic",
      "supported_endpoint_types": ["anthropic", "openai"]
    }
  ]
}

Response fields

  • data[].id
    The model name to pass as model
  • data[].owned_by
    The vendor of the model; models without a registered vendor show custom
  • data[].created
    When the record was created (Unix seconds), not the model's release date
  • data[].supported_endpoint_types
    Endpoint formats the model supports. Common values: openai (Chat Completions), openai-response (Responses), anthropic (Messages), gemini (Gemini native), image-generation (image generation), embeddings (embeddings), openai-video (video)

Other formats

The same address answers in the format each SDK expects, based on the headers:

RequestResponse format
Authorization: BearerOpenAI format (above)
Both x-api-key and anthropic-version headersAnthropic format: {"data": [{"id", "display_name", "type": "model", "created_at"}], "first_id", "last_id", "has_more": false}
GET /v1beta/models, or with an x-goog-api-key header / ?key= parameterGemini format: {"models": [{"name", "displayName"}], "nextPageToken": null}