/v1/messages endpoint accepts requests in Anthropic’s native Claude Messages API format. If you already use the anthropic Python or JavaScript SDK, you can redirect it at OpenOpen8 by changing only the base URL — all request and response fields remain identical. OpenOpen8 authenticates you with the token from your dashboard and routes the request to the configured Claude channel. You can also send Claude-format requests to non-Claude upstream channels; OpenOpen8 translates the format automatically where possible.
Endpoint
Authentication
Claude Messages requests use two headers instead ofAuthorization:
| Header | Required | Description |
|---|---|---|
x-api-key | Yes | Your OpenOpen8 token |
anthropic-version | Yes | Must be 2023-06-01 |
You may alternatively use
Authorization: Bearer YOUR_TOKEN for the API key if your client does not support x-api-key. OpenOpen8 accepts both forms.Request parameters
The Claude model to use, for example
claude-opus-4-5 or claude-3-7-sonnet-20250219. To enable extended thinking, use the -thinking model name suffix: claude-3-7-sonnet-20250219-thinking.The conversation history. Messages alternate between
user and assistant roles. The first message must have role user.The maximum number of tokens to generate. This field is required by the Claude Messages API. For Claude models, the value must not exceed the model’s output token limit.
A system prompt that sets context and instructions for the conversation. Pass a plain string, or an array of content blocks for advanced use cases such as caching system prompts.
When
true, the response is returned as a stream of server-sent events using Anthropic’s streaming format. Events include message_start, content_block_start, content_block_delta, content_block_stop, message_delta, and message_stop.Sampling temperature between
0 and 1. Higher values produce more varied output.Nucleus sampling probability mass between
0 and 1. Recommended when temperature is not set.Sample from only the top
k most likely tokens. Not recommended for most use cases.Custom sequences at which the model will stop generating. The stop sequence itself is not included in the output.
Tools the model may call. Each tool defines a function the model can invoke.
Controls how the model selects tools.
Enable extended thinking for supported models. Use the
-thinking model name suffix as an alternative.Response fields
A unique identifier for this message in the format
msg_....Always
"message" for complete responses.Always
"assistant" for generated messages.An array of content blocks in the response.
The model that generated the response.
Why the model stopped generating. One of
"end_turn" (natural end), "max_tokens" (token limit reached), "stop_sequence" (custom stop sequence matched), or "tool_use" (model called a tool).Token counts for this request.
Examples
- Non-streaming
- Streaming
- Tool use
Format conversion
You can also route Claude-format requests (/v1/messages) to non-Claude upstream channels. OpenOpen8 performs automatic format conversion, translating the Claude Messages format to the upstream provider’s native format. This lets you use a single client format across providers. Conversion is best-effort; some Claude-specific features (such as extended thinking) may not be available on all upstream channels.