LLMBase | Docs

Inference

Models

Available models and how to list them via the API.

Updated


LLMBase routes your request to the best available upstream provider automatically. You reference models by their unified ID — provider details are never exposed.

Available models

Model IDContext windowMax outputBest for
zai-org/glm-5131,072 tokens16,384 tokensComplex reasoning, long context, bilingual (ZH/EN)
zai-org/glm-4131,072 tokens8,192 tokensEveryday tasks, fast responses, bilingual (ZH/EN)

Choosing a model

  • zai-org/glm-5 — Use for tasks that require deep reasoning, multi-step instructions, or long documents. Higher quality, slightly more expensive.
  • zai-org/glm-4 — Use for shorter, high-frequency requests where latency and cost matter more than maximum capability.

List models — GET /v1/models

Returns all available models in the OpenAI models format. Requires authentication.

curl https://api.llmbase.ai/v1/models \
  -H "Authorization: Bearer $LLMBASE_API_KEY"

Response

{
  "object": "list",
  "data": [
    {
      "id": "zai-org/glm-5",
      "object": "model",
      "created": 1700000000,
      "owned_by": "zai-org",
      "name": "Z.ai: GLM-5",
      "description": "High-performance bilingual instruction model with strong reasoning capabilities.",
      "context_length": 131072
    },
    {
      "id": "zai-org/glm-4",
      "object": "model",
      "created": 1700000000,
      "owned_by": "zai-org",
      "name": "Z.ai: GLM-4",
      "description": "Efficient bilingual instruction model with strong reasoning and tool-use capabilities.",
      "context_length": 131072
    }
  ]
}

With the OpenAI SDK

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.llmbase.ai/v1",
  apiKey: process.env.LLMBASE_API_KEY,
});

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

Automatic failover

Each model is backed by multiple upstream providers. If the primary provider is unavailable or rate-limited, requests are transparently retried against the next provider. You never need to handle this yourself.