Create a message

Generate an Anthropic Messages-compatible assistant message. Requests are supplied in the Anthropic wire format and run through the same inference pipeline as the Responses API. Supported tools are developer-defined (custom) functions and built-in web_search.

POST /messages

Generate an Anthropic-compatible assistant message.

Parameters

Header parameters

FieldTypeRequiredDescription
anthropic-versionstringNoAnthropic API version header. Accepted for SDK compatibility.
x-api-keystringNoAPI key header used by Anthropic SDKs. Authorization: Bearer is also accepted.

Request body

Content Type: application/json

AnthropicMessageRequest

Response

HTTP 200 — OK

Content Type: application/json

AnthropicMessage

Content Type: text/event-stream

AnthropicStreamEvent

python
import os
from anthropic import Anthropic
client = Anthropic(
base_url="https://api.meta.ai",
auth_token=os.environ["MODEL_API_KEY"],
)
message = client.messages.create(
model="muse-spark-1.3",
max_tokens=1024,
messages=[
{
"role": "user",
"content": "What is the capital of France?",
},
],
)
print(message.model_dump_json(indent=2))

For reasoning replay, tool calling, and structured output guidance that applies to the shared inference pipeline, see the Responses feature page.