Casama AI Voice API

The voice API from Casama AI, for voice.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 13

POST /v1/voice/transcribe Dictation: send recorded audio (raw body, audio/* content type, up to 10 MB) #
GET /v1/messages/{id}/speech Read aloud: MP3 audio of an assistant message (cached per voice) #
POST /v1/voice/session Start a live call: mints an ephemeral realtime key with the bot's persona and… #
POST /v1/voice/tool Run a tool call from a live call as an agent run (same approvals); waits up to… #
POST /v1/voice/transcript/turns Save finished turns of a live call as they happen (idempotent by turn id) #
POST /v1/voice/live/{id}/heartbeat Keep a live call's server record open; calls silent for 2 minutes are ended and… #
POST /v1/voice/transcript Save a call's transcript to the conversation and record its duration #
POST /v1/voice/live/{id}/steps/{step_id} Start a next step from a call's card as a chat run, or dismiss it #
DELETE /v1/voice/live/{id} Delete a call from its chat: its card and every turn of its transcript #
GET /v1/calls/ringing Calls ringing for you now (the in-app banner on desktop and web) #
GET /v1/calls/{id} Get voice call #
POST /v1/calls/{id}/answer Answer a call; then start a voice session with its call_id #
POST /v1/calls/{id}/decline Decline a call; the reason arrives as a normal notification #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/casama-ai:casama-ai-voice-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

casama-ai-voice-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Casama Voice API
  version: 0.1.0
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://api.casama.ai
tags:
- name: Voice
paths:
  /v1/voice/transcribe:
    post:
      operationId: transcribeAudio
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: 'Dictation: send recorded audio (raw body, audio/* content type, up to 10 MB)'
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: bot_id
        in: query
      - schema:
          type: string
          maxLength: 10
        required: false
        name: language
        in: query
      responses:
        '200':
          description: Text
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transcription'
        '400':
          description: Validation failed
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/messages/{id}/speech:
    get:
      operationId: messageSpeech
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: 'Read aloud: MP3 audio of an assistant message (cached per voice)'
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: MP3 audio
          content:
            audio/mpeg:
              schema:
                type: string
                format: binary
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/voice/session:
    post:
      operationId: createVoiceSession
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: 'Start a live call: mints an ephemeral realtime key with the bot''s persona and…'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceSessionRequest'
      responses:
        '200':
          description: Session
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceSession'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/voice/tool:
    post:
      operationId: voiceTool
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: Run a tool call from a live call as an agent run (same approvals); waits up to…
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceToolRequest'
      responses:
        '200':
          description: Result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceToolResult'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/voice/transcript/turns:
    post:
      operationId: saveVoiceTurns
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: Save finished turns of a live call as they happen (idempotent by turn id)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceTurnsRequest'
      responses:
        '200':
          description: Saved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedTurns'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/voice/live/{id}/heartbeat:
    post:
      operationId: voiceHeartbeat
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: Keep a live call's server record open; calls silent for 2 minutes are ended and…
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceHeartbeatRequest'
      responses:
        '200':
          description: Call
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VoiceHeartbeat'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/voice/transcript:
    post:
      operationId: saveVoiceTranscript
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: Save a call's transcript to the conversation and record its duration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoiceTranscriptRequest'
      responses:
        '200':
          description: Saved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SavedCount'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/voice/live/{id}/steps/{step_id}:
    post:
      operationId: updateCallStep
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: Start a next step from a call's card as a chat run, or dismiss it
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      - schema:
          type: string
          minLength: 1
          maxLength: 20
        required: true
        name: step_id
        in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CallStepRequest'
      responses:
        '200':
          description: Step
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CallStepResult'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/voice/live/{id}:
    delete:
      operationId: deleteLiveCall
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: 'Delete a call from its chat: its card and every turn of its transcript'
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletedCall'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/calls/ringing:
    get:
      operationId: listRingingCalls
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: Calls ringing for you now (the in-app banner on desktop and web)
      responses:
        '200':
          description: Calls
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneCallList'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/calls/{id}:
    get:
      operationId: getVoiceCall
      tags:
      - Voice
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Call
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneCall'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
      summary: Get voice call
      x-summary-source: derived
  /v1/calls/{id}/answer:
    post:
      operationId: answerVoiceCall
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: Answer a call; then start a voice session with its call_id
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Call
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneCall'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '409':
          description: Conflict
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/calls/{id}/decline:
    post:
      operationId: declineVoiceCall
      tags:
      - Voice
      security:
      - bearerAuth: []
      summary: Decline a call; the reason arrives as a normal notification
      parameters:
      - schema:
          type: string
          format: uuid
        required: true
        name: id
        in: path
      responses:
        '200':
          description: Call
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneCall'
        '401':
          description: Not authenticated
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '404':
          description: Not found
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    Transcription:
      type: object
      properties:
        text:
          type: string
        provider:
          type: string
        seconds:
          type: number
      required:
      - text
      - provider
      - seconds
    VoiceHeartbeat:
      type: object
      properties:
        ended:
          type: boolean
          description: The server already ended this call (no heartbeat in time); the app should hang up
      required:
      - ended
    PhoneCall:
      type: object
      properties:
        id:
          type: string
          format: uuid
        bot_id:
          type: string
          format: uuid
        bot_name:
          type: string
        reason:
          type: string
        status:
          type: string
          enum:
          - ringing
          - answered
          - declined
          - missed
          - cancelled
        conversation_id:
          type:
          - string
          - 'null'
          format: uuid
        expires_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
      required:
      - id
      - bot_id
      - bot_name
      - reason
      - status
      - conversation_id
      - expires_at
      - created_at
    DeletedCall:
      type: object
      properties:
        deleted:
          type: integer
      required:
      - deleted
    SavedCount:
      type: object
      properties:
        saved:
          type: integer
      required:
      - saved
    VoiceTranscriptRequest:
      type: object
      properties:
        conversation_id:
          type: string
          format: uuid
        live_call_id:
          type: string
          format: uuid
          description: 'The call (D-327): ends its server record. Turns already sent with /v1/voice/transcript/turns aren''t sent again'
        turns:
          type: array
          items:
            type: object
            properties:
              role:
                type: string
                enum:
                - user
                - assistant
              text:
                type: string
                minLength: 1
                maxLength: 20000
              id:
                type: string
                minLength: 1
                maxLength: 100
                description: The app's id for the turn; a turn sent twice with the same id is saved once
            required:
            - role
            - text
          maxItems: 500
        seconds:
          type: integer
          minimum: 0
          maximum: 86400
        provider:
          type: string
          enum:
          - gemini
          - openai
          description: Which live-call provider the call used. Every call is Gemini Live now (D-260); openai is still accepted from older apps.
        usage:
          type: object
          properties:
            input_audio_tokens:
              type: integer
              minimum: 0
            input_text_tokens:
              type: integer
              minimum: 0
            output_audio_tokens:
              type: integer
              minimum: 0
            output_text_tokens:
              type: integer
              minimum: 0
          required:
          - input_audio_tokens
          - input_text_tokens
          - output_audio_tokens
          - output_text_tokens
          description: 'Gemini Live: the call''s token counts from usageMetadata, so usage records the real cost instead of a per-minute estimate'
        ended:
          type: string
          enum:
          - person
          - bot
          - dropped
          - idle
          - limit
          - replaced
          description: 'How the call ended, for its card: the person hung up, the bot did (end_call), it dropped, it went quiet, a limit ended it, or another call took its place'
      required:
      - conversation_id
      - turns
      - seconds
    VoiceTurnsRequest:
      type: object
      properties:
        live_call_id:
          type: string
          format: uuid
        turns:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
                maxLength: 100
                description: The app's id for the turn; a turn sent twice with the same id is saved once
              role:
                type: string
                enum:
                - user
                - assistant
              text:
                type: string
                minLength: 1
                maxLength: 20000
            required:
            - id
            - role
            - text
          minItems: 1
          maxItems: 100
      required:
      - live_call_id
      - turns
    CallStepResult:
      type: object
      properties:
        run_id:
          type:
          - string
          - 'null'
          format: uuid
          description: The chat run a started step became
      required:
      - run_id
    Problem:
      type: object
      properties:
        type:
          type: string
          example: https://casama.ai/problems/not_found
        title:
          type: string
        status:
          type: integer
        code:
          type: string
          description: Stable error code
          example: not_found
        detail:
          type: string
        instance:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
            required:
            - path
            - message
          description: Field errors for validation_failed
      required:
      - type
      - title
      - status
      - code
    PhoneCallList:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/PhoneCall'
      required:
      - items
    VoiceHeartbeatRequest:
      type: object
      properties:
        usage:
          type: object
          properties:
            input_audio_tokens:
              type: integer
              minimum: 0
            input_text_tokens:
              type: integer
              minimum: 0
            output_audio_tokens:
              type: integer
              minimum: 0
            output_text_tokens:
              type: integer
              minimum: 0
          required:
          - input_audio_tokens
          - input_text_tokens
          - output_audio_tokens
          - output_text_tokens
          description: Gemini Live's token counts so far, billed if the call ends without the app
    VoiceSessionRequest:
      type: object
      properties:
        bot_id:
          type: string
          format: uuid
        conversation_id:
          type: string
          format: uuid
        call_id:
          type: string
          format: uuid
          description: 'An answered phone call: the session uses its conversation and the bot speaks first'
      required:
      - bot_id
    SavedTurns:
      type: object
      properties:
        saved:
          type: integer
      required:
      - saved
    CallStepRequest:
      type: object
      properties:
        action:
          type: string
          enum:
          - start
          - dismiss
      required:
      - action
    VoiceToolResult:
      type: object
      properties:
        status:
          type: string
          enum:
          - completed
          - failed
          - waiting_approval
          - running
        run_id:
          type: string
          format: uuid
          description: The tool's run; for stop_task, the run it stopped. All zeros when the tool started no run
        output:
          type: string
          description: Give this to the realtime model as the function output
        approval_id:
          type:
          - string
          - 'null'
          format: uuid
      required:
      - status
      - run_id
      - output
      - approval_id
    VoiceSession:
      type: object
      properties:
        provider:
          type: string
          enum:
          - gemini
          description: Gemini Live over a WebSocket, the only live-call provider (D-260)
        model:
          type: string
        client_secret:
          type: string
          description: Gemini's single-use token (the access_token query parameter)
        expires_at:
          type: string
          format: date-time
        connect_url:
          type: string
          description: Open a WebSocket here with ?access_token=<client_secret>
        setup:
          type:
          - object
          - 'null'
          additionalProperties: {}
          description: 'Send {setup: <this>} as the first message (add sessionResumption to reconnect)'
        conversation_id:
          type: string
          format: uuid
        tools:
          type: integer
        speak_first:
          type: boolean
        live_call_id:
          type: string
          format: uuid
          description: 'The server''s record of this call (D-327): send turns, heartbeats and the final transcript with it'
        limits:
          type: object
          properties:
            silence_seconds:
              type: integer
              description: Hang up after this long with nobody speaking and no job running
            heartbeat_seconds:
              type: integer
              description: Send a heartbeat this often; the server ends a call that stops sending them
            max_call_seconds:
              type: integer
              description: The longest the call may run
            warning_seconds:
              type: integer
              description: How long before max_call_seconds the bot should warn the person
            app_ends_at_max:
              type: boolean
              description: True when the app must end the call at max_call_seconds itself (it isn't relayed); false when the server's relay does
          required:
          - silence_seconds
          - heartbeat_seconds
          - max_call_seconds
          - warning_seconds
          - app_ends_at_max
          description: Call limits (D-426); older servers don't send them
      required:
      - provider
      - model
      - client_secret
      - expires_at
      - connect_url
      - setup
      - conversation_id
      - tools
      - speak_first
      - live_call_id
    VoiceToolRequest:
      type: object
      properties:
        bot_id:
          type: string
          format: uuid
        conversation_id:
          type: string
          format: uuid
        call_id:
          type: string
          minLength: 1
          maxLength: 200
        name:
          type: string
          minLength: 1
          maxLength: 200
        arguments:
          type: object
          additionalProperties: {}
        live_call_id:
          type: string
          format: uuid
          description: 'The call this tool runs on (D-327): stop_task stops the jobs started on it'
      required:
      - bot_id
      - conversation_id
      - call_id
      - name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase access token