docs
API reference
Base URL https://hushwire.vibiz.app. Two formats on the same key: Anthropic Messages (for Claude Code and Anthropic SDKs) and OpenAI Chat Completions (for Cline, Roo, OpenCode, Aider, Continue and OpenAI SDKs).
Quickstart
1. Pick a plan and create a key on the API keys page. 2. Run the test:
curl -s https://hushwire.vibiz.app/v1/messages \
-H "x-api-key: hw_your_key_here" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"hush-coder","max_tokens":32,"messages":[{"role":"user","content":"Reply with: hushwire ok"}]}'curl -s https://hushwire.vibiz.app/v1/chat/completions \
-H "Authorization: Bearer hw_your_key_here" \
-H "content-type: application/json" \
-d '{"model":"hush-coder","messages":[{"role":"user","content":"Reply with: hushwire ok"}]}'Agent-specific configs: the setup guides or the Setup page in your dashboard.
Authentication
Send the key as Authorization: Bearer hw_… or x-api-key: hw_…. Both endpoints accept both. Keys are stored as hashes and shown once.
POST /v1/messages
Anthropic Messages API. Supported: system (string or blocks), text and image content, tools with tool_use / tool_result blocks, tool_choice (auto, any, tool, none), stop_sequences, temperature, top_p and stream: true with the standard event sequence (message_start, content_block_start/delta/stop with text_delta and input_json_delta, message_delta, message_stop). thinking blocks and cache_control are accepted and ignored. POST /v1/messages/count_tokens returns an estimate.
Model: a Hushwire alias. If a client sends a Claude model name, names containing “haiku” map to hush-coder and all others to hush-coder-large; nothing goes to Anthropic. Set ANTHROPIC_MODEL to choose explicitly.
POST /v1/chat/completions
OpenAI Chat Completions. Supported: messages, tools, tool_choice, parallel_tool_calls, response_format, stop, temperature, top_p, seed, penalties, stream and stream_options.include_usage. Fields such as user, store and metadata are dropped and never forwarded. GET /v1/models lists the aliases.
Models
The weight is how many allowance tokens one real token uses. Cached input counts at a quarter.
| Alias | Model | Context | Weight |
|---|---|---|---|
| hush-coder | Qwen3 Coder 30B A3B (Qwen) | 262,144 | 1× |
| hush-coder-large | Qwen3 Coder Next (Qwen) | 262,144 | 3× |
| hush-kimi | Kimi K2.5 (Moonshot AI) | 262,144 | 4× |
| hush-glm | GLM 4.7 (Z.ai) | 200,000 | 4× |
| hush-deepseek | DeepSeek V4 Flash (DeepSeek) | 128,000 | 1× |
Limits
- Solo: 30M tokens a month, 30 requests a minute per key, 2 concurrent streams per key, 1 keys.
- Pro: 100M tokens a month, 60 requests a minute per key, 4 concurrent streams per key, 5 keys.
- Team: 400M tokens a month, 120 requests a minute per key, 8 concurrent streams per key, 25 keys.
max_tokensis clamped to 8,192 (default 4,096 when missing).- The API is closed to free accounts; the playground allows 20 messages a day per network.
Errors
Errors come in the format of the endpoint you called (Anthropic {type:"error",error:{type,message}} or OpenAI {error:{message,type,code}}), and the x-hushwire-error header carries the code. Every message says what failed, why and how to fix it.
| Status | Code | Meaning |
|---|---|---|
| 401 | missing_api_key | No key sent. Use Authorization: Bearer hw_… or x-api-key. |
| 401 | invalid_api_key | Unknown or mistyped key, or not a Hushwire key. |
| 401 | revoked_api_key | The key was revoked. Create a new one. |
| 402 | no_active_plan | The account has no paid plan; the API is closed to free accounts. |
| 404 | model_not_found | Unknown model alias. GET /v1/models lists them. |
| 402 | quota_exceeded | Monthly allowance used. Top up or upgrade; the message says when it resets. |
| 402 | key_cap_reached | This key hit its own monthly cap. Raise the cap or use another key. |
| 429 | rate_limited | Requests per minute over the plan limit. Retry after the retry-after header. |
| 429 | too_many_streams | Too many concurrent requests on this key. |
| 400 | invalid_request | The model rejected the request (format or context length). |
| 503 | model_unavailable | The model’s host is down. We never fall back silently; retry or switch alias. |
| 503 | capacity | Upstream capacity reached; not charged. Retry in a minute. |
| 502 | upstream_error | The inference host errored; not charged. |
What is stored
One row per request: key id, endpoint, model alias, input, output and cached token counts, billed tokens, latency, status, error code, client family (from the user agent) and time. Kept 30 days. No bodies. See the security summary.