What the OpenAI / Anthropic / Gemini Request Converter does
This converter rewrites a chat request body between OpenAI Chat Completions, Anthropic Messages and Gemini generateContent - system prompt, messages, images, tool definitions, tool calls and results, sampling settings and JSON output - and lists every field that could not be carried across, changed meaning or had to be added.
It runs in your browser. Before anything else, credentials in the pasted JSON - API keys, bearer tokens, passwords - are replaced with [REDACTED], so they cannot end up in a converted body, a copy or a download. Model names are deliberately not translated: there is no honest one-to-one mapping between providers' models, so the output carries a placeholder for you to choose.
How to use it
- Paste the JSON body of a request - not the headers or a curl command - or load one of the examples. Leave the source on Detect automatically unless detection guesses wrong.
- Press Convert. The summary shows the detected source, how many secrets were redacted and how many fields each target loses.
- Read the list of fields not carried to any target, then open each target's tab: its own findings explain what changed for that API, followed by the converted JSON.
- Replace the model placeholder, review every Lost and Changed item, then copy or download the body. Copy the loss report into your migration notes.
Reading the results
Lost means the target has no equivalent and the setting was dropped - for example seed and penalties on Anthropic, top_k on OpenAI, log probabilities, Anthropic cache breakpoints or Gemini safety settings.
Changed means the value was carried but its meaning or position shifted: a developer message folded into the system prompt, a temperature of 1.4 clamped to Anthropic's 0-1 range, consecutive turns merged, ids generated for Gemini function calls that had none.
Added means the target requires something the source did not have - most often Anthropic's mandatory max_tokens, set to 1024 for you to adjust. Info items are reminders, such as Gemini putting the model in the URL rather than the body.
Worked example: an OpenAI tool-calling request to Claude and Gemini
The OpenAI example has a developer message, a user question, an assistant tool call to get_weather with arguments {"city":"Lisbon","unit":"celsius"}, the tool's result, temperature 1.3, max_completion_tokens 600, seed 42, logprobs, a user id and a metadata field containing an API key.
The key is redacted first (1 secret). Not carried to any target: logprobs, user and metadata, and the developer message becomes part of the system prompt. For Anthropic, the tool call becomes a tool_use block, the result a tool_result block in the next user turn, max_tokens is 600, temperature is clamped from 1.3 to 1 and seed is lost.
For Gemini, the assistant turn becomes role model with a functionCall, the result becomes a functionResponse named get_weather with the JSON response parsed into an object, and the call id is lost because Gemini pairs calls and responses by name and order. The model goes in the URL.
What does not translate, and why
The three APIs agree on the basic shape of a conversation and disagree on almost every detail. Anthropic requires max_tokens, keeps the system prompt outside the message list and expects user and assistant turns to alternate, with tool results inside user turns. OpenAI puts tool results in their own tool messages and returns tool arguments as a JSON string. Gemini calls the assistant model, has no message ids for function calls in older histories and moves the model name into the URL.
Sampling settings are not portable either: the same temperature does not produce the same randomness on different models, and some settings exist on only one API. Treat a converted request as a starting point and re-tune it with your own evaluation, especially reasoning or thinking settings, which differ completely and are never converted automatically.
Limitations: what the result does not prove
- It converts request bodies, not SDK code, headers, streaming handlers or response parsing. Responses have different shapes too.
- OpenAI Responses API requests (
input/instructions) are not converted; their item types have no one-to-one mapping to the other APIs. - Built-in and server tools (web search, code execution, computer use, Google Search grounding) are dropped with a note; they need provider-specific setup.
- Redaction catches common key formats, bearer tokens and key-like field names. It cannot guarantee every secret is found; check before sharing.
Privacy: where your data goes
Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.
Standards and sources
- OpenAI Chat Completions API - checked 19 Sep 2026
- Anthropic Messages API - checked 19 Sep 2026
- Gemini generateContent - checked 19 Sep 2026
- Anthropic - OpenAI SDK compatibility notes
- Google - Function calling with the Gemini API
Frequently asked questions
How do I convert an OpenAI request to the Anthropic Messages format?
Move system and developer messages into the top-level system field, add max_tokens, turn tool_calls into tool_use blocks and tool messages into tool_result blocks inside a user turn, and rename tools[].function.parameters to input_schema. Paste the body here and the converter does each step and lists what it could not map.
Why is the model name replaced with a placeholder?
Because models from different providers are not equivalent: they differ in price, context window, speed and behaviour, and any automatic mapping would be a guess presented as fact. Choose the target model yourself, using the LLM API Cost Calculator to compare prices.
Is my API key safe if I paste a request that contains it?
The page never sends the request anywhere, and credentials it recognises are replaced with [REDACTED] before conversion, so they do not appear in any output. Still, rotate any key you have pasted into a shared document or ticket, and keep keys in headers or environment variables rather than request bodies.
Why was my temperature changed when converting to Claude?
Anthropic's temperature accepts values from 0 to 1, while OpenAI and Gemini accept up to 2. A higher value is clamped to 1 and reported. Even within range, the same number does not mean the same randomness on a different model, so re-tune it.
How are Gemini function calls matched to their results?
Gemini matches a functionResponse to its functionCall by function name and order. When converting to OpenAI or Anthropic, which require ids, the converter generates call_1, call_2 and so on, pairs each response with the oldest unanswered call of the same name, and reports that the ids were added.
Can it convert structured output or JSON mode settings?
Yes where an equivalent exists: OpenAI response_format with a JSON schema becomes Anthropic output_config.format and Gemini responseJsonSchema. Schema-less JSON mode has no Anthropic equivalent and is reported as lost; the schema itself may still need changes for each provider's supported keywords.
Last reviewed by the A2Z.Tools team against the sources listed above.