Prompt Formatter
Write a conversation once and see the exact request body each provider expects. The three disagree in ways that are easy to get wrong when porting a prompt between them.
System prompt
Conversation
{
"model": "gpt-4o",
"messages": [
{
"role": "system",
"content": "You are a technical editor."
},
{
"role": "user",
"content": "Analyse the following code block…"
}
]
}OpenAI carries the system prompt as the first entry in messages.
Frequently asked questions
What does the Prompt Formatter do?
You write a conversation once, with an optional system prompt and user and assistant turns, and the tool shows the request body that the OpenAI, Anthropic and Gemini APIs each expect for it. It is meant for porting a prompt between providers without reshaping the JSON by hand.
How do the three request formats differ?
OpenAI puts the system prompt inside the messages array as a message with the system role. Anthropic takes it as a top-level system string, rejects a system message inside messages, and requires max_tokens. Gemini uses systemInstruction with a parts array, calls the message list contents, and names the assistant role model.
Does it call any provider API or need an API key?
No. It only builds the JSON in your browser. Nothing is sent anywhere and no key is needed. The model names and the max_tokens value in the output are defaults, so replace them with the values you actually use.
Which kinds of messages are supported?
Text only: an optional system prompt plus alternating user and assistant text turns. Images, audio, tool calls and tool results are not generated, so add those fields yourself following the provider’s documentation.