Claude API Postman Collection Examples That Work
If you're searching for a Claude API Postman collection, you're probably trying to test requests before writing code, debug an integration issue, or document an API for a team. Anthropic doesn't publish an official Postman collection, so the fastest path is building a small one yourself with the right environment variables and a handful of saved requests covering messages, streaming, and tool use.
This guide gives you copy-paste-ready examples for the most common Claude API calls, structured the way you'd actually organize them in Postman: a shared environment, a base collection with pre-request auth, and individual requests for each use case. The same examples work whether you're hitting Anthropic's API directly or a gateway like SubToAPI that wraps Claude behind a standard HTTPS endpoint.
Setting up your Postman environment
Before adding requests, create a Postman environment with these variables:
base_url— the API host (e.g.https://api.anthropic.comorhttps://api.subtoapi.app)api_key— your API key, stored as a secret type variablemodel— the model string you're testing against, e.g.claude-sonnet-4-5-20250929api_version— Anthropic's versioned header value, e.g.2023-06-01
Using variables instead of hardcoding values means you can switch between dev/staging keys or even between providers without editing every request.
In the collection's Authorization tab, set the type to API Key, add it as a header, and reference {{api_key}} so every request inherits it automatically.
Example 1: Basic messages request
This is the core request type you'll reuse constantly — a single-turn message to Claude.
Method: POST URL: {{base_url}}/v1/messages
Headers:
x-api-key: {{api_key}}
anthropic-version: {{api_version}}
content-type: application/json
Body (raw JSON):
{
"model": "{{model}}",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "Summarize the differences between REST and GraphQL in 3 bullet points." }
]
}
Save this as "Messages — Basic" in your collection. It's the template you'll duplicate for every other variation.
Example 2: Multi-turn conversation
To test conversation history, extend the messages array with alternating user and assistant roles:
{
"model": "{{model}}",
"max_tokens": 1024,
"messages": [
{ "role": "user", "content": "What's the capital of Portugal?" },
{ "role": "assistant", "content": "Lisbon is the capital of Portugal." },
{ "role": "user", "content": "What's its population?" }
]
}
This confirms your request structure handles context correctly before you wire it into actual application logic.
Example 3: System prompt and parameters
Add a system field and tune generation parameters to test behavior changes without touching code:
{
"model": "{{model}}",
"max_tokens": 500,
"system": "You are a concise technical writer. Answer in plain text, no markdown.",
"temperature": 0.3,
"messages": [
{ "role": "user", "content": "Explain what idempotency means in API design." }
]
}
Create a few Postman requests with different temperature and max_tokens values saved as separate examples — this is one of the fastest ways to understand model behavior visually, since Postman keeps response history per request.
Example 4: Streaming responses
Streaming is harder to test in Postman than a plain request/response, since Postman's UI doesn't render server-sent events the way a terminal does. Still, you can verify the stream is working:
Set "stream": true in the body:
{
"model": "{{model}}",
"max_tokens": 1024,
"stream": true,
"messages": [
{ "role": "user", "content": "Write a haiku about distributed systems." }
]
}
In Postman, the response body will show raw event: and data: chunks rather than a clean final answer — that's expected. For actually consuming streams in production code, curl or a JavaScript fetch loop reading the response body is more practical than Postman. If you're testing against SubToAPI, the streaming format and setup are documented at /docs/streaming.
Example 5: Tool use (function calling)
Tool use requests add a tools array describing the functions Claude can call, plus a JSON schema for each tool's input:
{
"model": "{{model}}",
"max_tokens": 1024,
"tools": [
{
"name": "get_weather",
"description": "Get current weather for a city",
"input_schema": {
"type": "object",
"properties": {
"city": { "type": "string" }
},
"required": ["city"]
}
}
],
"messages": [
{ "role": "user", "content": "What's the weather in Lisbon right now?" }
]
}
Save the response — when Claude decides to call a tool, you'll get a tool_use content block with the arguments it wants to pass. Your next request in the collection should feed a tool_result back in the messages array, simulating the full round trip. This chained request pattern is worth saving as its own folder in your collection since it's easy to forget the follow-up step.
Organizing the collection for real use
A collection that's actually useful for a team usually has folders like:
- Auth & Setup — a simple request to confirm the key works
- Messages — basic, multi-turn, system prompt variants
- Streaming — stream on/off comparisons
- Tools — tool definition + tool result follow-up pair
- Errors — intentionally malformed requests (missing
max_tokens, bad model name) to see error shapes
Add Postman tests scripts that check pm.response.code === 200 and that usage fields exist in the response body — this turns your manual collection into a lightweight smoke test suite you can run with Newman in CI.
If you're using SubToAPI instead of calling Anthropic directly, the request bodies are nearly identical — swap x-api-key for an Authorization: Bearer $SUBTOAPI_KEY header and point base_url at https://api.subtoapi.app. Full request/response shapes are in /docs/messages, and a working first request takes about five minutes to set up per /docs/quickstart. Getting application API keys and usage tracking per key is handled from a dashboard rather than per-developer Anthropic accounts — useful if you want the Postman collection above to work identically across a team without sharing one raw key. Plans start at /pricing, and there's a free trial at /signup.
Questions
Does Anthropic provide an official Postman collection for the Claude API? No. Anthropic documents the API via its own reference docs but doesn't publish a maintained Postman collection, so most teams build a small internal one covering messages, streaming, and tools.
Can I test streaming responses properly in Postman? You can confirm a stream is returning event/data chunks, but Postman doesn't render them as live text the way a terminal or browser does — use curl or a small script for real streaming verification.
What headers does every Claude API request need in Postman? At minimum an auth header (x-api-key or Authorization: Bearer), an anthropic-version header if calling Anthropic directly, and content-type: application/json.