Skip to content

Shared Objects

Chat message

General shape:

json
{
  "role": "user",
  "content": "My message"
}

Version with structured content:

json
{
  "role": "user",
  "content": [
    {
      "type": "text",
      "text": "Analyze this content"
    }
  ]
}

denied_tools

Used by POST /v1/chat/resume to deny an execution.

json
[
  {
    "tool_execution_id": "1fb2fd25-8f78-412a-a0b8-7976e3700fc4",
    "reason": "Action denied"
  }
]

usage

Usage object returned in standard responses:

json
{
  "prompt_tokens": 120,
  "completion_tokens": 84,
  "total_tokens": 204
}

kitemesh

Some responses add a kitemesh object that is useful on the client side.

Typical fields include:

  • approval_id
  • execution_id
  • expires_at
  • credits_charged
  • request_id

tool_calls

When approval is required, tool calls appear in tool_calls.

json
[
  {
    "id": "1fb2fd25-8f78-412a-a0b8-7976e3700fc4",
    "type": "function",
    "function": {
      "name": "create_ticket",
      "arguments": "{\"priority\":\"high\"}"
    }
  }
]

Standard error object

Errors follow this structure:

json
{
  "error": {
    "message": "Rate limit exceeded",
    "type": "rate_limit_error",
    "code": "rate_limit_exceeded",
    "request_id": "req_123"
  }
}