POST /messages
Send a message to Claude via the Messages API.
Most integrations should use Create Chat Completion. Use this endpoint when you specifically need Anthropic’s Messages request format.
Parameters
string
required
Target model ID.
array
required
Conversation history in Claude’s message format.
boolean
default:"false"
If true, results are returned as server-sent events.
Image Input
For Claude vision models, send image content blocks in themessages array.
PDF Input
For Claude models that support PDFs, send adocument content block and set source.media_type to application/pdf. The data field contains the base64-encoded raw PDF bytes.
Claude PDF support depends on the specific model. Use standard, unencrypted PDFs and control request body size and page count; split large documents into batches.