Frameworks and SDKs

Frameworks and SDKs

Because the gateway serves the real OpenAI and Anthropic wire protocols, any framework that
accepts a custom base URL works. This page lists the ones people ask about, with the one
setting that matters for each.

OpenAI SDK

from openai import OpenAI

client = OpenAI(api_key="sk-...", base_url="https://hisoka.ai/api/v1")

Full examples for Python and Node: Plain SDKs.

Anthropic SDK

from anthropic import Anthropic

client = Anthropic(api_key="sk-...", base_url="https://hisoka.ai/api/v1")

LangChain

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="glm-5.3-flash",
    api_key="sk-...",
    base_url="https://hisoka.ai/api/v1",
)

ChatOpenAI is the right class even though the model is not from OpenAI: it speaks the
OpenAI chat protocol, which is what the gateway serves.

LlamaIndex

from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    model="glm-5.3-flash",
    api_base="https://hisoka.ai/api/v1",
    api_key="sk-...",
    is_chat_model=True,
)

OpenAILike exists for exactly this case: a compatible endpoint that is not the OpenAI one.

Vercel AI SDK

import { createOpenAI } from "@ai-sdk/openai";

const hisoka = createOpenAI({
  baseURL: "https://hisoka.ai/api/v1",
  apiKey: process.env.HISOKA_API_KEY,
});

const result = await hisoka("glm-5.3-flash").generateText({
  prompt: "Name three prime numbers.",
});

LangGraph and agent frameworks

Any framework built on LangChain’s model interface inherits the setup above. The gateway
passes tools through unchanged, including tool_choice, so an agent loop behaves the same
as it would against a single provider.

Check tool_choice before blaming the gateway

An agent that repeats the same tool forever is usually forcing
tool_choice: "required", which forbids the model from answering without a tool call. See
Tool calling.

Observability tools

Tracing tools that read the OpenAI wire format work if they let you set a base URL. The
response carries the standard usage block plus our hisoka block, and every response has
an X-Request-Id you can correlate with a support report.

Anything else

If a tool accepts a custom OpenAI-compatible base URL, it works. The setting is always the
same three values:

Setting Value
Base URL https://hisoka.ai/api/v1
API key your sk-... key
Model an id from GET /api/v1/models

If a tool requires a provider from a fixed list and offers no override, it cannot be
pointed here; use it through an SDK instead.