How to Move ChatGPT Prompts to Claude
ChatGPT and Claude use similar conversational formats but handle system prompts differently. Converting a prompt from OpenAI format to Anthropic format involves extracting the system message and changing the model name — the conversation history itself stays the same.
The key structural difference
In OpenAI's format, the system message is just another entry in the messages array:
{
"model": "gpt-4o",
"messages": [
{"role": "system", "content": "You are a code reviewer who..."},
{"role": "user", "content": "Review this function: ..."}
]
}
In Anthropic's format, the system message is a top-level parameter:
{
"model": "claude-3-5-sonnet-20241022",
"max_tokens": 1024,
"system": "You are a code reviewer who...",
"messages": [
{"role": "user", "content": "Review this function: ..."}
]
}
The same instruction, different placement. Claude ignores system messages left in the messages array in OpenAI format — so converting requires explicitly moving the system content to the top-level parameter.
Step-by-step conversion
- Find all messages with
"role": "system"in the messages array - Concatenate their content (if multiple system messages exist)
- Place the concatenated content in the top-level
"system"field - Remove the system messages from the messages array
- Replace the model name with a Claude model identifier
- Add
"max_tokens"— Anthropic's API requires it (OpenAI has a default)
Content format
Both APIs accept content as a plain string for simple text messages. Both also accept content as an array for multimodal messages. For text-only prompts, no content format changes are needed — just the system prompt placement.
Testing the conversion
After converting, run the prompt with 5–10 representative inputs. Compare the output to what ChatGPT produced. For most tasks, the converted prompt will produce equivalent results. Where it doesn't, the fix is usually a small rewording of the system instructions — not a structural issue.