Skip to main content

Overview

The Anthropic Format Converter allows you to call Gemini and OpenAI models using the Anthropic SDK and API format. This is useful when you have existing code using the Anthropic SDK but want to access other providers’ models.

Configuration

SDK Configuration

Set your base URL to:
The SDK automatically appends /v1/messages, so you only need to set the base URL to /anthropic.

cURL / Direct API

For direct API calls, use the full endpoint:

Usage Examples

Supported Models

You can use any Gemini or OpenAI model available on PipeLLM with the Anthropic format:

Feature Support

Gemini 3 Thinking and Thought Signatures

Gemini 3 models return a thoughtSignature on function call parts and reject the next request in the same turn with 400 if the signature is not sent back on the same part. This is a native model requirement; see Google’s Thought signatures guide. How this converter carries signatures:
  • Non-streaming: the signature is returned in the signature field of thinking blocks and in a non-standard signature field on tool_use blocks. It is restored when you send those blocks back unchanged. If your code rebuilds tool_use blocks from id, name, and input only, the signature is lost.
  • Streaming: tool_use blocks do not carry a signature. A signature is only emitted as a signature_delta on a preceding thinking block, which does not restore it to the function call on replay.
Function calling with Gemini 3 models over this format can fail with 400 when tool results are returned, especially with streaming. For Gemini 3 tool use, prefer the native Gemini route or the Responses format.
For Gemini 2.5 models, returning signatures is optional.

Thinking levels

For Gemini 3 targets, enabled thinking.budget_tokens is mapped to a thinking level: up to 1,024 → LOW, 1,025–8,192 → MEDIUM, and above 8,192 → HIGH. This is an approximation, not a Gemini 3 token budget. Gemini 2.5 uses a numeric thinkingBudget. The upstream model must support the mapped level.