Gradium · AsyncAPI Specification

Gradium Speech Streaming API

Version 1.0.0

AsyncAPI capture of Gradium's real-time speech WebSocket surface (TTS, STT, and Speech-to-Speech). Generated by API Evangelist from the documented WebSocket lifecycle and message shapes — Gradium does not publish an AsyncAPI document. Message payloads and close codes are grounded in the Gradium docs; refine against the live protocol before production use.

View Spec View on GitHub CompanyAi MlVoice AIText-to-SpeechSpeech-to-TextSpeech to SpeechVoice CloningAudioReal-Time StreamingWebSocketDeveloper APIVoice AgentsAsyncAPIEventsWebSockets

Channels

tts
Text-to-Speech streaming — send text, receive audio chunks.
asr
Speech-to-Text streaming — send audio, receive transcribed text with semantic VAD.
s2s
Speech-to-Speech streaming — transcribe, optionally translate, and re-synthesize in real time.

Messages

Setup
Session setup
TextInput
TextInput
TextOutput
TextOutput
AudioInput
AudioInput
AudioOutput
AudioOutput
Ready
Ready
Step
Step
Flush
Flush
EndOfStream
EndOfStream
ErrorMessage
ErrorMessage

Servers

wss
production
Gradium real-time WebSocket API. Auth via x-api-key (server) or ?token= (browser short-lived token).

AsyncAPI Specification

Raw ↑
asyncapi: 3.0.0
info:
  title: Gradium Speech Streaming API
  version: '1.0.0'
  description: >-
    AsyncAPI capture of Gradium's real-time speech WebSocket surface (TTS, STT, and
    Speech-to-Speech). Generated by API Evangelist from the documented WebSocket
    lifecycle and message shapes — Gradium does not publish an AsyncAPI document.
    Message payloads and close codes are grounded in the Gradium docs; refine against
    the live protocol before production use.
  x-apievangelist-method: generated
  x-apievangelist-source: >-
    https://docs.gradium.ai/guides/websocket-lifecycle,
    https://docs.gradium.ai/guides/browser-websockets,
    https://docs.gradium.ai/guides/errors
servers:
  production:
    host: api.gradium.ai
    pathname: /api
    protocol: wss
    description: Gradium real-time WebSocket API. Auth via x-api-key (server) or ?token= (browser short-lived token).
channels:
  tts:
    address: /speech/tts
    description: Text-to-Speech streaming — send text, receive audio chunks.
    messages:
      setup: { $ref: '#/components/messages/Setup' }
      text: { $ref: '#/components/messages/TextInput' }
      flush: { $ref: '#/components/messages/Flush' }
      endOfStream: { $ref: '#/components/messages/EndOfStream' }
      ready: { $ref: '#/components/messages/Ready' }
      audio: { $ref: '#/components/messages/AudioOutput' }
      error: { $ref: '#/components/messages/ErrorMessage' }
  asr:
    address: /speech/asr
    description: Speech-to-Text streaming — send audio, receive transcribed text with semantic VAD.
    messages:
      setup: { $ref: '#/components/messages/Setup' }
      audio: { $ref: '#/components/messages/AudioInput' }
      flush: { $ref: '#/components/messages/Flush' }
      endOfStream: { $ref: '#/components/messages/EndOfStream' }
      ready: { $ref: '#/components/messages/Ready' }
      text: { $ref: '#/components/messages/TextOutput' }
      step: { $ref: '#/components/messages/Step' }
      error: { $ref: '#/components/messages/ErrorMessage' }
  s2s:
    address: /speech/s2s
    description: Speech-to-Speech streaming — transcribe, optionally translate, and re-synthesize in real time.
    messages:
      setup: { $ref: '#/components/messages/Setup' }
      audio: { $ref: '#/components/messages/AudioInput' }
      flush: { $ref: '#/components/messages/Flush' }
      endOfStream: { $ref: '#/components/messages/EndOfStream' }
      ready: { $ref: '#/components/messages/Ready' }
      audioOut: { $ref: '#/components/messages/AudioOutput' }
      error: { $ref: '#/components/messages/ErrorMessage' }
operations:
  ttsSend:
    action: send
    channel: { $ref: '#/channels/tts' }
  ttsReceive:
    action: receive
    channel: { $ref: '#/channels/tts' }
  asrSend:
    action: send
    channel: { $ref: '#/channels/asr' }
  asrReceive:
    action: receive
    channel: { $ref: '#/channels/asr' }
  s2sSend:
    action: send
    channel: { $ref: '#/channels/s2s' }
  s2sReceive:
    action: receive
    channel: { $ref: '#/channels/s2s' }
components:
  messages:
    Setup:
      name: setup
      title: Session setup
      payload:
        type: object
        properties:
          type: { type: string, const: setup }
          voice_id: { type: string }
          output_format: { type: string, description: 'e.g. wav, pcm, opus, pcm_16000, ulaw_8000' }
          input_format: { type: string, description: 'STT/S2S input encoding, e.g. pcm_16000' }
    TextInput:
      name: text
      payload:
        type: object
        properties:
          type: { type: string, const: text }
          text: { type: string }
    TextOutput:
      name: text
      payload:
        type: object
        properties:
          type: { type: string, const: text }
          text: { type: string }
    AudioInput:
      name: audio
      payload:
        type: object
        properties:
          type: { type: string, const: audio }
          audio: { type: string, description: base64-encoded audio chunk }
    AudioOutput:
      name: audio
      payload:
        type: object
        properties:
          type: { type: string, const: audio }
          audio: { type: string, description: base64-encoded synthesized audio chunk }
    Ready:
      name: ready
      payload:
        type: object
        properties:
          type: { type: string, const: ready }
    Step:
      name: step
      description: STT semantic-VAD progress event (emitted roughly every 80ms).
      payload:
        type: object
        properties:
          type: { type: string, const: step }
    Flush:
      name: flush
      payload:
        type: object
        properties:
          type: { type: string, const: flush }
    EndOfStream:
      name: end_of_stream
      payload:
        type: object
        properties:
          type: { type: string, const: end_of_stream }
    ErrorMessage:
      name: error
      payload:
        type: object
        properties:
          type: { type: string, const: error }
          message: { type: string }
          code: { type: integer, description: '1008 = policy violation (auth/setup/format); 1011 = internal server error' }

Work with this as data

Every AsyncAPI spec here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for asyncapi

4 MCP tools reach this
  • find_asyncapisBrowse and filter every AsyncAPI spec in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This AsyncAPI spec
curl "https://apis.io/api/v1/asyncapis/gradium-speech-asyncapi"
All asyncapi
curl "https://apis.io/api/v1/asyncapis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.