GET
/v1/schemas/baseten/chat/v1%2Fmessages?kind=output
Accept:
Response body
8 properties · 7 required · 3 $defs| property | type | description | constraints |
|---|---|---|---|
| id* | string | A unique identifier for this message, such as `msg_abc123`. | |
| type* | const | The object type, always `message`. | "message" |
| role* | const | The role of the generated message, always `assistant`. | "assistant" |
| content* | TextBlock | ToolUseBlock[] | An array of content blocks generated by the model. Text responses contain a single `text` block; responses that invoke tools contain `tool_use` blocks. | |
| model* | string | The model slug that produced the response. | |
| stop_reason* | enum | Why the model stopped generating: `end_turn` (natural stop), `max_tokens` (hit the `max_tokens` limit), `stop_sequence` (matched a `stop_sequences` entry), or `tool_use` (model invoked a tool). | end_turn | max_tokens | stop_sequence | tool_use |
| usage* | Usage | Token usage statistics for the request. | |
| stop_sequence | string | The stop sequence that was matched, if `stop_reason` is `stop_sequence`. Otherwise `null`. |
Validate a payload
before you spend tokensshell
$ curl -X POST https://modelschemas.com/v1/validate \
-d '{"provider":"baseten","endpointId":"v1/messages","payload":{…}}'
→ {"valid": false, "errors": [{"path": "#", "keyword": "required", …}]}