Long context
A strong page fit for document Q&A, repository analysis and multi-step planning.
Access Kimi family models for long-context reading, agent planning, coding and multimodal-ready workflows through one compatible API.
Integrating · catalogued for evaluation while the dedicated route is being wired
Model ID
kimi-k2Base URL
https://thesmartoken.com/v1Input / 1M
$0.6
Output / 1M
$2.5
curl --fail-with-body -sS "https://thesmartoken.com/v1/chat/completions" \
-H "Authorization: Bearer $SMTOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k2",
"messages": [{"role":"user","content":"Reply with exactly OK."}],
"max_tokens": 512
}'Kimi long-context route
OpenAI-compatible model gateway
Client
Your App
SDK, backend, agent or workflow.
SmarToken
Unified API Gateway
kimi-k2
Provider
Kimi K2
Moonshot AI route through SmarToken.
01
Your app
Send a standard Chat Completions request with your SmarToken key.
02
SmarToken gateway
Validate the key, model scope, daily budget and monthly budget.
03
Model route pool
Choose an enabled route by priority and weight. No automatic fallback or cross-provider failover is promised.
04
Moonshot AI
Call kimi-k2, stream the response and record usage.
Example JSON response
200 OK{
"model": "kimi-k2",
"choices": [{
"message": {
"role": "assistant",
"content": "Kimi is useful when your app needs to read longer documents, repositories and research material before answering."
},
"finish_reason": "stop"
}],
"usage": { "prompt_tokens": 10, "completion_tokens": 12, "total_tokens": 22 }
}Fast Deployment
Generate a key and run the Playground in minutes.
Global Access
Use one endpoint for configured China-first routes.
Unified Billing
Track USD token usage and wallet debits together.
Easy Migration
Keep OpenAI SDK shape, change baseURL and model.
Developer Friendly
Copy-ready cURL, Python and Node.js examples.
Model fit
A focused page for evaluating this model as an API route, not just reading a catalog row.
Supplier capabilities described here do not mean every feature is supported by this gateway. Current support is text Chat Completions; tools, structured output and multimodal requests are rejected. Review the gateway contract.
A strong page fit for document Q&A, repository analysis and multi-step planning.
Good for teams prototyping research agents and coding agents that need memory over a larger prompt.
Works behind the same Chat Completions interface used by the rest of SmarToken.
Route fit
Treat kimi-k2 as a route to test against a workload, not just a catalog name.
Kimi K2 is strongest for Long context, agents, research. Validate it with real prompts before making it a default route.
If your workload depends on long context or low cost, compare alternative catalog models with the same prompts.
Long prompts still need careful chunking and cost monitoring.
Kimi specifics
Kimi earns a route when input length dominates the workload. These notes cover where the long-context advantage is real and where a shorter, cheaper route still wins.
Contracts, research reports, meeting archives and multi-file code reading are the natural fit. Send the document set plus a narrow question, and ask for cited spans so reviewers can verify answers quickly.
Input tokens scale cost and latency even when the window fits. For repeated questions over the same corpus, retrieval with smaller prompts often beats resending full documents. Compare cost per useful answer, not context size.
For pure coding value compare DeepSeek first, and for multilingual structured output compare Qwen. Kimi should win the route because prompts are long, not because the model name is familiar.
Why SmarToken
Direct accounts can work once region, billing, model IDs and credentials are settled. SmarToken is built for faster overseas evaluation and safer early production.
One API key works across the Chinese model catalog.
Model IDs, SDK samples and error semantics are written for overseas teams.
Daily, monthly and model-family limits keep experiments predictable.
Usage logs connect model, API key, token estimate, latency and wallet debit.
Code sample
curl
curl --fail-with-body -sS "https://thesmartoken.com/v1/chat/completions" \
-H "Authorization: Bearer $SMTOKEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kimi-k2",
"messages": [{"role":"user","content":"Reply with exactly OK."}],
"max_tokens": 512
}'python
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["SMTOKEN_API_KEY"],
base_url="https://thesmartoken.com/v1", max_retries=0)
response = client.chat.completions.create(
model="kimi-k2",
messages=[{"role": "user", "content": "Reply with exactly OK."}],
max_tokens=512,
)
print(response.choices[0].message.content)
print(response.usage)Node.js (JavaScript)
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.SMTOKEN_API_KEY,
baseURL: "https://thesmartoken.com/v1", maxRetries: 0,
});
const response = await client.chat.completions.create({
model: "kimi-k2",
messages: [{ role: "user", content: "Reply with exactly OK." }],
max_tokens: 512,
});
console.log(response.choices[0].message.content);
console.log(response.usage);Live routes plus a few nearby catalog peers. Browse the full catalog.
| Model | API ID | Context | Input / 1M | Output / 1M |
|---|---|---|---|---|
| Kimi K2 | kimi-k2 | 256K | $0.6 | $2.5 |
| DeepSeek V4.1 Flash | deepseek-v4.1-flash | 1M | $0.3 | $1.2 |
| DeepSeek V4.1 Flash (Vendor Direct) | deepseek-tokenhub-flash | 1M | $0.3 | $1.2 |
| DeepSeek V4 Pro (TokenHub) | deepseek-tokenhub-pro | 1M | $1.74 | $3.48 |
| Kimi K3.1 Pro | kimi-k3.1-pro | 1M | $2 | $10 |
| Kimi K2.7 Code | kimi-k2.7-code | 256K | $0.95 | $4 |
| DeepSeek Flash | deepseek-chat | 1M | $0.3 | $1.2 |
| DeepSeek V4 Pro | deepseek-v4-pro | 1M | $1.32 | $3.96 |
| Kimi K3 | kimi-k3 | 1M | $3 | $15 |
| GLM-5.2 | glm-5.2 | 1M | $1.4 | $4.4 |
| GLM-5.3 | glm-5.3 | 1M | $1.4 | $4.4 |
| MiniMax M2.7 | minimax-m2 | 200K | $0.3 | $1.2 |
| Kimi K2.6 | kimi-k2.6 | 262K | $0.95 | $4 |
| Qwen Plus | qwen-plus | 128K | $1.2 | $4.8 |
| Qwen3.7 Plus | qwen3.7-plus | 1M | $0.276 | $1.101 |
| GLM-4 Flash | glm-4-flash | 128K | $0.8 | $3.2 |
Use baseURL https://thesmartoken.com/v1, authenticate with a SmarToken key, and send model: kimi-k2.
Choose Kimi when long-context reading, planning and document-heavy workflows matter more than the lowest per-token price.
Use cases
Start with a clear workload, then compare routes in Playground before moving traffic into production.
Summarize and query long reports, contracts and technical references.
Use longer context for repository maps, migration notes and issue triage.
Plan multi-step answers from larger source packets.
Condense transcripts, tickets and user feedback into action lists.
Migration
The integration path stays familiar: same Chat Completions shape, one new baseURL and a China-first model ID.
Switch path
Keep the SDK. Change baseURL to SmarToken and switch the model ID.
Switch path
Move from broad routing into a focused Chinese-model console with budgets.
Switch path
Keep Chat Completions while adding China-first model pages and route control.
FAQ
Use the standard OpenAI SDK, set baseURL to https://thesmartoken.com/v1, authenticate with your SmarToken key, and pass model: kimi-k2.
Kimi is a good candidate for long-context reading, research agents and codebase analysis. Test it in the Playground before routing production traffic.
Use the comparison table as a starting point, then run your own prompts because coding, reasoning, latency and cost can vary by upstream route.
Yes. Use your SmarToken key, set baseURL to https://thesmartoken.com/v1, and pass the model ID shown on this page.
Input and output tokens are priced separately in USD per 1M tokens. Final usage is recorded after the provider returns a response or a stream finishes.
Create an account, open the console, generate an API key and copy the cURL, Python or Node.js example from Quickstart.
Yes. Console API keys can be limited by allowed model family plus daily and monthly USD budgets.
Start now
One API key works across the Chinese model catalog.