> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pilotstatus.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Create realtime session

> Creates a short-lived token and WebSocket URL for streaming realtime PCM audio to/from an active call.



## OpenAPI

````yaml openapi.evolution-go.json POST /call/media/realtime/session
openapi: 3.1.0
info:
  title: Evolution GO Layer
  version: 1.0.0
  description: >-
    Pilot Status API Layer — Evolution GO. Base URL
    `https://pilotstatus.com.br/api/layer/evolution-go`. Authenticate with the
    `apikey` header (your Pilot Status `ps_` key) or `Authorization: Bearer`.
    Instance/session endpoints are NOT available through the layer.
servers:
  - url: https://pilotstatus.com.br/api/layer/evolution-go
security:
  - apiKey: []
tags:
  - name: Call (voice)
  - name: Chat
  - name: Community
  - name: Group
  - name: Label
  - name: Message
  - name: Newsletter / Channels
  - name: Send (load-balanced)
  - name: User / Contacts
paths:
  /call/media/realtime/session:
    post:
      tags:
        - Call (voice)
      summary: Create realtime session
      description: >-
        Creates a short-lived token and WebSocket URL for streaming realtime PCM
        audio to/from an active call.
      operationId: post__call_media_realtime_session
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                callId:
                  type: string
                  description: Identifier of the active call to attach media to.
                  example: 3EB0C767D26A8B4E7F1A
                mode:
                  type: string
                  description: >-
                    `talk` (send and receive audio, default) or `listen`
                    (receive only).
                  example: talk
              required:
                - callId
      responses:
        '200':
          description: Success — provider-native response body.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Operation status, always "success" on 200
                  data:
                    type: object
                    description: >-
                      Realtime media session credentials for the WebSocket audio
                      bridge
                    properties:
                      token:
                        type: string
                        description: One-time media token (expires ~2 minutes)
                      wsUrl:
                        type: string
                        description: >-
                          Absolute WebSocket URL for the realtime audio bridge,
                          with token query
                      mode:
                        type: string
                        description: >-
                          Media direction: "talk" (send PCM to call) or "listen"
                          (receive peer audio)
              example:
                message: success
                data:
                  token: b1e6d2a4-9f7c-4c2e-8a3b-6d5f0e1c2a34
                  wsUrl: >-
                    wss://evolution-go.pilotstatus.com.br/call/media/realtime/ws/f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454/5B8F9A2E1C3D4F6A7B8C?token=b1e6d2a4-9f7c-4c2e-8a3b-6d5f0e1c2a34
                  mode: talk
        default:
          description: Error — provider or layer error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  error:
                    type: string
                  message:
                    type: string
                  response:
                    type: object
              example:
                status: 400
                error: Bad Request
                message: Invalid payload
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: >-
        Your Pilot Status API key (ps_...). Evolution GO also accepts
        `Authorization: Bearer <key>`.

````