Messages and Streaming Calls

POST /messages exposes the native Anthropic Messages shape. It suits applications already using the Anthropic SDK or depending on native content[] responses and streaming events. Applications built around OpenAI messages and choices should use Chat Completions.

Connection contract

Raw HTTP calls still use a Genesis Bearer key:

Authorization: Bearer <API_KEY>

Requests and responses use the Anthropic Messages field structure, with business output in content[]. Streaming returns native events from that ecosystem rather than Chat Completions choices[].delta.

The Genesis Use page provides a Messages code example. With the official Anthropic SDK, point baseURL at the Genesis source address shown there; the SDK appends /v1/messages. Whether that source address includes a version segment depends on the generated example, so do not reuse the OpenAI SDK’s GENESIS_BASE_URL concatenation rule without checking it. Follow the current generated example for credential and SDK options as well.

Build a conversation

A Messages request needs a target model, an ordered message list, and the output limit required by the model. A message can contain one or more content blocks. System instructions, image blocks, and other extensions depend on model capability.

Do not reuse a serialized request body between /messages and /chat/completions:

Messages

Chat Completions

Native Anthropic request and content[] response

OpenAI-compatible request and choices[] response

Native Anthropic SSE events

data: deltas and [DONE]

SDK configured with a Genesis source address

SDK configured with the Genesis Base URL

If an application switches between both interfaces, define an internal message representation and implement a separate adapter for each endpoint.

Stream a message

For streaming output, accumulate content blocks according to event type and complete the message only after the native termination event. The parser must allow one block to span multiple network chunks and retain the final stop reason and usage. If the connection breaks, a retry creates another request; do not concatenate both streams blindly.

See Results, Pagination, and Streaming for transport-level guidance. Confirm that the target model supports Messages and its specific fields in the model details and Debug Playground.