id field from this response when specifying the model parameter in your chat, completion, and embedding requests.
Endpoint
GET https://api.inferoute.ai/v1/models
Authorization header as with all Inferoute requests.
Response fields
string
Always
"list".object[]
Array of model objects, one per available model.
Show properties
Show properties
string
The model identifier to use in API requests. Typically in
provider/model-name format, e.g. openai/gpt-4o or anthropic/claude-3-5-sonnet.string
Always
"model".string
The provider that owns this model, e.g.
openai, anthropic, google, meta.integer
Maximum number of tokens the model can process in a single request (prompt + completion combined).
Example
curl https://api.inferoute.ai/v1/models \
--header "Authorization: Bearer YOUR_API_KEY"
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://api.inferoute.ai/v1",
)
models = client.models.list()
for model in models.data:
print(model.id)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "YOUR_API_KEY",
baseURL: "https://api.inferoute.ai/v1",
});
const models = await client.models.list();
for (const model of models.data) {
console.log(model.id);
}
{
"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.