Tutorial

Prerequisites

  • A VoIPBin API token.

  • Two calls that are connected to each other (for example a call routed by the connect action). Obtain the call id from GET /calls.

One interpretation is one call. To interpret both parties, start one interpretation for each call and swap the languages, so that language of one is peer_language of the other (the echo suppression works only for a matching pair).

Start an interpretation

$ curl -X POST 'https://api.voipbin.net/v1.0/interprets?token=<your-token>' \
    -H 'Content-Type: application/json' \
    -d '{
        "call_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "language": "en-US",
        "peer_language": "es-ES",
        "keep_original_audio": false
    }'

{
    "id": "3f6c8d2a-5b1e-4a7c-9d0f-2e4b6a8c0d11",
    "call_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "peer_call_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "language": "en-US",
    "peer_language": "es-ES",
    "status": "progressing",
    ...
}

The response is 409 when the call already has an interpretation or is not a progressing two party call, 400 when a language is not supported or both languages are equal, 429 above the concurrent limit, and 503 when the translation provider is not configured or the interpretation could not be started.

Interpret the other party too

$ curl -X POST 'https://api.voipbin.net/v1.0/interprets?token=<your-token>' \
    -H 'Content-Type: application/json' \
    -d '{
        "call_id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "language": "es-ES",
        "peer_language": "en-US"
    }'

Start it from a connect action

{
    "type": "connect",
    "option": {
        "destinations": [{"type": "tel", "target": "+821100000001"}],
        "interpret_origin_language": "en-US",
        "interpret_peer_language": "es-ES",
        "interpret_speakers": "both"
    }
}

interpret_speakers is both (default), origin or peer. Both languages are given from the point of view of the connect: the interpretation of the connected call uses them swapped.

Read the utterances

$ curl -X GET 'https://api.voipbin.net/v1.0/interprets/3f6c8d2a-5b1e-4a7c-9d0f-2e4b6a8c0d11/utterances?token=<your-token>'

{
    "result": [
        {
            "id": "9a8b7c6d-5e4f-4321-8765-0fedcba98765",
            "speaker_language": "en-US",
            "listener_language": "es-ES",
            "speech_text": "Hello, how can I help you?",
            "translated_text": "Hola, en que puedo ayudarle?",
            "latency_ms": 1500,
            ...
        }
    ],
    "next_page_token": "2026-12-04T10:15:35.000000Z"
}

Stop and delete

$ curl -X POST 'https://api.voipbin.net/v1.0/interprets/3f6c8d2a-5b1e-4a7c-9d0f-2e4b6a8c0d11/stop?token=<your-token>'
$ curl -X DELETE 'https://api.voipbin.net/v1.0/interprets/3f6c8d2a-5b1e-4a7c-9d0f-2e4b6a8c0d11?token=<your-token>'

An interpretation that is still active must be stopped before it is deleted (409 otherwise). Deleting removes its utterances.