DevKits

LLM Request Converter — OpenAI ↔ Anthropic ↔ Gemini Format

Convert an LLM chat request body between OpenAI Chat Completions, Anthropic Messages, and Google Gemini formats — messages, system prompt, and max tokens are remapped for you. 100% local.

Last updated:

Comments

Paste a chat request body for OpenAI Chat Completions, Anthropic Messages, or Google Gemini, pick a target provider, and this tool remaps it — moving the system prompt, converting roles, and setting the right max-tokens field. Everything runs in your browser.

Detected format: OpenAI (Chat Completions)

{
  "model": "gpt-4o",
  "max_tokens": 200,
  "messages": [
    {
      "role": "user",
      "content": "Summarize the theory of relativity in one sentence."
    }
  ],
  "system": "You are a helpful assistant.",
  "temperature": 0.7
}

Converts the core request shape — system prompt, messages/contents, and max tokens. Conversion runs entirely in your browser; nothing is uploaded.

What is LLM Request Converter?

Migrating a prompt between providers means more than renaming a field. OpenAI keeps the system prompt as a role: system message inside the messages array and uses max_tokens; Anthropic wants a top-level system string, only user/assistant roles, and a required max_tokens; Gemini uses contents with role user/model, parts: [{ text }], a separate systemInstruction, and generationConfig.maxOutputTokens. This converter parses your request, extracts the system prompt, remaps each message role to the target's vocabulary, and relocates the token limit, producing a ready-to-send body. It focuses on the core request shape that trips people up during migration, so you can switch providers without rewriting the plumbing by hand.

How to convert an LLM request

  1. 1Paste a request body (OpenAI, Anthropic, or Gemini) — the source format is detected.
  2. 2Choose the target provider.
  3. 3Copy the converted request body.

Key Concepts

system prompt
A system message in OpenAI; a top-level string in Anthropic; systemInstruction in Gemini.
role mapping
assistant (OpenAI/Anthropic) maps to model in Gemini; system is relocated out of messages.
messages array
Validate an OpenAI messages array separately.

Frequently Asked Questions

What differs between OpenAI and Anthropic request bodies?

OpenAI puts the system prompt as a message with role: system inside the messages array and uses max_tokens (or max_completion_tokens). Anthropic takes a top-level system string, requires max_tokens, and only allows user/assistant roles in messages. This converter moves the system message out, remaps roles, and sets the right token field.

How does Gemini's format differ?

Gemini uses contents with role user/model (not assistant) and parts: [{ text }], a separate systemInstruction, and generationConfig.maxOutputTokens. The converter maps messages to contents and relocates the system prompt and token limit.

Does it convert tools / function definitions?

It focuses on the core request shape — system, messages/contents, and token limits — which covers most migration needs. Tool/function schemas differ per provider; use the Schema → Tool Definition tool for those.

Is my request uploaded?

No. The conversion runs entirely in your browser.

Try Next

Text Chunker

Split long text into overlapping chunks for embedding and RAG pipelines. Preview recursive, paragraph, sentence, or fixed strategies with live token counts. Runs 100% in your browser.

Related Tools

Reference & Guides