Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.inferoute.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

The models endpoint returns every model currently available on TokenHub, along with metadata about each one. Use the id field from this response when specifying the model parameter in your chat, completion, and embedding requests.

Endpoint

GET https://api.tokenhub.ai/v1/models
No request body is required. Include your Authorization header as with all TokenHub requests.

Response fields

object
string
Always "list".
data
object[]
Array of model objects, one per available model.

Example

curl https://api.tokenhub.ai/v1/models \
  --header "Authorization: Bearer YOUR_API_KEY"
Response:
{
  "object": "list",
  "data": [
    {
      "id": "openai/gpt-4o",
      "object": "model",
      "owned_by": "openai",
      "context_window": 128000,
      "capabilities": {
        "chat": true,
        "completions": false,
        "embeddings": false
      }
    },
    {
      "id": "anthropic/claude-3-5-sonnet",
      "object": "model",
      "owned_by": "anthropic",
      "context_window": 200000,
      "capabilities": {
        "chat": true,
        "completions": false,
        "embeddings": false
      }
    },
    {
      "id": "openai/gpt-3.5-turbo-instruct",
      "object": "model",
      "owned_by": "openai",
      "context_window": 4096,
      "capabilities": {
        "chat": false,
        "completions": true,
        "embeddings": false
      }
    },
    {
      "id": "text-embedding-3-small",
      "object": "model",
      "owned_by": "openai",
      "context_window": 8191,
      "capabilities": {
        "chat": false,
        "completions": false,
        "embeddings": true
      }
    },
    {
      "id": "text-embedding-3-large",
      "object": "model",
      "owned_by": "openai",
      "context_window": 8191,
      "capabilities": {
        "chat": false,
        "completions": false,
        "embeddings": true
      }
    },
    {
      "id": "google/gemini-1.5-pro",
      "object": "model",
      "owned_by": "google",
      "context_window": 2097152,
      "capabilities": {
        "chat": true,
        "completions": false,
        "embeddings": false
      }
    }
  ]
}
Filter the data array by capabilities.embeddings === true to get only models that work with the /v1/embeddings endpoint, or by capabilities.chat === true for chat-capable models. This avoids trial-and-error when selecting a model for a specific endpoint.