Claude · Schema

CreateMessageRequest

Artificial IntelligenceChatbotsConversational AIGenerative AILarge Language ModelsMachine-LearningNatural Language Processing

Properties

Name Type Description
model string The model that will complete your prompt. See the list of available models.
max_tokens integer The maximum number of tokens to generate before stopping. Different models support different maximum values.
messages array Input messages. Alternating user and assistant conversational turns. Maximum 100,000 messages per request.
system object System prompt providing context and instructions to Claude. Can be a string or array of content blocks.
temperature number Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Use closer to 0.0 for analytical tasks, closer to 1.0 for creative tasks.
top_p number Use nucleus sampling. Recommended to use either temperature or top_p, but not both.
top_k integer Only sample from the top K options for each subsequent token.
stop_sequences array Custom text sequences that will cause the model to stop generating.
stream boolean Whether to incrementally stream the response using server-sent events.
metadata object
tools array Definitions of tools that the model may use.
tool_choice object
thinking object
output_config object
service_tier string Service tier to use for this request.
cache_control object
View JSON Schema on GitHub

JSON Schema

claude-createmessagerequest-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CreateMessageRequest",
  "title": "CreateMessageRequest",
  "type": "object",
  "required": [
    "model",
    "max_tokens",
    "messages"
  ],
  "properties": {
    "model": {
      "type": "string",
      "description": "The model that will complete your prompt. See the list of available models.",
      "example": "claude-sonnet-4-6"
    },
    "max_tokens": {
      "type": "integer",
      "description": "The maximum number of tokens to generate before stopping. Different models support different maximum values.",
      "minimum": 1,
      "example": 1024
    },
    "messages": {
      "type": "array",
      "description": "Input messages. Alternating user and assistant conversational turns. Maximum 100,000 messages per request.",
      "items": {
        "$ref": "#/components/schemas/MessageParam"
      },
      "minItems": 1,
      "example": []
    },
    "system": {
      "description": "System prompt providing context and instructions to Claude. Can be a string or array of content blocks.",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/components/schemas/TextBlockParam"
          }
        }
      ],
      "example": "example_value"
    },
    "temperature": {
      "type": "number",
      "description": "Amount of randomness injected into the response. Ranges from 0.0 to 1.0. Use closer to 0.0 for analytical tasks, closer to 1.0 for creative tasks.",
      "minimum": 0.0,
      "maximum": 1.0,
      "default": 1.0,
      "example": 42.5
    },
    "top_p": {
      "type": "number",
      "description": "Use nucleus sampling. Recommended to use either temperature or top_p, but not both.",
      "minimum": 0.0,
      "maximum": 1.0,
      "example": 42.5
    },
    "top_k": {
      "type": "integer",
      "description": "Only sample from the top K options for each subsequent token.",
      "minimum": 1,
      "example": 10
    },
    "stop_sequences": {
      "type": "array",
      "description": "Custom text sequences that will cause the model to stop generating.",
      "items": {
        "type": "string"
      },
      "example": []
    },
    "stream": {
      "type": "boolean",
      "description": "Whether to incrementally stream the response using server-sent events.",
      "default": false,
      "example": true
    },
    "metadata": {
      "$ref": "#/components/schemas/Metadata"
    },
    "tools": {
      "type": "array",
      "description": "Definitions of tools that the model may use.",
      "items": {
        "$ref": "#/components/schemas/Tool"
      },
      "example": []
    },
    "tool_choice": {
      "$ref": "#/components/schemas/ToolChoice"
    },
    "thinking": {
      "$ref": "#/components/schemas/ThinkingConfig"
    },
    "output_config": {
      "$ref": "#/components/schemas/OutputConfig"
    },
    "service_tier": {
      "type": "string",
      "description": "Service tier to use for this request.",
      "enum": [
        "auto",
        "standard_only"
      ],
      "default": "auto",
      "example": "auto"
    },
    "cache_control": {
      "$ref": "#/components/schemas/CacheControl"
    }
  }
}

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.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/claude-createmessagerequest"
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.