GET

/v1/schemas/anthropic/chat/v1%2Fmessages%3Fbeta%3Dtrue?kind=output

kind outputactivity chathash af6dda44extracted Jul 25, 2026version currentsource upstream spec ↗

Response body

12 properties · 12 required · 89 $defs
propertytypedescriptionconstraints
id*stringUnique object identifier.
type*constObject type."message" · default: "message"
role*constConversational role of the generated message."assistant" · default: "assistant"
content*BetaContentBlock[]Content generated by the model.
model*stringThe model that will complete your prompt.17 known values
stop_reason*enumThe reason that we stopped. This may be one the following values: * `"end_turn"`: the model reached a natural stopping point * `"max_tokens"`: we exceeded the requested `max_tokens` or the model's maximum * `"stop_sequence"`: one of your provided custom `stop_sequences` was generated * `"tool_use"`: the model invoked one or more tools * `"pause_turn"`: we paused a long-running turn. You may provide the response back as-is in a subsequent request to let the model continue. * `"refusal"`: when streaming classifiers intervene to handle potential policy violations * `"model_context_window_exceeded"`: we exceeded the model's context window In non-streaming mode this value is always non-null. In streaming mode, it is null in the `message_start` event and non-null otherwise.end_turn | max_tokens | stop_sequence | tool_use | pause_turn | compaction · +2 more · nullable
stop_sequence*stringWhich custom stop sequence was generated, if any. This value will be a non-null string if one of your custom stop sequences was generated.nullable
stop_details*BetaRefusalStopDetailsStructured information about a refusal.nullable
usage*BetaUsageBilling and rate-limit usage.
diagnostics*BetaDiagnosticsResponse envelope for request-level diagnostics. Present (possibly null) whenever the caller supplied `diagnostics` on the request.nullable
context_management*BetaResponseContextManagementContext management response. Information about context management strategies applied during the request.nullable
container*BetaContainerInformation about the container used in the request (for the code execution tool)nullable

Validate a payload

before you spend tokens
shell
$ curl -X POST https://modelschemas.com/v1/validate \
    -d '{"provider":"anthropic","endpointId":"v1/messages?beta=true","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}