cURL
curl --request POST \ --url http://sandbox.mintlify.com/v1/messages \ --header 'Content-Type: application/json' \ --header 'anthropic-version: <anthropic-version>' \ --header 'x-api-key: <api-key>' \ --data ' { "model": "claude-sonnet-4-5", "max_tokens": 1024, "messages": [ { "role": "user", "content": [ { "type": "text", "text": "请总结这张图片里的关键信息" } ] } ] } '
{ "id": "msg_01ABCxyz", "type": "message", "role": "assistant", "model": "claude-sonnet-4-5", "content": [ { "type": "text", "text": "图片中是一张产品宣传海报。" } ], "stop_reason": "end_turn", "usage": { "input_tokens": 128, "output_tokens": 48 } }
Creates a Claude message response for text, multimodal input, and tool use.
Anthropic 官方 HTTP 文档里,Claude 的图片能力主要体现在 Messages API 的视觉理解,而不是独立的图片生成接口。
content
file_id
Anthropic API version header.
"2023-06-01"
"claude-sonnet-4-5"
Show child attributes
Successful Claude message response
message
assistant