Audio

    Upload and download audio recordings from mapping and testing runs, and generate voice clips from text for your tests to play.

    6 endpoints

    Get an upload URL

    POST/audio/upload-url

    Generate a pre-signed URL for uploading an audio file to S3.

    Body Parameters

    NameTypeRequiredDescription
    filenamestringrequiredName of the audio file. Note the all-lowercase spelling — the API rejects fileName
    categorystringrequiredtest, map, voice, or transcript. Use voice for audio your tests play (profile voice items).
    associatedIdstringoptionalRun, job or voice id this file belongs to. Defaults to the generated audioId
    contentTypestringrequiredMIME type (e.g., audio/wav, audio/mp3)

    Request

    bash
    curl -X POST -H "x-api-key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"filename":"recording.wav","contentType":"audio/wav","category":"voice"}' \
      https://api.nopaque.co.uk/audio/upload-url

    Response

    json
    {
      "uploadUrl": "https://s3.eu-west-2.amazonaws.com/...",
      "audioId": "aud_abc123",
      "expiresIn": 3600
    }

    Get a download URL

    GET/audio/download-url

    Generate a pre-signed URL for downloading an audio file.

    Query Parameters

    NameTypeRequiredDescription
    audioIdstringrequiredAudio file ID

    Request

    bash
    curl -H "x-api-key: YOUR_API_KEY" \
      "https://api.nopaque.co.uk/audio/download-url?audioId=aud_abc123"

    Response

    json
    {
      "downloadUrl": "https://s3.eu-west-2.amazonaws.com/...",
      "expiresIn": 3600
    }

    List audio files

    GET/audio

    List all audio files in the workspace.

    Query Parameters

    NameTypeRequiredDescription
    limitnumberoptionalMaximum items to return (default 50)
    nextTokenstringoptionalPagination token from previous response

    Request

    bash
    curl -H "x-api-key: YOUR_API_KEY" \
      https://api.nopaque.co.uk/audio

    Response

    json
    {
      "audioFiles": [
        {
          "id": "aud_abc123",
          "filename": "recording.wav",
          "contentType": "audio/wav",
          "createdAt": "2026-04-10T12: 00: 00Z"
        }
      ],
      "count": 1
    }

    Get an audio file

    GET/audio/{id}

    Get metadata for a specific audio file.

    Path Parameters

    NameTypeRequiredDescription
    idstringrequiredAudio file ID

    Request

    bash
    curl -H "x-api-key: YOUR_API_KEY" \
      https://api.nopaque.co.uk/audio/aud_abc123

    Response

    json
    {
      "id": "aud_abc123",
      "filename": "recording.wav",
      "contentType": "audio/wav",
      "sizeBytes": 1048576,
      "createdAt": "2026-04-10T12: 00: 00Z"
    }

    Delete an audio file

    DELETE/audio/{id}

    Delete an audio file and its S3 object.

    Path Parameters

    NameTypeRequiredDescription
    idstringrequiredAudio file ID

    Request

    bash
    curl -X DELETE -H "x-api-key: YOUR_API_KEY" \
      https://api.nopaque.co.uk/audio/aud_abc123

    Response

    json
    {
      "message": "Audio file deleted successfully"
    }

    Generate a voice clip

    POST/audio/generate

    Speak `text` in one of the enabled voices (List voices, on the Mission Tests page) and store the result as an MP3 voice clip in your workspace. To use it in a test, add its `audioId` to a profile as a voice item. This costs money: it is billed per character of `text`, markup included, and every generation is billed, including repeats of the same text. Each workspace has a monthly character limit (402 `TTS_MONTHLY_LIMIT_REACHED` once it is reached). 404 when the voice is not available. 502 when the speech provider failed; nothing was stored or billed, so try again. The published SDKs (0.13.0) have no method for this, so the sample is curl only.

    Body Parameters

    NameTypeRequiredDescription
    voiceIdstringrequiredAn enabled voice id from List voices
    textstringrequired1-1,000 characters. Ultra voices (ids starting Telnyx.Ultra.) also accept a pause, <break time="1s" /> (0.1 s to 10 s, in s or ms), and an emotion, <emotion value="sad" />
    settingsobjectoptionalDelivery settings, Ultra voices only. Sending them for another voice is a 400
    └ speednumberoptionalSpeaking rate; above 1 is faster
    └ volumenumberoptionalLoudness
    └ emotionstringoptionalneutral, happy, sad, angry, fearful, disgusted or surprised
    namestringoptionalDisplay name for the clip. Defaults to the start of the text

    Request

    bash
    curl -X POST -H "x-api-key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"voiceId":"Telnyx.Ultra.0ee8beaa-6a0b-4c3e-9f1d-2b7c5e4a8d61","text":"Hi, I would like to check my balance, please.","name":"Balance enquiry"}' \
      https://api.nopaque.co.uk/audio/generate

    Response

    json
    {
      "audioId": "aud_abc123",
      "url": "https://s3.eu-west-2.amazonaws.com/...",
      "expiresInSecs": 300,
      "characters": 45,
      "sizeBytes": 38912,
      "durationSecs": 2.4,
      "voiceId": "Telnyx.Ultra.0ee8beaa-6a0b-4c3e-9f1d-2b7c5e4a8d61",
      "name": "Balance enquiry"
    }