Build a Claude Messages API request body in your browser: system prompt, user message, model, max tokens, temperature, and streaming as copyable JSON.
100% free · no signup · browser-local
Share on XFill the fields and the Messages API body updates live. Nothing leaves your browser.
Anthropic Messages API format. Send the body to the endpoint with the headers below.
POST /v1/messages{
"model": "claude-sonnet-5-5",
"max_tokens": 1024,
"temperature": 0.7,
"stream": false,
"messages": [
{
"role": "user",
"content": ""
}
]
}Tip: add a user message on the left before sending — the Messages API requires at least one non-empty turn in messages.
Endpoint: https://api.anthropic.com/v1/messages
Headers: x-api-key, anthropic-version: 2023-06-01, content-type: application/json.
Keep the API key in a server route or environment variable. It never belongs in a request body, a client bundle, or a screenshot.
Send a POST to https://api.anthropic.com/v1/messages with an x-api-key header, anthropic-version: 2023-06-01, and content-type: application/json. The key stays on the server.
The system prompt is a top-level field, not a message role. Put durable rules and persona there; put the actual request in the messages array.
Each message is an object with role and content. A single call starts with one user turn; multi-turn calls alternate user and assistant messages.
max_tokens is required and caps the reply. temperature runs 0–1. Setting stream to true returns server-sent events instead of one JSON object.
Write the system prompt as policy, not small talk: who the model is, what it must never do, and the shape of a good answer. Then put the single ask in the user message.
Pick the cheapest model that passes your evals. Price the prompt and completion in the Token Price Converter before you run it at volume.
Not sure the prompt is ready? Audit it in the Prompt Builder, then copy this JSON into a server route and add the key from an environment variable.
A POST to /v1/messages with a JSON body containing model, max_tokens, an optional top-level system prompt, and a messages array of role and content objects. Optional fields include temperature, stream, tools, and stop_sequences. This builder covers the core shape.
Anthropic treats the system prompt as a top-level field, separate from the turn-by-turn messages. Sending a system role inside the messages array is rejected. Use system for durable instructions and messages for the actual exchange.
Yes. The Messages API requires max_tokens, and it caps only the generated output, not the input. Set it as low as the task allows, and never above the model’s published output limit.
Anthropic accepts 0 to 1. Use 0 for classification, extraction, and anything you will parse; 0.7 for general drafting; closer to 1 for brainstorming where variety matters. Temperature changes sampling, not the token price.
Request shape follows the Anthropic Messages API. Model names, limits, and prices come from the TokenCalc AI catalog; confirm current model IDs and beta headers in Anthropic's docs before shipping. This tool never asks for or stores an API key.
Format, minify, and validate JSON with adjustable indentation. Runs in your browser.
Encode text to Base64 or decode Base64 to text. UTF-8 safe.
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from text.
We'll email you when model prices change or new tools launch. Unsubscribe anytime.