Jump straight to the numbers

← All articles

$1 test budget: Anthropic Messages for OpenAI users

01 / Start with a $1 experiment, not a pricing assumption

Set a $1 spending ceiling for learning the Anthropic Messages API. That is a suggested personal budget, not a quoted price, minimum deposit, or promise about how many requests you will get. Your actual cost depends on the model, input tokens, output tokens, and any cache charges.

If you already use OpenAI Chat Completions, the basic idea will feel familiar: send conversation messages and receive an assistant response. The differences are in where instructions live, how content is represented, and how you extract the answer. Start with one short prompt and a small output limit.

02 / Move the system message outside the conversation

In OpenAI Chat Completions, you may put a system message inside the messages array. Anthropic’s native Messages format puts system instructions in a separate, top-level system field. The messages array contains user and assistant turns.

A minimal request body looks like this, with YOUR_MODEL_ID replaced by an identifier supported by your provider:

{"model":"YOUR_MODEL_ID","max_tokens":128,"system":"Answer briefly in plain English.","messages":[{"role":"user","content":"Explain an API in one sentence."}]}

The native endpoint is POST /v1/messages. Direct Anthropic requests use an x-api-key header, an anthropic-version header such as 2023-06-01, and Content-Type: application/json. OpenAI-style Authorization: Bearer authentication should not be assumed to work against that direct endpoint.

Anthropic requires max_tokens in the request. Here, 128 caps generated output tokens; it does not cap input tokens or set a dollar limit. Keep your prompt short as well.

03 / Read content blocks instead of choices

With OpenAI Chat Completions, you commonly read choices[0].message.content. A native Anthropic response instead has a top-level content array. A simple text answer might contain {"type":"text","text":"An API lets software request data or actions from other software."}.

For a basic text application, collect the text from blocks whose type is text. Do not assume every block is text or that the response always contains exactly one block. Tools and other features can introduce different block types.

  • ■ content holds the assistant’s output blocks.
  • ■ stop_reason explains why generation stopped.
  • ■ usage reports token counts for the request.

A stop_reason of end_turn usually means the assistant finished its turn. max_tokens means it reached the output limit, so an answer may be cut short. tool_use means your application needs to handle a tool request.

04 / Send conversation history again, and pay attention to it

Ordinary Messages requests are stateless: send the relevant conversation history on each call. To continue a conversation, append the assistant response and then the next user message. Preserve content blocks when they carry information your next request needs.

This affects a tiny budget immediately. Repeated history increases input tokens. After your first single-turn test works, try one follow-up and compare usage. Avoid sending a long document repeatedly while you are still debugging authentication or response parsing.

05 / Translate tool calls only when you need them

OpenAI Chat Completions commonly represents function requests through tool_calls and returns results using tool-role messages. Anthropic represents requests as tool_use blocks in assistant content and results as tool_result blocks in a subsequent user message. Each result references its tool request through tool_use_id.

Tool definitions also differ: Anthropic uses input_schema for the tool’s JSON input schema. Copying an OpenAI tool definition unchanged can fail validation. Leave tools out of your first experiment; add one small tool after ordinary text requests work.

06 / Use CheapRelay’s route that matches your client

CheapRelay offers pay-as-you-go access with one key and no monthly fee or subscription. Its API base is https://api.cheapapirelay.com, with OpenAI-compatible routes under /v1. If you want to keep your existing OpenAI SDK, that compatibility route can reduce migration work.

Native Anthropic formatting is a separate interface choice. Confirm native Messages endpoint availability and authentication before pointing an Anthropic client at a relay. An OpenAI-compatible route alone does not establish native Messages support.

CheapRelay bills real tokens, including cache reads and writes. Choose a supported model, inspect usage after each short test, and track actual charges against your $1 ceiling; an output limit is only one cost control. Sign up for CheapRelay when you are ready to run that first measured request.

Sign up Try the prices yourself, sign-up credit included.

More reading

DateAisleWritten inTitle
2026-10-27API pipes and fittingsENA $2.55 API Receipt Beats a Cheap Token Headline
Check token categories, retries, routing, and balance rules before funding an API relay, using a clearly labeled $2.55 example receipt.
2026-10-27API pipes and fittingsEN$0 monthly fees won't fix a leaked API key
A blunt troubleshooting FAQ for keeping API keys out of git, fixing accidental commits, and avoiding wasted tokens during secret cleanup.
2026-10-26API pipes and fittingsEN$0.05184 for 8,640 AI health probes
A practical AI endpoint monitoring plan with a token-by-token receipt, timeout rules, retry limits, and clear limits on what a probe proves.
2026-10-26API pipes and fittingsEN$0.084 instead of $0.052: the timeout receipt
A concrete retry-cost receipt and practical timeout settings for long AI streams, with clear limits on what a disconnected client can tell you.
2026-10-26API pipes and fittingsEN$0.0048 per Request: Make Usage a Receipt
Turn API usage fields into a cost receipt, separate cached tokens correctly, and log enough detail to reconcile requests with billing.
2026-10-26API pipes and fittingsEN$3.85 API Receipt, $20 Chat Subscription
A worked migration budget: $3.85 in illustrative API charges, a $20 subscription baseline, and the costs that can erase the saving.