Skip to main content
bf16.ai Protocol & Gateway Reference

bf16.ai Developer API Documentation

Point any OpenAI SDK, Anthropic SDK, or coding agent at http://localhost:3100 using a sk-bf16-v1-... Bearer key.

1. Supported Wire Endpoints

Method & PathAuth HeaderProtocol Contract
POST http://localhost:3100/v1/chat/completionsAuthorization: Bearer sk-bf16-v1-...OpenAI Chat Completions (SSE streaming, reasoning_content, tools, JSON schema).
POST http://localhost:3100/v1/responsesAuthorization: Bearer sk-bf16-v1-...Stateless OpenAI Responses API (store: false enforced for Zero-Prompt Retention).
POST http://localhost:3100/v1/messagesx-api-key or Bearer sk-bf16-v1-...Native Anthropic Messages wire format with HMAC-signed thinking blocks and tool_use translation.
GET http://localhost:3100/v1/modelsOptional / BearerLive catalog metadata, 1M context limits, and per-token USD rates.

2. Optional Control & Telemetry Headers

  • X-BF16-Max-Price-Per-M-Output: 2.00 — Rejects routing to any endpoint whose output rate exceeds your USD ceiling.
  • X-BF16-Include-Cost: true — Appends settled USD cost in response headers (X-BF16-Cost-USD) and final SSE usage frame.
  • Idempotency-Key: <uuid> — Prevents duplicate non-streaming charges across network retries.

3. Zero-Prompt Retention Guarantee

bf16.ai streams tokens directly through memory without persisting request bodies, system prompts, or model completions to disk or databases. Only token counts, HTTP status codes, and nano-USD ledger postings are logged.