Fully OpenAI-compatible API · One line of code to switch
https://loyap-innovation.com/v1/
Pass your API Key in the Authorization header:
Authorization: Bearer sk-your-tokenhub-key
| Model Name | Provider | Context | Price (per 1M tokens) |
|---|---|---|---|
| deepseek-chat | DeepSeek | 64K | $0.27 |
| deepseek-v3.2 | DeepSeek | 128K | $0.27 |
| deepseek-r1 | DeepSeek (Reasoning) | 64K | $0.55 |
| qwen-plus | Alibaba Qwen | 131K | $0.11 |
| qwen-max | Alibaba Qwen | 32K | $0.28 |
| glm-4-flash | Zhipu GLM | 128K | Free |
| glm-5 | Zhipu GLM | 128K | $0.14 |
| doubao-pro | ByteDance | 128K | $0.14 |
| doubao-lite | ByteDance | 128K | $0.01 |
| kimi-k2.5 | Moonshot AI | 128K | $0.14 |
| gpt-4o | OpenAI (via proxy) | 128K | $2.50 |
| claude-sonnet-4 | Anthropic (via proxy) | 200K | $3.00 |
500+ more models available. Visit admin panel for the full list.
/v1/chat/completionsfrom openai import OpenAI
client = OpenAI(
api_key="sk-your-tokenhub-key",
base_url="https://loyap-innovation.com/v1/"
)
response = client.chat.completions.create(
model="deepseek-chat",
messages=[
{"role": "system", "content": "You are a helpful AI."},
{"role": "user", "content": "Hello!"}
],
temperature=0.7,
stream=True
)
for chunk in response:
print(chunk.choices[0].delta.content or "", end="")
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: "sk-your-tokenhub-key",
baseURL: "https://loyap-innovation.com/v1/"
});
const stream = await client.chat.completions.create({
model: "deepseek-chat",
messages: [{ role: "user", content: "Hello" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
curl https://loyap-innovation.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-tokenhub-key" \
-d '{
"model": "deepseek-chat",
"messages": [
{"role": "system", "content": "You are a helpful AI."},
{"role": "user", "content": "Hello!"}
],
"temperature": 0.7,
"stream": true
}'
Set stream: true to receive Server-Sent Events (SSE) responses. Fully compatible with OpenAI's streaming format.
Try it without coding: Free Trial → or use the Chat Demo →
Contact us via WeChat: TokenHub_Support