メインコンテンツへスキップ
ANTHROPIC PROTOCOL

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.

Why Standard APIs & Subscriptions Break Here

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.

How bf16.ai Solves This Workflow

  • 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.

Recommended Model Split

Smart Alias: bf16/auto:coding
Primary Model
GLM-5.3 Uncensored
zai-org/glm-5.3-uncensored
$1.35 in · $0.250 cached · $4.20 out / 1M · 1M tokens

Flagship architecture refactoring, Claude Code & Codex sessions

Secondary / Fast Subagent
GLM-5.3 Flash Uncensored
zai-org/glm-5.3-flash-uncensored
$0.30 in · $0.065 cached · $1.12 out / 1M · 1M tokens

Strict JSON Schema extraction, Browser-Use UI agents, DevSecOps

Copy-Paste Production Config

Official @anthropic-ai/sdk pointed at bf16.ai

anthropic-client.ts
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.

関連ガイドと比較

ユースケース一覧

Not affiliated with Anthropic, OpenAI, Google, Z.ai, Moonshot AI, DeepSeek, or any third-party provider listed on this page. All trademarks belong to their respective owners. "bf16" is a brand name, not a statement about numeric precision. Third-party reference rates are public approximations; check official pricing pages for exact current terms.