Create Message

POST/v1/messages
Create a model response using the Anthropic-compatible Messages format.

Request Body

application/json
model:requiredstring

Model identifier used for this request.

Exampleclaude-sonnet-5
messages:requiredobject

Messages that make up the conversation.

Example[{"role":"user","content":"hi"}]
stream:optionalboolean

Whether to stream partial results as they become available.

thinking:optionalobject

Extended thinking configuration for supported models.

Response

200

A successful request returns a JSON response. The complete example is shown in the code panel.

Compatibility References

Use these external references to review additional parameters supported by compatible provider formats.