/ Docs
APIChat

Get Stream Event Schema

Expose StreamEvent in OpenAPI for frontend type generation. Returns a dummy ``PartEndEvent`` — the important part is the ``response_model`` annotation which puts the full discriminated union into the OpenAPI schema. The bot still emits these inside ``AssistantDeltaEvent.frame`` over Centrifugo.

GET
/v1/chat/stream-event-schema

Authorization

BearerAuth
AuthorizationBearer <token>

Botyard API key — see /docs/authentication.

In: header

Response Body

application/json

curl -X GET "https://example.com/v1/chat/stream-event-schema"
{
  "index": 0,
  "part": {
    "content": "string",
    "id": "string",
    "provider_name": "string",
    "provider_details": {},
    "part_kind": "text"
  },
  "previous_part_kind": "text",
  "event_kind": "part_start"
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "error_code": "string",
  "errors": [
    {
      "pointer": "string",
      "detail": "string",
      "type": "string"
    }
  ],
  "trace_id": "string"
}