Anthropic Claude API Tester

Build, run and copy Anthropic Claude Messages API requests as cURL, Python and JavaScript.

Building the request and the cURL, Python and JavaScript code happens entirely in your browser. When you press Run, your Anthropic API key and prompt are sent directly from your browser to Anthropic, not to ArrayKit. Your key is kept in browser memory only and is never stored or sent to ArrayKit. Avoid using production keys on shared or public machines.

Try the OpenAI API Tester

About Anthropic Claude API Tester

The Anthropic Claude API tester lets you build, run and copy requests to the Claude Messages API (POST /v1/messages) without leaving your browser. Paste your Anthropic API key, pick a model like claude-opus-4-8 or claude-sonnet-4-6, type a prompt and a max_tokens value, and ArrayKit assembles a correct request with the x-api-key and anthropic-version headers. Generate ready-to-paste cURL, Python and JavaScript snippets, or press Run to call Anthropic directly and inspect the response. It is built for developers, prompt engineers and anyone integrating Claude who wants to verify a key, sanity-check a model name, or grab a working request to drop into their codebase. The request and code are constructed locally; when you Run, your key and prompt go straight from your browser to Anthropic, never to ArrayKit.

Features

How to use the Anthropic Claude API Tester

  1. Paste your Anthropic API key into the key field
  2. Pick a model such as claude-opus-4-8 or claude-sonnet-4-6
  3. Type your prompt and set a max_tokens value
  4. Press Run to call Anthropic, or copy the cURL / Python / JavaScript snippet

Example

Input

curl https://api.anthropic.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{"model":"claude-opus-4-8","max_tokens":1024,"messages":[{"role":"user","content":"Hello, Claude"}]}'

Output

{
  "id": "msg_01...",
  "type": "message",
  "role": "assistant",
  "model": "claude-opus-4-8",
  "content": [{"type": "text", "text": "Hello! How can I help you today?"}],
  "stop_reason": "end_turn"
}

A minimal Claude Messages API request with the required headers and max_tokens.

Common errors & troubleshooting

Frequently asked questions

What is the Anthropic Claude API tester?
It is a browser tool that builds requests to the Claude Messages API (POST /v1/messages), generates cURL, Python and JavaScript code, and can run the request so you can inspect Claude's response.
Does ArrayKit see or store my Anthropic API key?
No. The request and code are built locally. When you press Run, your key and prompt are sent directly from your browser to Anthropic, never to ArrayKit. The key is kept in browser memory only and is never stored or sent to us.
Why does Run fail with a CORS error when the cURL works?
The Anthropic API may not allow direct cross-origin browser calls, so the browser blocks the request. The generated cURL command runs fine from a terminal or backend where CORS does not apply.
Which Claude models can I test?
Any current Messages API model id works. The picker suggests options like claude-opus-4-8, claude-sonnet-4-6 and claude-haiku-4-5, and you can type any valid id.
Why do I have to set max_tokens?
The Anthropic Messages API requires max_tokens on every request; it caps how many tokens Claude can generate. ArrayKit includes it in the request and the generated code.
Is it safe to use a production key here?
Avoid pasting production keys on shared or public machines. The key stays in your browser, but anyone with access to that machine could see it. Prefer a scoped or test key.

Related tools

All ArrayKit tools