GET
/v1/schemas/baseten/chat/v1/messages?kind=output
Accept:
| field | recorded source |
|---|---|
| schema | Source linked above. upstream-spec Source traceaa7bde20942ca711969ec6b81aab7d14ac913e23ef78ca5424d48038046d9da7{
"fetchedAt": 1791264068,
"extractorVersion": "1",
"verifiedAt": null
} |
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`. |
Types
3 $defsTextBlockobject
A text content block.
| type* | const | The block type, always `text`. | "text" |
| text* | string | The text content. |
ToolUseBlockobject
A tool use content block generated by the model.
| type* | const | The block type, always `tool_use`. | "tool_use" |
| id* | string | A unique identifier for this tool call. Use this as `tool_use_id` in the matching tool result. | |
| name* | string | The name of the tool being called. | |
| input* | object | The arguments passed to the tool, matching the tool's `input_schema`. |
Usageobject
Token usage statistics.
| input_tokens | integer | The number of input tokens processed, excluding tokens served from cache. Total prompt size is `input_tokens + cache_read_input_tokens + cache_creation_input_tokens`. | |
| output_tokens | integer | The number of output tokens generated. | |
| cache_read_input_tokens | integer | The number of input tokens served from cache. Not counted in `input_tokens`, matching the Anthropic API: `input_tokens` covers only uncached tokens. Caching is automatic; no `cache_control` blocks are required. This field is omitted when no tokens were read fr… |
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", …}]}