Skip to content
AI Dev Toolkit.
Esc
  • AI Token CounterCount tokens for GPT, Claude, Gemini, DeepSeek, Qwen and more.Tool
  • LLM API Cost CalculatorEstimate per-request, daily and monthly API costs.Tool
  • AI Model ComparisonCompare prices, context windows and features across models.Tool
  • AI Model Pricing PagesSpecs, real costs and cheaper alternatives for popular models.Tool
  • Context Window CheckerSee whether your text fits each model’s context window.Tool
  • Subscription vs API CalculatorFind out whether a chat plan or the API is cheaper for you.Tool
  • GPU / VRAM CalculatorCheck how much VRAM a local model needs and which GPUs fit.Tool
  • Prompt Caching CalculatorEstimate savings from prompt caching.Tool

Utilities

Chat format converter: OpenAI to Anthropic and Gemini

Paste an OpenAI, Anthropic or Gemini request and get the same conversation in another API’s format: system prompt, images, tools, tool calls and results, JSON output and sampling settings. Every field that doesn’t map is listed. It’s free and runs in your browser.

Try:

Converted in your browser. Nothing you paste is sent anywhere, so API keys and data stay on your device.

Converted OpenAI Chat Completions to Anthropic Messages. (Source detected automatically.) 1 warning.

Changed, dropped or worth checking (1)

  • Anthropic has deprecated sampling settings: models released after Claude Opus 4.6 reject temperature other than 1.0, top_p below 0.99, and any top_k. Remove them for current models.temperature

Good to know (1)

  • Model IDs differ between providers, so gpt-6-astra was replaced with MODEL_ID. Replace it with a model ID from Anthropic.model

POST https://api.anthropic.com/v1/messages

Anthropic Messages request
{
  "model": "MODEL_ID",
  "max_tokens": 800,
  "system": "You are a support assistant for a bike shop. Check stock before you answer.",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "What part is this, and do you have it in stock?"
        },
        {
          "type": "image",
          "source": {
            "type": "base64",
            "media_type": "image/png",
            "data": "iVBORw0KGgo="
          }
        }
      ]
    },
    {
      "role": "assistant",
      "content": [
        {
          "type": "tool_use",
          "id": "call_abc123",
          "name": "check_stock",
          "input": {
            "part": "rear derailleur"
          }
        }
      ]
    },
    {
      "role": "user",
      "content": [
        {
          "type": "tool_result",
          "tool_use_id": "call_abc123",
          "content": "{\"in_stock\":true,\"quantity\":4}"
        }
      ]
    }
  ],
  "tools": [
    {
      "name": "check_stock",
      "description": "Look up how many of a part the shop has in stock.",
      "input_schema": {
        "type": "object",
        "properties": {
          "part": {
            "type": "string"
          }
        },
        "required": [
          "part"
        ],
        "additionalProperties": false
      },
      "strict": true
    }
  ],
  "temperature": 0.2
}

Steps

How to use the chat format converter

  1. Paste a request body, or just its messages, input or contents array.
  2. Leave “From” on automatic detection, or pick the source format.
  3. Choose the target format in “To”.
  4. Read the notes, fixing anything under “Needs your attention”, then copy or download the converted request.

Method

How it works

OpenAI, Anthropic and Google all model a chat as a list of turns, but they disagree on almost every detail: where the system prompt lives, what the roles are called, how images are encoded and how a tool call and its result are written. The converter reads your request into one neutral conversation, then writes that conversation out in the target format, so every direction uses the same rules.

The differences that break conversions

OpenAI’s Chat Completions puts the system prompt in the message list and sends tool arguments as a string of JSON; Anthropic and Gemini want a separate system field and an arguments object. OpenAI gives each tool result its own tool message, while Anthropic and Gemini put results inside a user turn. Anthropic needs every result for a set of parallel calls in the very next user message, with the tool_result blocks before any text, so the converter merges and reorders turns. Images move from one data: URL to separate media type and base64 fields. For the full background, read OpenAI vs Anthropic vs Gemini message formats.

Gemini details

A Gemini functionResponse needs the function’s name, which an OpenAI tool message doesn’t carry, so the converter looks it up from the matching call. Its response must be an object: JSON objects pass through, and anything else is wrapped as {"result": …}, as in Google’s own example. Tool schemas go in parametersJsonSchema, because the older parameters field takes only an OpenAPI subset: in our test on 12 October 2026 the API rejected an additionalProperties key there, which OpenAI’s strict schemas always include. For calls Gemini didn’t make, the converter adds the skip_thought_signature_validator placeholder that Google documents.

Anthropic details

Anthropic requires max_tokens; if your source has no limit, 4,096 is written and flagged so you can set your own. Tool IDs must match ^[a-zA-Z0-9_-]+$, so other characters are replaced, the same way in the call and its result. Forcing a tool (any or tool) returns a 400 error on Claude Opus 5.5, Sonnet 5.5, Fable 5.1 and Mythos 5.1, so that mapping comes with a warning.

What it doesn’t do

It converts requests, not replies, and it doesn’t translate model IDs: a model from another provider becomes MODEL_ID for you to fill in from the model ID reference. Reasoning blocks, file uploads, audio and built-in tools are left out with a note. If a tool call’s arguments aren’t valid JSON, they become {} with an error, and JSON repair can fix them first.

How we checked it

Every mapping was checked on 12 October 2026 against OpenAI’s published OpenAPI specification, Anthropic’s Messages API reference and Google’s v1beta discovery document. Sample outputs passed the request types in the official openai and Anthropic TypeScript SDKs, and Gemini outputs were sent to the API without a key: Google parses the body before it checks the key, so an authentication error rather than a 400 shows every field name was accepted. That test also showed a trap in Google’s own guide: its newer responseFormat.text.mimeType rejects the "application/json" the guide shows (it wants APPLICATION_JSON), so the converter writes the long-standing responseMimeType and responseJsonSchema pair instead.

Examples

Worked examples

Where each piece of a request goes, as the converter writes it
PieceOpenAI Chat CompletionsOpenAI ResponsesAnthropic MessagesGemini generateContent
System promptdeveloper or system messageinstructionssystemsystemInstruction
Turnsmessagesinput itemsmessagescontents (roles user, model)
Image, inlineimage_url with a data: URLinput_image with a data: URLimage block, source.type: base64inlineData part
Image, by URLimage_url with the URLinput_image with the URLimage block, source.type: urlfileData part with fileUri
Tool definitiontools[].function.parameterstools[].parameterstools[].input_schemafunctionDeclarations[].parametersJsonSchema
Tool calltool_calls, arguments as a stringfunction_call itemtool_use block, input objectfunctionCall part, args object
Tool resulttool messagefunction_call_output itemtool_result block in a user turnfunctionResponse part in a user turn
Force a tool calltool_choice: "required"tool_choice: "required"tool_choice: {"type": "any"}functionCallingConfig.mode: "ANY"
JSON schema outputresponse_format.json_schematext.formatoutput_config.formatresponseMimeType + responseJsonSchema
Output limitmax_completion_tokensmax_output_tokensmax_tokens (required)generationConfig.maxOutputTokens
Stop sequencesstop (up to 4)Nonestop_sequencesstopSequences (up to 5)
Fields with no equivalent, and what the converter does with them
FieldWhat happens
Anthropic cache_controlRemoved with a warning: OpenAI and Gemini set up prompt caching differently.
Gemini safetySettings, cachedContentRemoved with a warning: the other APIs have nothing to map them to.
OpenAI logprobs, seed, penalties, nCarried to Gemini, which has all four; listed as dropped for Anthropic.
logit_biasDropped: it uses token IDs from OpenAI’s tokenizer.
Reasoning (thinking, reasoning_effort, thought parts)Dropped: signed reasoning can’t be replayed to another provider, and effort levels don’t line up.
previous_response_idFlagged as an error: the earlier turns live on OpenAI’s servers, not in the request.
Files, audio, PDFs, built-in toolsDropped with a warning; attach them again in the target API’s own format.

FAQ

Frequently asked questions

How do I convert OpenAI messages to Anthropic format?

Move every system or developer message into the top-level system field, add the required max_tokens, and rename each tool’s parameters to input_schema. Turn tool_calls into tool_use blocks with the arguments parsed into an object, and put every tool message into one user turn as tool_result blocks, before any text. Split data: image URLs into media type and base64. The converter above does all of this for you.

What doesn’t convert between OpenAI, Anthropic and Gemini?

Anything provider-specific: Anthropic cache_control breakpoints, Gemini safetySettings and cachedContent, OpenAI logit_bias and stored conversations (previous_response_id), reasoning blocks and signatures, file IDs, audio and built-in tools such as web search. The converter lists each one it finds, with the path in your input, so nothing disappears without you knowing.

Why does the Gemini output contain skip_thought_signature_validator?

Gemini 3 rejects a function call in the history unless it carries the thought signature Gemini attached when it made the call. Calls converted from OpenAI or Anthropic never had one, so Google documents this placeholder value for calls another model made. The converter puts it on the first function call in each model turn, which is where Gemini expects a signature for parallel calls.

Why does Anthropic reject the temperature after I convert?

Anthropic has deprecated its sampling settings. Its API reference says models released after Claude Opus 4.6 reject a temperature other than 1.0, a top_p below 0.99 and any top_k. The converter still writes them, capped to Anthropic’s 0 to 1 range, because older Claude models accept them, and warns you. Remove them for current models.

Should I convert requests or use an OpenAI-compatible endpoint?

Both providers offer OpenAI-compatible endpoints: Anthropic’s at https://api.anthropic.com/v1/ and Google’s at https://generativelanguage.googleapis.com/v1beta/openai/. They’re quick for trying a model, but Anthropic describes its layer as mainly for testing and comparing models, and it ignores strict on tools. Native formats give you every feature, which is why converting is worth doing for production code.

Is my request sent anywhere?

No. The conversion is plain JavaScript running in your browser; nothing you paste, including API keys or customer data inside the messages, is uploaded or stored. You can use the page offline once it has loaded. The converter never calls any provider’s API: it only rewrites the JSON.