GET
/v1/schemas/baseten/chat/v1%2Fmessages
Accept:
Request body
12 properties · 3 required · 6 $defs| property | type | description | constraints |
|---|---|---|---|
| model* | string | The model slug to use. Find available models at [Model APIs](https://app.baseten.co/model-apis/create). | |
| messages* | InputMessage[] | The conversation history as an ordered list of input messages. Alternating `user` and `assistant` roles are expected; the final message must be from the `user`. | |
| max_tokens* | integer | The maximum number of tokens to generate in the response. Required by the Messages API. The response may be shorter if it finishes naturally or hits a stop sequence. | n ≥ 1 |
| system | string | TextBlock[] | A system prompt that sets the model's behavior. Pass either a single string or an array of text content blocks. | |
| temperature | number | Controls randomness. Lower values are more deterministic. Range: 0 to 1. | 0 ≤ n ≤ 1 · default: 1 |
| top_p | number | Nucleus sampling: only consider tokens with cumulative probability up to this value. | 0 < n ≤ 1 |
| top_k | integer | Limits token selection to the top K most probable tokens at each step. | n ≥ 0 |
| stop_sequences | string[] | Custom text sequences that will stop generation. When a stop sequence is hit, `stop_reason` is `stop_sequence` and `stop_sequence` contains the matched string. | |
| stream | boolean | If `true`, the response is streamed as server-sent events. Each event has a `type` such as `message_start`, `content_block_delta`, or `message_stop`. | default: false |
| tools | ToolDefinition[] | A list of tools the model may call. Each tool has a `name`, `description`, and `input_schema` (a JSON Schema object). | |
| tool_choice | object | object | object | … | Controls which tool (if any) the model must call. | |
| metadata | object | An object describing metadata about the request. Supports `user_id` for abuse detection. |
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", …}]}