Docs

List Models

GET/v1/models

Discover the models available to the current API key and route policy.

On this page
  1. Request
  2. Response
  3. Route Policy Behavior
  4. Compatibility Notes

GET /v1/models returns the models available to the current API key.

Use this endpoint for model pickers and saved model configuration.

Request

curl https://api.anypath.dev/v1/models \
  -H "Authorization: Bearer $ANYPATH_API_KEY"
from openai import OpenAI

client = OpenAI(
    api_key="sk-your-api-key",
    base_url="https://api.anypath.dev/v1"
)

models = client.models.list()
for model in models.data:
    print(model.id)
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env.ANYPATH_API_KEY,
  baseURL: 'https://api.anypath.dev/v1',
});

const models = await client.models.list();
console.log(models.data.map((model) => model.id));

Response

{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o-mini",
      "object": "model",
      "created": 0,
      "owned_by": "openai",
      "anypath": {
        "route_policy": {
          "mode": "specified_provider",
          "provider": "OPENAI"
        },
        "provider_types": ["OPENAI"],
        "protocols": ["openai_compatible"],
        "source": "mixed",
        "limits": {
          "rpm": 120,
          "tpm": 100000
        },
        "routeable": true
      }
    }
  ]
}

Route Policy Behavior

Each API key uses either intelligent routing or a specified provider. The model list follows that selection immediately after the key is updated in Console.

Specified provider narrows the supply pool for the key without pinning a single provider key. Effective RPM and TPM are shown in the response when available.

Compatibility Notes

  • id, object, created, and owned_by follow OpenAI-compatible model list conventions.
  • AnyPath-specific fields live under anypath.
  • A model can disappear when it is no longer available to the current key.