{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paper-instruments/json-schema/paper-instruments-post-v1-messages-request-schema.json",
  "title": "PostV1MessagesRequest",
  "x-generated": "2026-10-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/paper-instruments-openapi-generated.yml#/components/schemas/PostV1MessagesRequest",
  "type": "object",
  "properties": {
    "model": {
      "type": "string",
      "description": "Required. ultramarine-1-flash"
    },
    "max_tokens": {
      "type": "integer",
      "description": "Required. Positive integer, including reasoning"
    },
    "messages": {
      "type": "array",
      "description": "Required. user and assistant turns, ending with a user turn"
    },
    "system": {
      "type": "string",
      "description": "String or text blocks"
    },
    "output_config": {
      "type": "object",
      "description": "Object with effort and format fields"
    },
    "thinking": {
      "type": "object",
      "description": "{\"type\": \"adaptive\"}, optionally with \"display\": \"omitted\""
    },
    "stream": {
      "type": "boolean",
      "description": "true or false"
    },
    "tools": {
      "type": "array",
      "description": "Custom tools with name, description, input_schema, and optional strict"
    },
    "tool_choice": {
      "type": "string",
      "description": "auto, any, none, or tool object"
    },
    "temperature": {
      "type": "number",
      "description": "Number, 0–1"
    },
    "top_p": {
      "type": "number",
      "description": "Number, 0–1"
    },
    "top_k": {
      "type": "integer",
      "description": "Integer, -1 or greater"
    },
    "metadata": {
      "type": "object",
      "description": "Object with user_id field"
    },
    "cache_control": {
      "type": "object",
      "description": "{\"type\": \"ephemeral\"}"
    },
    "context_management": {
      "type": "object",
      "description": "Object with edits array"
    }
  },
  "required": [
    "model",
    "max_tokens",
    "messages"
  ]
}