Skip to content

Shared Objects

Model target

Chat endpoints use a model target string:

text
group:123e4567-e89b-12d3-a456-426614174000
custom:123e4567-e89b-12d3-a456-426614174111

Use group:<uuid> for a group model and custom:<uuid> for a custom model.

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"
  }
]

reason is optional and can contain up to 2000 characters.

Share scope

Tools, API resources, and uploaded files can be shared with teams, custom models, or group models.

json
{
  "type": "team",
  "id": "123e4567-e89b-12d3-a456-426614174000"
}

Accepted type values are:

  • team
  • customModel
  • groupModel

Model reference

Group models use ModelRef objects for the brain and agents.

json
{
  "type": "custom",
  "customModelId": "123e4567-e89b-12d3-a456-426614174111"
}

Accepted forms are:

  • { "type": "llm", "llmModelName": "gpt-5-mini" }
  • { "type": "custom", "customModelId": "<uuid>" }
  • { "type": "group", "groupModelId": "<uuid>" }

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"
  }
}

In streaming mode, the same shape can appear in an SSE data: event before data: [DONE].