{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cekura-ai/json-schema/cekura-ai-api-chat-turn-schema.json",
  "title": "ApiChatTurn",
  "description": "Request body for POST /runs/{run_id}/chat/ (submit one turn). Same message shape\nas the websocket chat integration: a normal message (`content`), optional `metadata`\nmerged into the run, and/or a function call (`role` + `data`).",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cekura-ai-runs-api-openapi.yml#/components/schemas/ApiChatTurn",
  "type": "object",
  "properties": {
    "content": {
      "type": "string",
      "description": "Your agent-under-test's latest message. Submitting it returns a `turn_id`; poll GET /runs/{run_id}/chat/{turn_id}/ for the simulated user's reply."
    },
    "metadata": {
      "type": "object",
      "additionalProperties": {},
      "description": "Optional metadata merged into the run (last-write-wins). Can be sent alone."
    },
    "role": {
      "enum": [
        "Function Call",
        "Function Call Result"
      ],
      "type": "string",
      "x-spec-enum-id": "96979c0bc176b860",
      "description": "Set to record a tool call instead of a message (no reply is generated).\n\n* `Function Call` - Function Call\n* `Function Call Result` - Function Call Result"
    },
    "data": {
      "type": "object",
      "additionalProperties": {},
      "description": "Function-call payload: {id, name, arguments} for a call, {id, result} for a result."
    }
  }
}