Tools / OpenAI ↔ Anthropic Request Converter

OpenAI ↔ Anthropic Request Converter.

Convert Chat Completions requests to Anthropic Messages requests and back, including tools and images.

Runs in your browser

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Converted request
Notes

About OpenAI ↔ Anthropic Request Converter

This converter rewrites a request body from the OpenAI Chat Completions format to the Anthropic Messages format, or the other way round, which saves time when you move a feature between providers or add a fallback model. Paste the JSON you send to one API and get the equivalent body for the other, plus notes about everything that has no exact counterpart. The differences it handles are the ones that usually cause 400 errors. Anthropic takes the system prompt as a top-level system field instead of a system message, requires max_tokens, and expects user and assistant turns to alternate, so consecutive messages from the same side are merged. OpenAI tool calls with JSON-encoded arguments become tool_use blocks with a parsed input object, and tool role messages become tool_result blocks in a user turn; the reverse direction splits them out again. Image parts are converted between image_url and image blocks, with data URLs turned into base64 sources. stop becomes stop_sequences, tool_choice required becomes any, parallel_tool_calls false becomes disable_parallel_tool_use, and temperatures above 1 are capped because Anthropic accepts 0 to 1. Parameters like n, logprobs, seed or top_k are dropped and listed in the notes, and the model name is copied as is so you remember to change it. For example, a request with a system message and one function tool converts into system, messages and tools with input_schema. Conversion runs in your browser, so API payloads with private data stay local.

How to Use

  1. Choose the direction and paste the request body you send to the API.
  2. Read the converted request and the notes about dropped or changed parameters.
  3. Replace the model name and send the converted body to the other API.

Frequently Asked Questions

Does it convert responses too?

No, only request bodies. Response shapes and streaming events differ more, and SDKs usually handle them for you.

Why was my temperature changed?

OpenAI accepts 0–2 and Anthropic 0–1. Values above 1 are capped at 1 and a note is added. Values in range are copied unchanged.

What happens to response_format or JSON mode?

There is no direct equivalent in the Messages request shape this tool targets, so it is dropped with a note. A common replacement is a tool whose input_schema is your JSON schema.

Is my request sent to OpenAI or Anthropic?

No. The tool only transforms JSON in your browser and makes no API calls.

Related Tools