Native Anthropic Messages Endpoint (/v1/messages) for Open-Weight Models
Connect Anthropic SDKs, Claude Code, and MCP tool loops directly to uncensored DeepSeek, GLM, and Kimi models with zero middleware proxies.
Most open-weight inference clouds only expose OpenAI /v1/chat/completions — forcing teams to run brittle local LiteLLM or translation shims that break tool_use IDs, thinking blocks, or prompt-cache headers.
bf16.ai 的架構級解法
- First-class Anthropic Messages implementation at https://api.bf16.ai/v1/messages supporting both x-api-key and Bearer auth.
- Full streaming SSE events, tool_use / tool_result turn handling, and automatic cache-read billing discounts.
- Zero extra proxy hops — lower latency and fewer failure modes in production.
推薦主備模型組合
Flagship architecture refactoring, Claude Code & Codex sessions
Strict JSON Schema extraction, Browser-Use UI agents, DevSecOps
一鍵複製正式環境設定
Official @anthropic-ai/sdk pointed at bf16.ai
import Anthropic from '@anthropic-ai/sdk';
const anthropic = new Anthropic({
baseURL: 'https://api.bf16.ai',
apiKey: process.env.BF16_API_KEY,
});
const msg = await anthropic.messages.create({
model: 'zai-org/glm-5.3-uncensored',
max_tokens: 2048,
messages: [{ role: 'user', content: 'Design a lock-free ring buffer in Rust.' }],
});常見問題解答
Should baseURL include /v1 in the official Anthropic SDK?
No! Pass baseURL: "https://api.bf16.ai" — the Anthropic SDK appends /v1/messages automatically.
Does bf16.ai accept the x-api-key header?
Yes. Both x-api-key: sk-bf16-v1-... and Authorization: Bearer sk-bf16-v1-... are accepted on /v1/messages.
Can I use vision images through /v1/messages?
Yes — multimodal models (DeepSeek V4.1 Flash, GLM-5.3 Flash, Kimi K3.1 Pro) accept Anthropic image content blocks.
延伸閱讀與對比
查看全部實戰場景bf16.ai 与 Anthropic、OpenAI、Google、Z.ai、Moonshot AI、DeepSeek 及本页提及的任何第三方厂商无隶属关系,所有商标归其各自所有者所有。“bf16”为品牌名称,不代表底层数值精度承诺。第三方参考价格为公开估算值,具体请以各厂商官网最新公布为准。