GET

/v1/schemas/baseten/chat/v1/messages

kind inputactivity chathash c939077a…extracted Oct 6, 2026version currentsource upstream spec ↗
fieldrecorded source
schemaSource linked above.

upstream-spec

Source trace
aa7bde20942ca711969ec6b81aab7d14ac913e23ef78ca5424d48038046d9da7
{
  "fetchedAt": 1791264068,
  "extractorVersion": "1",
  "verifiedAt": null
}

Request body

12 properties · 3 required · 6 $defs
propertytypedescriptionconstraints
model*stringThe 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*integerThe 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
systemstring | TextBlock[]A system prompt that sets the model's behavior. Pass either a single string or an array of text content blocks.
temperaturenumberControls randomness. Lower values are more deterministic. Range: 0 to 1.0 ≤ n ≤ 1 · default: 1
top_pnumberNucleus sampling: only consider tokens with cumulative probability up to this value.0 < n ≤ 1
top_kintegerLimits token selection to the top K most probable tokens at each step.n ≥ 0
stop_sequencesstring[]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.
streambooleanIf `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
toolsToolDefinition[]A list of tools the model may call. Each tool has a `name`, `description`, and `input_schema` (a JSON Schema object).
tool_choiceobject | object | object | …Controls which tool (if any) the model must call.
metadataobjectAn object describing metadata about the request. Supports `user_id` for abuse detection.

Types

6 $defs

InputMessageobject

A message in the conversation.

role*enumThe role of the message author. System prompts are passed via the top-level `system` field, not as a message.user | assistant
content*string | TextBlock | ToolUseBlock | ToolResultBlock[]The message content. Pass a string for text-only messages or an array of content blocks for messages that include tool calls or tool results.

TextBlockobject

A text content block.

type*constThe block type, always `text`."text"
text*stringThe text content.

ToolChoiceobject | object | object | …

Controls which tool (if any) the model calls.

ToolDefinitionobject

A tool the model can call.

name*stringA unique name for the tool.
descriptionstringA description of what the tool does. The model uses this to decide when to call it.
input_schema*objectA JSON Schema object describing the tool's expected input.

ToolResultBlockobject

A tool result content block supplied by the user in response to a tool call.

type*constThe block type, always `tool_result`."tool_result"
tool_use_id*stringThe `id` of the `tool_use` block this result responds to.
content*string | TextBlock[]The tool's output. Pass a string for simple results or an array of text blocks for structured output.
is_errorbooleanSet to `true` if the tool call raised an error.default: false

ToolUseBlockobject

A tool use content block generated by the model.

type*constThe block type, always `tool_use`."tool_use"
id*stringA unique identifier for this tool call. Use this as `tool_use_id` in the matching tool result.
name*stringThe name of the tool being called.
input*objectThe arguments passed to the tool, matching the tool's `input_schema`.

Validate a payload

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