OpenToken Docs

List models

OpenAI-compatible model listing endpoint — GET /v1/models.

GET /v1/models

Returns the models registered on OpenToken. Use the returned id values as the model field on chat completions.

Request

curl https://api.opentoken.kr/v1/models \
  -H "Authorization: Bearer $OPENTOKEN_API_KEY"
from openai import OpenAI

client = OpenAI(
    base_url="https://api.opentoken.kr/v1",
    api_key=os.environ["OPENTOKEN_API_KEY"],
)

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

const client = new OpenAI({
  baseURL: "https://api.opentoken.kr/v1",
  apiKey: process.env.OPENTOKEN_API_KEY,
});

const models = await client.models.list();
for (const model of models.data) {
  console.log(model.id);
}

The endpoint requires a valid Authorization: Bearer sk-optk-... header. A missing or invalid key returns 401 with an authentication_error.

Response

The response is a list object whose data array holds one entry per registered model. Each entry includes a pricing object (USD per 1M tokens). The list is dynamic — it is derived from the active routing catalog (DB-backed, refreshed periodically) — so the exact set may change over time.

{
  "object": "list",
  "data": [
    {
      "id": "google/gemini-3-flash",
      "object": "model",
      "created": 1704067200,
      "owned_by": "google",
      "pricing": { "input": 0.5, "output": 3.0, "cache_read": 0.05, "cache_write": 0.5 }
    },
    {
      "id": "anthropic/claude-sonnet-4-6",
      "object": "model",
      "created": 1704067200,
      "owned_by": "anthropic",
      "pricing": { "input": 3.0, "output": 15.0, "cache_read": 0.3, "cache_write": 3.75 }
    },
    {
      "id": "google/text-embedding-004",
      "object": "model",
      "created": 1704067200,
      "owned_by": "google",
      "pricing": { "input": 0.025, "output": 0.0, "cache_read": null, "cache_write": null }
    }
  ]
}

Prices are in USD per 1M tokens; cache_read and cache_write are null when the model has no distinct cache price. The created field is a fixed constant (1704067200) for every entry.

Every id uses the {provider}/{model} form and is the exact string to send as model. Any id not in this list is unregistered and returns 400 with a model_not_found code.

The catalog spans Google and Anthropic chat models alongside the google/text-embedding-004 embedding model, which is used via POST /v1/embeddings. See Models for the full list with capabilities and pricing.

Next steps