基于 Cloudflare Pages + D1 的边缘网关。对外兼容 OpenAI 协议,对内把请求按加权最少使用分发到账号池,429 自动拉黑、跨 UTC 零点自动复活。
https://ai.888706.xyz/v1Authorization: Bearer sk-ws-xxxxxx# curl 直接调 curl https://ai.888706.xyz/v1/chat/completions \ -H "Authorization: Bearer $WORKS_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"你好"}]}'
# OpenAI SDK(JS) import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://ai.888706.xyz/v1", apiKey: process.env.WORKS_KEY, }); const r = await client.chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: "你好" }], stream: true, });
非对话类模型(embedding / 图像 / 语音)可直接打原生路径,body 原样转发:
POST https://ai.888706.xyz/ai/run/@cf/baai/bge-base-en-v1.5
{ "text": ["hello world"] }