https://api.taotok.io is a production-grade LLM API gateway deployed on Hong Kong edge infrastructure, providing protocol conversion for GPT, Claude, Gemini, and other mainstream LLMs under a single OpenAI-compatible endpoint. It abstracts heterogeneous native API formats of different model vendors, unifies request/response schema, and integrates built-in traffic governance, token statistics, and multi-key failover scheduling.
Core technical capabilities:
export API_KEY="sk-xxxxxxxxxxxxxxxxxxxx"
curl https://api.taotok.io/v1/models \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json"
Returns structured model metadata including GPT-4o, Claude 3 Opus, Gemini Advanced, model context window limits and routing labels.
curl https://api.taotok.io/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a backend development engineer"},
{"role": "user", "content": "Implement a token statistical middleware for LLM gateway"}
],
"temperature": 0.6,
"max_tokens": 1024
}'
from openai import OpenAI
# Override base_url to taotok unified gateway endpoint
client = OpenAI(
api_key="sk-xxxxxxxxxxxxxxxxxxxx",
base_url="https://api.taotok.io/v1"
)
def sync_chat():
resp = client.chat.completions.create(
model="claude-3-opus",
messages=[
{"role": "user", "content": "Explain multi-key load balancing logic for LLM proxy"}
],
stream=False
)
# Parse token usage statistics
prompt_tokens = resp.usage.prompt_tokens
completion_tokens = resp.usage.completion_tokens
print(f"Input tokens: {prompt_tokens}, Output tokens: {completion_tokens}")
print(resp.choices[0].message.content)
sync_chat()
import OpenAI from "openai";
const openai = new OpenAI({
apiKey: "sk-xxxxxxxxxxxxxxxxxxxx",
baseURL: "https://api.taotok.io/v1"
});
async function streamChat() {
const stream = await openai.chat.completions.create({
model: "gemini-advanced",
messages: [{ role: "user", content: "Write a stream response parser for SSE" }],
stream: true
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}
}
streamChat();
The gateway builds a multi-layer upstream key pool scheduler:
All requests record prompt_tokens and completion_tokens separately, with persistent log storage. The backend provides aggregated API for consumption statistics, supporting custom billing rules based on model dimension, which can be docked to internal financial settlement systems.