GET
/v1/schemas/anthropic/chat/v1%2Fmessages?kind=output
Accept:
Response body
10 properties · 10 required · 58 $defs| property | type | description | constraints |
|---|---|---|---|
| id* | string | Unique object identifier. | |
| type* | const | Object type. | "message" · default: "message" |
| role* | const | Conversational role of the generated message. | "assistant" · default: "assistant" |
| content* | ContentBlock[] | Content generated by the model. | |
| model* | string | The model that will complete your prompt. | 17 known values |
| stop_reason* | enum | The 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 | refusal · +1 more · nullable |
| stop_sequence* | string | Which 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* | RefusalStopDetails | Structured information about a refusal. | nullable |
| usage* | Usage | Billing and rate-limit usage. | |
| container* | Container | Information about the container used in the request (for the code execution tool) | nullable |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"anthropic","endpointId":"v1/messages","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}