Layercode

Layercode provides voice-AI agent infrastructure - low-latency voice pipelines that turn any LLM or text-based agent into a conversational voice agent for web, mobile, and phone. A REST API manages agents, sessions, and outbound calls, while a realtime WebSocket transport streams audio to the browser and a signed webhook delivers transcripts to your backend, which streams text-to-speech responses back over Server-Sent Events.

4 APIs 0 Features
AIVoiceVoice AgentsRealtimeLow Latency

APIs

Layercode Agents API

List, create, retrieve, and update voice agents (pipelines) and authorize browser client sessions against an agent using an org-scoped API key.

Layercode Sessions API

Retrieve session detail - transcript, duration, metadata, and recording status - for a conversation handled by an agent, and download the session audio recording, plus initiate ...

Layercode Realtime Voice API

Bidirectional realtime WebSocket transport that streams base64 PCM microphone audio from the browser to Layercode and streams synthesized speech, transcripts, and structured dat...

Layercode Webhooks API

HMAC-signed webhook Layercode POSTs to your backend with session and transcript events (session.start, message, data, session.update, session.end); your backend streams response...

Collections

Pricing Plans

Layercode Plans Pricing

1 plans

PLANS

Rate Limits

Layercode Rate Limits

3 limits

RATE LIMITS

FinOps

Event Specifications

Layercode Realtime Voice WebSocket API

AsyncAPI 2.6 description of Layercode's **realtime voice transport**, a genuine bidirectional WebSocket documented at https://docs.layercode.com/api-reference/frontend-ws-api. U...

ASYNCAPI

Resources

👥
GitHubOrganization
GitHubOrganization
🔗
LinkedIn
LinkedIn
🔗
Website
Website
🔗
Documentation
Documentation
🔗
Plans
Plans
🔗
RateLimits
RateLimits
🔗
FinOps
FinOps

Sources

Raw ↑
opencollection: 1.0.0
info:
  name: Layercode REST API
  version: '1.0'
request:
  auth:
    type: bearer
    token: '{{bearerToken}}'
items:
- info:
    name: Agents
    type: folder
  items:
  - info:
      name: List agents
      type: http
    http:
      method: GET
      url: https://api.layercode.com/v1/agents
    docs: Returns all voice agents (pipelines) in the organization.
  - info:
      name: Create an agent
      type: http
    http:
      method: POST
      url: https://api.layercode.com/v1/agents
      body:
        type: json
        data: '{}'
    docs: Creates a new voice agent, optionally from a template.
  - info:
      name: Get an agent
      type: http
    http:
      method: GET
      url: https://api.layercode.com/v1/agents/{agent_id}
    docs: Retrieves a single agent by id.
  - info:
      name: Update an agent
      type: http
    http:
      method: POST
      url: https://api.layercode.com/v1/agents/{agent_id}
      body:
        type: json
        data: '{}'
    docs: Updates mutable agent fields such as name and webhook URL.
  - info:
      name: Authorize a browser client session
      type: http
    http:
      method: POST
      url: https://api.layercode.com/v1/agents/web/authorize_session
      body:
        type: json
        data: '{}'
    docs: Returns a short-lived client_session_key the browser uses to open the realtime WebSocket, plus the conversation_id.
- info:
    name: Sessions
    type: folder
  items:
  - info:
      name: Get session detail
      type: http
    http:
      method: GET
      url: https://api.layercode.com/v1/agents/{agent_id}/sessions/{session_id}
    docs: Returns metadata, transcript, duration, and recording status for a single session.
  - info:
      name: Download session recording
      type: http
    http:
      method: GET
      url: https://api.layercode.com/v1/agents/{agent_id}/sessions/{session_id}/recording
    docs: Returns the WAV audio recording for the session, when available.
- info:
    name: Calls
    type: folder
  items:
  - info:
      name: Initiate an outbound call
      type: http
    http:
      method: POST
      url: https://api.layercode.com/v1/agents/{agent_id}/calls/initiate_outbound
      body:
        type: json
        data: '{}'
    docs: Places an outbound phone call from an assigned phone number to a destination number, connecting the callee to the
      voice agent.