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/modelscURL
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[].idThe model name to pass asmodeldata[].owned_byThe vendor of the model; models without a registered vendor showcustomdata[].createdWhen the record was created (Unix seconds), not the model's release datedata[].supported_endpoint_typesEndpoint 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:
| Request | Response format |
|---|---|
Authorization: Bearer | OpenAI format (above) |
Both x-api-key and anthropic-version headers | Anthropic 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= parameter | Gemini format: {"models": [{"name", "displayName"}], "nextPageToken": null} |