Skip to content

Anthropic

Overview

Anthropic builds the Claude family of AI models, known for strong instruction following, safety, and long-context performance. Floopy automatically translates OpenAI-format requests to the Anthropic Messages API, so no code changes are needed.

Supported Models

ModelContext WindowNotes
claude-opus-4-6200KMost capable Claude model
claude-sonnet-4-6200KBalanced performance and cost
claude-sonnet-4-5200KPrevious generation Sonnet
claude-haiku-4-5200KFast and affordable
claude-3-5-haiku-20241022200KLegacy Haiku
claude-3-opus-20240229200KLegacy Opus

Setup

  1. Go to Settings > Providers in the dashboard.
  2. Click Add provider and select Anthropic.
  3. Paste your Anthropic API key and click Save.

Usage

import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.floopy.ai/v1",
apiKey: process.env.FLOOPY_API_KEY,
});
const response = await client.chat.completions.create({
model: "claude-sonnet-4-6",
messages: [{ role: "user", content: "Explain quantum computing." }],
});

Provider-Specific Features

  • Automatic format translation — Floopy converts OpenAI chat completion format to the Anthropic Messages API and back. System messages, tool use, and multi-turn conversations are all supported.
  • Long context — All Claude models support 200K token context windows. Floopy passes the full context through without truncation.

Fallback

Route to OpenAI if Anthropic is unavailable:

Terminal window
curl https://api.floopy.ai/v1/chat/completions \
-H "Authorization: Bearer $FLOOPY_API_KEY" \
-H "x-floopy-fallback-provider: openai" \
-H "x-floopy-fallback-model: gpt-4o" \
-H "Content-Type: application/json" \
-d '{"model": "claude-sonnet-4-6", "messages": [{"role": "user", "content": "Hello"}]}'