Documentation

Quick start

Every request is authenticated with your API key and paid from its token balance. The gateway speaks the Anthropic Messages API and the OpenAI Chat Completions API, so most clients only need a different base URL.

  1. 1Copy your key and base URL from the dashboard.
  2. 2Point your client at the base URL instead of the official API.
  3. 3Send a short test message and check that it appears in History.
Base URL
https://hummbit.space
API key
YOUR_API_KEY
macOS / Linux
curl https://hummbit.space/v1/messages \
  -H "x-api-key: YOUR_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model": "claude-sonnet-5-5", "max_tokens": 256, "messages": [{"role": "user", "content": "Hello"}]}'

Connecting clients

The Connect page has step-by-step settings for each app. The only rule to remember is which URL a client expects.

https://hummbit.spaceClaude Code, Anthropic SDK and most Anthropic / Claude clients — the client adds /v1/messages itself
https://hummbit.space/v1OpenAI-compatible clients (they add /chat/completions), plus OpenCode, Continue and Vercel AI SDK apps
https://hummbit.space/v1/chat/completionsOnly when a field asks for the full endpoint
Good to know
  • •Got a 404? Try the other address variant: add or remove /v1.
  • •x-api-key, Authorization: Bearer and ANTHROPIC_AUTH_TOKEN are equivalent ways to send the key.
  • •Use model ids from GET /v1/models. Short aliases such as sonnet-5.5 also work where claude-* names are rejected.

Pricing and balance

Each request is charged in tokens from your balance. The "Charged" column in History shows the result, and the ⓘ icon next to it shows the calculation.

Charged = (input × weight + output × weight + cache writes × weight + cache reads × weight) × model multiplier

The current weights and model multipliers are listed below and on the Overview page under "Model rates". Failed requests (service errors) are not charged.

API overview

Endpoints

POST /v1/messagesAnthropic Messages API, streaming supported
POST /v1/messages/count_tokensToken count for a request, without generation
POST /v1/chat/completionsOpenAI-compatible chat, streaming supported
POST /v1/responsesOpenAI Responses API (Codex CLI): function and custom tools, streaming; previous_response_id is not supported
GET /v1/modelsModels available to your key

Not available

/v1/embeddings, /v1/filesNot available
/v1/images/generationsNot available through the API; create images and video in the dashboard

Text generation (Anthropic format)

Send messages in the Anthropic format. The official Anthropic SDKs take the base URL without /v1.

Python — anthropic
from anthropic import Anthropic

client = Anthropic(base_url="https://hummbit.space", api_key="YOUR_API_KEY")
msg = client.messages.create(
    model="claude-sonnet-5-5",
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello!"}],
)
print(msg.content[0].text)
TypeScript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({ baseURL: "https://hummbit.space", apiKey: "YOUR_API_KEY" });
const msg = await client.messages.create({
  model: "claude-sonnet-5-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello!" }],
});
Good to know
  • •Prompt caching works as in the Anthropic API; cache reads are about 10× cheaper than regular input.
  • •If a newer Sonnet or Opus returns 400, do not send temperature and top_p together.

OpenAI-compatible format

Any OpenAI-compatible client works with the /v1 base URL and Bearer authentication.

Python — openai
from openai import OpenAI

client = OpenAI(base_url="https://hummbit.space/v1", api_key="YOUR_API_KEY")
r = client.chat.completions.create(
    model="claude-sonnet-5-5",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(r.choices[0].message.content)
curl
curl https://hummbit.space/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "claude-sonnet-5-5", "messages": [{"role": "user", "content": "Hello"}]}'

Errors

Errors come back in the format of the API you called (Anthropic or OpenAI). An error before generation starts costs nothing; you pay only for tokens actually generated.

400Invalid request (check the model id and parameters), or tools / count_tokens is not available for your key
401The key is missing, wrong or revoked
402Not enough tokens for this request — top up, or lower max_tokens
404Unknown endpoint or model
413The request body is too large
429Too many requests at once on this key — wait and retry
500Only in History: a streaming answer was interrupted
501Image generation is not available through the API yet
529Temporary error — retry shortly
5xxTemporary service problem — retry
All error codes with fixes →