Documentation · Anthropic Messages

API

Anthropic Messages

Anthropic's native format for Claude models: the official SDK and Claude Code work unchanged.

POST/v1/messages

Request#

Claude models are also available in Anthropic's native Messages format. Give the Anthropic SDK base_url=https://api.flua.ink — without /v1, the SDK appends the path itself.

import os
from anthropic import Anthropic

client = Anthropic(
    base_url="https://api.flua.ink",
    api_key=os.environ["FLUA_API_KEY"],
)

message = client.messages.create(
    model="claude-opus-5-5",
    max_tokens=1024,
    messages=[
        {"role": "user", "content": "Compare Python and Go in three bullet points"},
    ],
)
print(message.content[0].text)

Headers#

  • x-api-key or Authorization: Bearer — your flua key.
  • anthropic-version: 2023-06-01 — the API version; the SDK sends it for you.

Response#

200 OK
{
  "id": "msg_…",
  "type": "message",
  "role": "assistant",
  "model": "claude-opus-5-5",
  "content": [{ "type": "text", "text": "…" }],
  "stop_reason": "end_turn",
  "usage": { "input_tokens": 21, "output_tokens": 188 }
}

Claude Code#

Claude Code talks to the Anthropic API, so two environment variables are enough:

~/.bashrc
export ANTHROPIC_BASE_URL="https://api.flua.ink"
export ANTHROPIC_AUTH_TOKEN="sk-flua-..."
# optional: default model
export ANTHROPIC_MODEL="claude-opus-5-5"
Step-by-step setup, including Windows, is in Integrations.