Baseten · Schema
MessagesResponse
The message response returned by the model.
Artificial IntelligenceMLInferenceDeploymentMLOpsOpenAI-CompatibleAnthropic CompatibleTruss
Properties
| Name | Type | Description |
|---|---|---|
| id | string | A unique identifier for this message, such as `msg_abc123`. |
| type | string | The object type, always `message`. |
| role | string | The role of the generated message, always `assistant`. |
| content | array | 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 | string | 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). |
| stop_sequence | string | The stop sequence that was matched, if `stop_reason` is `stop_sequence`. Otherwise `null`. |
| usage | object | Token usage statistics for the request. |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/MessagesResponse",
"title": "MessagesResponse",
"additionalProperties": false,
"type": "object",
"required": [
"id",
"type",
"role",
"content",
"model",
"stop_reason",
"usage"
],
"description": "The message response returned by the model.",
"properties": {
"id": {
"type": "string",
"description": "A unique identifier for this message, such as `msg_abc123`."
},
"type": {
"const": "message",
"type": "string",
"description": "The object type, always `message`."
},
"role": {
"const": "assistant",
"type": "string",
"description": "The role of the generated message, always `assistant`."
},
"content": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/TextBlock"
},
{
"$ref": "#/components/schemas/ToolUseBlock"
}
]
},
"description": "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": {
"type": "string",
"description": "The model slug that produced the response."
},
"stop_reason": {
"type": "string",
"enum": [
"end_turn",
"max_tokens",
"stop_sequence",
"tool_use"
],
"description": "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)."
},
"stop_sequence": {
"type": "string",
"nullable": true,
"description": "The stop sequence that was matched, if `stop_reason` is `stop_sequence`. Otherwise `null`."
},
"usage": {
"$ref": "#/components/schemas/Usage",
"description": "Token usage statistics for the request."
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/baseten-messagesresponse"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.