Skip to main content
AnyFast is fully compatible with the Anthropic Messages API. Use the official Anthropic SDK — just change the base URL to AnyFast.

Endpoint

POST https://www.anyfast.ai/v1/messages

Authentication

Include your AnyFast API key as a Bearer token:
Authorization: Bearer YOUR_API_KEY

Quick example

curl https://www.anyfast.ai/v1/messages \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 1024,
    "messages": [
      { "role": "user", "content": "Hello, Claude!" }
    ]
  }'

Supported models

ModelDescription
claude-sonnet-4-6Latest and most capable Sonnet model
claude-sonnet-4-5-20250929Claude Sonnet 4.5
claude-sonnet-4-20250514Claude Sonnet 4
claude-opus-4-6Latest and most capable Opus model
claude-opus-4-5-20251101Claude Opus 4.5
claude-opus-4-1-20250805Claude Opus 4.1
claude-opus-4-20250514Claude Opus 4
claude-haiku-4-5-20251001Fast and cost-effective Haiku model
claude-3-7-sonnet-20250219Claude 3.7 Sonnet
claude-3-5-sonnet-20241022Claude 3.5 Sonnet

Features

  • Extended thinking — Enable deep reasoning with the thinking parameter
  • Streaming — Set stream: true for real-time token streaming via SSE
  • Tool use — Define tools with tools and control usage with tool_choice
  • Vision — Send images via content blocks with type: "image"
  • System prompts — Use the system parameter for context and instructions

Extended thinking example

message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=16000,
    thinking={
        "type": "enabled",
        "budget_tokens": 10000
    },
    messages=[
        {"role": "user", "content": "Solve this step by step: what is 27^(1/3) * 16^(1/4)?"}
    ]
)