AnyInt Docs
API Reference

Models API

This route is the source of truth for what your account can use. It should be the first API you call in a new environment.

This route is the source of truth for what your account can use. It should be the first API you call in a new environment.

Published route

GET https://gateway.api.anyint.ai/openai/v1/models

Why this route matters

Use it before hardcoding model IDs. This is the safest way to confirm what your account can access.

Authentication

Use Bearer authentication on the OpenAI-compatible models route:

Authorization: Bearer <ANYINT_API_KEY>

The Anthropic-compatible model list is also available at GET /anthropic/v1/models with x-api-key and anthropic-version headers. Do not use GET /v1/models; it is not a published AnyInt gateway route.

cURL example

curl https://gateway.api.anyint.ai/openai/v1/models \
  -H "Authorization: Bearer $ANYINT_API_KEY"

JavaScript example

const response = await fetch("https://gateway.api.anyint.ai/openai/v1/models", {
  headers: {
    Authorization: `Bearer ${process.env.ANYINT_API_KEY}`,
  },
});

const data = await response.json();
console.log(data.data.map((model) => model.id));

Python example

import os
import requests

response = requests.get(
    "https://gateway.api.anyint.ai/openai/v1/models",
    headers={
        "Authorization": f"Bearer {os.environ['ANYINT_API_KEY']}",
    },
    timeout=30,
)

response.raise_for_status()
for model in response.json()["data"]:
    print(model["id"])

Response fields

FieldMeaning
data[].idThe model ID to use in requests
data[].display_nameHuman-friendly label
data[].typeObject type
data[].created_atPublished timestamp
has_morePagination flag
first_id / last_idCursor-related identifiers
  1. Fetch models during environment setup.
  2. Cache the response in your application or admin UI.
  3. Let users pick from data[].id instead of free-typing a model name.
  4. Re-sync regularly if you depend on newly added models.

Common mistakes

  • Treating a dashboard label as the request model value
  • Assuming every account sees the same model list
  • Calling GET /v1/models instead of the published /openai/v1/models or /anthropic/v1/models compatibility routes

On this page