Kimi K3 and GLM Integration Guide: Two Domestic Flagships Callable on EXAIV
Kimi K3 and GLM Integration Guide: Two Domestic Flagships Callable on EXAIV
Among open Chinese models, Moonshot's Kimi and Zhipu's GLM represent two different routes: Kimi leads on long context and reasoning, GLM on tool calling and agent scenarios. EXAIV's cloud catalog carries kimi-k3 and glm-5.3-flash — after registering, one API key calls both through the standard OpenAI-compatible endpoint, with no SDK change. This article covers their positioning differences, integration steps, streaming, and the path to running the bigger versions (Kimi-K3.1-Pro, GLM-5.3) locally.
The short version
EXAIV cloud model IDs: kimi-k3 (Moonshot K3) and glm-5.3-flash (Zhipu 5.3 Flash). Integration: set base_url to https://exaiv.com/api/ai/v1, set model to the matching ID, and the rest is identical to OpenAI. For the bigger local versions — Kimi-K3.1-Pro (newest, 2026-11) or GLM-5.3 — go through community GGUF.
Why these two pair well
Kimi and GLM make a good pairing not because they are similar, but because they are complementary:
- Kimi optimizes for reading and reasoning over long inputs — the "understand deeply" half of a workload
- GLM optimizes for acting — deciding which tool to call, in what order, and formatting the result — the "do something" half
Most real applications contain both halves. A support agent reads knowledge-base articles (Kimi) then takes actions in a ticketing system (GLM); a research assistant reads papers (Kimi) then queries APIs for data (GLM). Treating them as one toolbox rather than competing alternatives is what unlocks the routing pattern described above.
Positioning differences
| Dimension | kimi-k3 | glm-5.3-flash |
|---|---|---|
| Vendor | MoonshotAI | Zhipu |
| Upstream open version | Kimi-K3 (770K downloads) | GLM-5.3-Flash (120K downloads) |
| Strengths | Long context, deep reasoning | Tool calling, agents, multilingual |
| Best tasks | Long-document analysis, complex reasoning, writing | Agent orchestration, function calling, everyday chat |
How to choose
If the task is "read something very long and analyze deeply", pick kimi-k3; if it is "make the model call tools and take multi-step actions", pick glm-5.3-flash. Connecting both and routing by task is the most cost-effective setup.
Streaming behavior differences
Both models stream, but their behavior differs in ways that matter for product design:
- kimi-k3 tends to produce longer, more structured answers, so streaming gives a bigger perceived-latency win on reading-heavy tasks
- glm-5.3-flash responds faster per token, which suits interactive loops and agent-style back-and-forth
For a mixed workload, a practical pattern is: stream kimi-k3 for document Q&A and writing surfaces, and run glm-5.3-flash with streaming for tool-heavy agent loops where each turn is short.
One caveat applies to both: when finish_reason is length, the answer was truncated by the token limit — mark it as partial in your UI rather than presenting it as complete.
A worked example: document QA with tool calling
A concrete pattern that uses both models together: an agent that answers questions about a long document.
- glm-5.3-flash receives the user question and decides whether it needs to look something up, calling a
search_documenttool - The tool retrieves relevant passages from the document store
- kimi-k3 receives the retrieved passages plus the question, and produces the final analysis — its long-context strength handles dense source text
- glm-5.3-flash formats and returns the answer, optionally calling a citation tool
This split plays to each model's strength: GLM for orchestration, Kimi for heavy reading. It also keeps Kimi's larger per-token cost focused on the one step where it adds the most value.
# Pseudocode: orchestrate both models
def doc_qa(question, doc_store):
plan = glm.chat(question, tools=[search_tool]) # GLM decides
passages = doc_store.search(plan.tool_args) # retrieve
answer = kimi.chat(question, context=passages) # Kimi reads
return glm.format(answer, citations=plan.citations) # GLM formats
This is a design pattern, not a required architecture — simple deployments can absolutely use one model end to end. But when documents are long and tool flows are complex, the two-model split is where the pairing pays off.
Error handling quick reference
Integration errors follow the same patterns as any OpenAI-compatible endpoint, but with two model-specific notes:
- Model not found (404): verify the ID is
kimi-k3orglm-5.3-flashexactly, and re-check /models — do not substitute HF weight names likemoonshotai/Kimi-K3.1-Pro - Truncated answers (
finish_reason: length): both models can hit the token limit on long outputs; raisemax_tokensor mark the answer partial - 401: the key is shared across all three families, so auth failures are family-independent — fix the key or header once and everything recovers
For the full diagnostic order (Key → URL → model ID → service status), see the dedicated API troubleshooting article.
Monitoring usage across both models
Once you route tasks between two models, add a one-line log per call recording model, input tokens, and output tokens. Within a week you will know:
- What share of traffic actually needs kimi-k3's deep reading versus glm-5.3-flash's fast orchestration
- Whether any task type consistently produces oversized outputs worth trimming
- Where the cost concentration sits, so optimization effort goes where the money is
This is the same habit described in the cost-optimization article, applied to a two-model setup — and it is what turns routing from a guess into a measured policy.
Integration steps
Step 1: get an API key. Register on EXAIV and generate a key in the console (shown once — save it immediately).
Step 2: confirm the endpoint.
| Setting | Value |
|---|---|
| Base URL | https://exaiv.com/api/ai/v1 |
| Chat endpoint | https://exaiv.com/api/ai/v1/chat/completions |
| Auth | Authorization: Bearer <API Key> |
Step 3: call. All IDs (qwen3.8-flash / kimi-k3 / glm-5.3-flash) share the same key and endpoint; switching only changes the model field.
Verify with curl
curl https://exaiv.com/api/ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "kimi-k3",
"messages": [{"role": "user", "content": "Introduce yourself in one sentence"}]
}'
Python
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://exaiv.com/api/ai/v1",
)
# Deep analysis of a long document → Kimi
resp = client.chat.completions.create(
model="kimi-k3",
messages=[{"role": "user", "content": "Summarize the core arguments of this long document"}],
)
# Tool calling / Agent → GLM
resp2 = client.chat.completions.create(
model="glm-5.3-flash",
messages=[{"role": "user", "content": "Check today's weather in Beijing"}],
tools=tools, # your tool definitions
)
Node.js / TypeScript
const client = new OpenAI({
apiKey: process.env.EXAIV_API_KEY,
baseURL: "https://exaiv.com/api/ai/v1",
});
const resp = await client.chat.completions.create({
model: "glm-5.3-flash",
messages: [{ role: "user", content: "Write a quicksort implementation" }],
});
Streaming and tool calling
Both models support streaming (stream=true, read delta.content in chunks) and tool calling (tools definitions plus tool_calls responses), in OpenAI-compatible format. For details, see the dedicated streaming and tool-calling article.
Divide work by model traits:
- Streaming chat experience: kimi-k3 produces more coherent long answers
- Agent tool loops: glm-5.3-flash's tool calling is its strength
- Hybrid orchestration: GLM decides which tools to call, then Kimi processes the long-document results
Running bigger versions locally
EXAIV's cloud serves hosted versions; to run the open originals or larger scales locally:
Kimi line (moonshotai org):
| Model | Downloads | Notes |
|---|---|---|
| Kimi-K3 | 770K | The K3 original — the open version behind EXAIV's kimi-k3 |
| Kimi-K3.1-Pro | Newest, 2026-11 | The next-generation Pro of K3 |
| Kimi-K2.7-Code | 85K | Coding-specialized |
| Kimi-Linear-48B-A3B | 51K | Linear-attention architecture MoE |
GLM line (zai-org org):
| Model | Downloads | Notes |
|---|---|---|
| GLM-5.3-Flash-BF16 | 120K | The open version behind EXAIV's glm-5.3-flash |
| GLM-5.3-BF16 | 40K | Standard version |
Local deployment goes through community GGUF with Ollama/llama.cpp, using the same steps as Qwen local deployment (download GGUF → Modelfile → ollama create).
The local version is not the same thing as the cloud version
Kimi-K3.1-Pro is the open weight on HF; EXAIV's kimi-k3 is the platform's served model — same lineage but deployment shape and context configuration may differ. Local is for privacy and zero call cost; cloud is for stable service and elastic scaling. On migration, replay the same prompts on both ends once to verify.
Best practice: route by task
Splitting tasks between the two models is cheaper and more stable than using one for everything:
def pick_model(task):
if task.get("needs_tools"):
return "glm-5.3-flash" # tool calling, agent orchestration
if task.get("long_context") or task.get("deep_reasoning"):
return "kimi-k3" # long documents, deep reasoning
return "glm-5.3-flash" # default: faster and cheaper
MODEL = pick_model({"needs_tools": True})
print("using:", MODEL)
Model IDs follow the catalog
kimi-k3 and glm-5.3-flash are the real IDs in EXAIV's catalog at the time of writing. The catalog updates with upstream releases; verify current IDs on /models before integrating to avoid 404s from stale names.
FAQ
Which domestic models can I call on EXAIV?
Is kimi-k3 the same as local Kimi-K3.1-Pro?
Can one key call Qwen, Kimi, and GLM?
Is GLM's tool calling format the same as OpenAI's?
Where is pricing?
What hardware does running K3.1-Pro locally need?
Related reading
- Baidu ERNIE Family Overview — Baidu's open family
- DeepSeek V4 Family Overview — the most-downloaded Chinese family
- Hunyuan hy4 and A13B Local Deployment — Tencent Hunyuan's two lines
- Qwen Streaming and Tool Calling — streaming and tool-calling details
- Qwen API Troubleshooting — debugging call errors