Anthropic
Overview
Text Completions
post
Body
or
Responses
200Success
application/json
modelstringRequiredExample:
Model used to generate the response.
claude-sonnet-4-20250514idstringRequiredExample:
Unique identifier of the generated message.
msg_01SUmNmSRFZsoa6h96MxJEHHtypestringRequiredExample:
Object type.
messagerolestringRequiredExample:
Role of the message author.
assistantstop_reasonstring · nullableOptionalExample:
Reason why generation stopped.
end_turnstop_sequencestring · nullableOptional
Custom stop sequence that caused generation to stop.
stop_detailsany · nullableOptional
Additional details about why generation stopped.
post
/v1/messages200Success
Example: Simple Text Response
Function Calling
Example: Get Weather Information
Streaming Mode
Batch Processing
Vision
Response Format
Last updated
Was this helpful?