> This page is for APIs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# ai.response

GET /

Receive ai.response events

Reference: https://signalwire.com/docs/apis/relay/client/fabric/ai-response

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: ai.response
  version: subpackage_aiResponse.ai.response
  description: Receive ai.response events
channels:
  /:
    description: Receive ai.response events
    publish:
      operationId: subpackage_aiResponse.ai.response-publish
      summary: ai.response
      message:
        name: onAiResponseFabricAiResponseEvent
        title: ai.response
        payload:
          $ref: '#/components/schemas/ai.response_fabricAiResponseEvent'
servers:
  production:
    url: wss://relay.signalwire.com/
    protocol: wss
    x-default: true
components:
  schemas:
    ChannelsAiResponseMessagesFabricAiResponseEventJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsAiResponseMessagesFabricAiResponseEventJsonrpc
    ChannelsAiResponseMessagesFabricAiResponseEventMethod:
      type: string
      enum:
        - signalwire.event
      description: Always `signalwire.event`.
      title: ChannelsAiResponseMessagesFabricAiResponseEventMethod
    ChannelsAiResponseMessagesFabricAiResponseEventParamsEventType:
      type: string
      enum:
        - ai.response
      description: The event type — identifies which event this is.
      title: ChannelsAiResponseMessagesFabricAiResponseEventParamsEventType
    Fabric.FabricAiResponseParams:
      type: object
      properties:
        call_id:
          type: string
          description: >-
            Unique identifier of the call this event is about. Always present on
            Fabric events.
        node_id:
          type: string
          description: The node the call leg lives on.
        room_session_id:
          type: string
          description: >-
            The room session this call leg belongs to. In a 1:1 call this equals
            the `call_id`.
        segment_id:
          type: string
          description: >-
            Identifier of the call segment this event belongs to, for
            correlating events within the same segment.
        tag:
          type: string
          description: >-
            The `tag` the leg was dialed with, when a server-side application
            set one on the dial. Absent otherwise.
        response:
          type: string
          description: >-
            The assistant's full response text for the turn. Redacted when the
            app has `redact_prompt` set.
      required:
        - call_id
        - node_id
        - room_session_id
        - response
      title: Fabric.FabricAiResponseParams
    ChannelsAiResponseMessagesFabricAiResponseEventParams:
      type: object
      properties:
        event_type:
          $ref: >-
            #/components/schemas/ChannelsAiResponseMessagesFabricAiResponseEventParamsEventType
          description: The event type — identifies which event this is.
        event_channel:
          type: string
          description: >-
            The channel the event was delivered on — for Calling events, the
            `protocol`

            string your connection received from `signalwire.connect`.
        timestamp:
          type: number
          format: double
          description: >-
            When the event was emitted, as a Unix timestamp in seconds. Always
            present.
        project_id:
          type: string
          description: >-
            Your project ID. Present on Calling events and most Call Fabric
            events; absent on `call.joined`, `call.left`, `member.joined`, and
            `member.left`.
        space_id:
          type: string
          description: >-
            Your space ID. Present on Calling events and most Call Fabric
            events; absent on `call.joined`, `call.left`, `member.joined`, and
            `member.left`.
        params:
          $ref: '#/components/schemas/Fabric.FabricAiResponseParams'
          description: The event-specific payload.
      required:
        - event_type
        - event_channel
        - timestamp
        - params
      description: The event envelope.
      title: ChannelsAiResponseMessagesFabricAiResponseEventParams
    ai.response_fabricAiResponseEvent:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsAiResponseMessagesFabricAiResponseEventJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: >-
            Event id — a unique UUID generated for each event. Events are
            notifications: you do not reply to them.
        method:
          $ref: >-
            #/components/schemas/ChannelsAiResponseMessagesFabricAiResponseEventMethod
          description: Always `signalwire.event`.
        params:
          $ref: >-
            #/components/schemas/ChannelsAiResponseMessagesFabricAiResponseEventParams
          description: The event envelope.
      required:
        - jsonrpc
        - id
        - method
        - params
      description: >-
        Fires on a Call Fabric call leg when the agent produces its full
        response text for a turn. Same fields as the Calling API's
        `calling.ai.response` event. SWML or a server-side application starts
        the AI agent on the leg; there is no client request that starts it.
      title: ai.response_fabricAiResponseEvent

```