Sonetel Tts API

The Tts API from Sonetel — 2 operation(s) for tts.

Operations 2

POST /tts/prompt/convert Convert voice message #
GET /tts/prompt/voice List available voices #

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-account-get-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-account-put-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-account-data-mgr-call-rec-settings-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-user-get-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-user-call-settings-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-user-update-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-single-phone-number-subscription-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-list-phnum-subscriptions-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-call-recording-list-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-call-recording-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-voiceapp-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-create-prompt-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-requested-by-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-file-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-write-to-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-account-context-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-file-input-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sonetel/refs/heads/main/json-schema/sonetel-file-with-id-schema.json

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/sonetel:sonetel-tts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

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

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

sonetel-tts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Sonetel Tts API
  version: '2.0'
  description: 'Operations tagged Tts across 2 of this provider''s published API definitions: 10_text_to_speech.yaml, sonetel-text-to-speech-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://public-api.sonetel.com
  description: Production
tags:
- name: TTS
paths:
  /tts/prompt/convert:
    post:
      summary: Convert voice message
      description: 'This endpoint can be used to convert text into a voice message which can then be played to any IVR or voice app of your choice.


        Use the sample code below to get started.


        ```bash

        curl \

        --request GET ''https://public-api.sonetel.com/tts/prompt/convert'' \

        --header ''Accept: application/json, text/plain, */*'' \

        --header ''Authorization: Bearer YOUR_ACCESS_TOKEN'' \

        --data-raw ''{ "text": "Hello, welcome to Company", "language": "en_GB", "voice": "en-GB-Neural2-A" }''

        ```


        ```python

        import requests

        import os

        from sonetel import api

        import json


        user = os.environ.get(''sonetelUserName'')

        pswd = os.environ.get(''sonetelPassword'')


        s = api.Account(username=user,password=pswd)


        url = "https://public-api.sonetel.com/tts/prompt/convert"


        payload = json.dumps({

        "text": "Hello, welcome to ABC Company",

        "language": "en_GB",

        "voice": "en-GB-Neural2-A"

        })


        headers = {

        ''Content-Type'': ''application/json'',

        ''Accept'': ''application/json, text/plain, */*'',

        ''Authorization'': f''Bearer {s.get_token()}''

        }


        response = requests.request("POST", url, headers=headers, data=payload)


        print(response.json())


        ```


        > **Note**: Enter the command `pip install sonetel` in a terminal window to install our Python module used in the code above.'
      operationId: post-prompt-convert
      parameters:
      - $ref: '#/components/parameters/Authorization'
      - $ref: '#/components/parameters/Accept'
      - $ref: '#/components/parameters/Content-Type'
      requestBody:
        $ref: '#/components/requestBodies/convert-text'
      responses:
        '200':
          $ref: '#/components/responses/convert-success'
        '400':
          $ref: '#/components/responses/convert-error'
      servers:
      - url: https://public-api.sonetel.com
        description: Production
      tags:
      - TTS
    servers:
    - url: https://public-api.sonetel.com
      description: Production
  /tts/prompt/voice:
    get:
      summary: List available voices
      description: 'Messages can be recorded in a variery of languages and voice accents. Use the `/voice` endpoint to get a list of voices that are available.


        ```bash

        curl \

        --request GET ''https://public-api.sonetel.com/tts/prompt/voice'' \

        --header ''Accept: application/json, text/plain, */*'' \

        --header ''Authorization: Bearer YOUR_ACCESS_TOKEN''

        ```


        ```python

        import requests

        import os

        from sonetel import api


        user = os.environ.get(''sonetelUserName'')

        pswd = os.environ.get(''sonetelPassword'')


        s = api.Account(username=user,password=pswd)


        url = "https://public-api.sonetel.com/tts/prompt/voice"


        headers = {

        ''Accept'': ''application/json, text/plain, */*'',

        ''Authorization'': f''Bearer {s.get_token()}''

        }


        response = requests.request("GET", url, headers=headers)


        print(response.text)


        ```


        > **Note**: Enter the command `pip install sonetel` in a terminal window to install our Python module used in the code above.'
      operationId: get-tts-prompt-voice
      parameters:
      - $ref: '#/components/parameters/Authorization'
      - $ref: '#/components/parameters/Accept'
      - $ref: '#/components/parameters/Content-Type'
      responses:
        '200':
          $ref: '#/components/responses/list-of-voices'
      servers:
      - url: https://public-api.sonetel.com
        description: Production
      tags:
      - TTS
    servers:
    - url: https://public-api.sonetel.com
      description: Production
components:
  responses:
    convert-error:
      description: The response when the request fails.
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: string
                description: Status of the request
              message:
                type: string
                description: The error message
              errors:
                type: array
                description: Details of the error message.
                items:
                  type: string
            x-examples:
              example-1:
                status: BAD_REQUEST
                message: language
                errors:
                - 'language: may not be empty'
    convert-success:
      description: The response sent when the audio file has been successfully generated. Download the .wav file from the URL in the request.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: integer
                description: The status of the response
              response:
                type: string
                description: The URL from where the recorded file can be downloaded.
            x-examples:
              example-1:
                statusCode: 200
                response: https://sonetel-tts-prompts-prod.s3.amazonaws.com/voice-files/eR4FwCmUX2yc5ArP4gV1Yw%3D%3D/Z1%2BaJOufwivSqaTfvnoo3A%3D%3D.wav
    list-of-voices:
      description: Response containing the list of voices and languages that are available for use with the TTS API.
      content:
        application/json:
          schema:
            type: object
            properties:
              statusCode:
                type: integer
                description: The status of the request
              response:
                type: array
                description: Response object
                items:
                  type: object
                  properties:
                    language:
                      type: string
                      description: The ISO code for the language and the accent.
                      examples:
                      - en_GB
                    language_label:
                      type: string
                      description: The language and accent of the voice.
                      examples:
                      - English (United Kingdom)
                    voice:
                      type: string
                      description: The ID of the voice.
                      examples:
                      - en-GB-Wavenet-D
                    speaker:
                      type: string
                      description: This identifies different voices available for a given language and gender. For example, there are multiple `Female English UK` voices available, each one with a different identifier.
                      examples:
                      - A
                    gender:
                      type: string
                      enum:
                      - male
                      - female
                      description: The gender of the speaker
                    default_variant:
                      type: boolean
                      description: The default voice variation used if no valid option is detected in the request body.
                    default_voice:
                      type: boolean
                      description: The default voice used in the given language if no valid option is detected in the request body.
            x-examples:
              example-1:
                statusCode: 200
                response:
                - language: ar_XA
                  language_label: Arabic (XA)
                  voice: ar-XA-Wavenet-A
                  speaker: Female
                  gender: A
                  default_variant: true
                  default_voice: true
                - language: ar_XA
                  language_label: Arabic (XA)
                  voice: ar-XA-Wavenet-B
                  speaker: Male
                  gender: B
                  default_variant: false
                  default_voice: false
                - language: ar_XA
                  language_label: Arabic (XA)
                  voice: ar-XA-Wavenet-C
                  speaker: Male
                  gender: C
                  default_variant: false
                  default_voice: false
                - language: ar_XA
                  language_label: Arabic (XA)
                  voice: ar-XA-Wavenet-D
                  speaker: Female
                  gender: D
                  default_variant: false
                  default_voice: false
  parameters:
    Authorization:
      name: Authorization
      in: header
      description: The authorization header contains your access token and is used to authenticate requests. Generate an `access_token` using the `/oauth/token` endpoint.
      required: true
      schema:
        type: string
        examples:
        - Bearer <ACCESS_TOKEN>
    Content-Type:
      name: Content-Type
      in: header
      description: The content type of the request
      required: false
      schema:
        type: string
        default: application/json
    Accept:
      name: Accept
      in: header
      description: The content type that should be returned in the response.
      required: true
      schema:
        type: string
        default: application/json
  requestBodies:
    convert-text:
      description: "Convert the given text to a voice message using the voice and language defined in the request.\n\nExample request:\n```json\n{\n  \"text\": \"Hello, welcome to Company\",\n  \"language\": \"en_GB\",\n  \"voice\": \"en-GB-Neural2-A\"\n}\n```"
      content:
        application/json:
          schema:
            type: object
            properties:
              text:
                type: string
                description: The text to be converted into audio.
              language:
                type: string
                description: The language to be used for recorded audio.
                examples:
                - en_GB
              voice:
                type: string
                description: A unique identifier for the language, accent and variation of the voice to be used.
                examples:
                - en-GB-Neural2-A
            required:
            - text
            - language
            - voice
            x-examples:
              example-1:
                text: Hej hur mår du?
                language: sv_SE
                voice: sv-SE-Wavenet-A
  securitySchemes:
    Bearer:
      type: oauth2
      description: Get an access token from the `/oauth/token` and pass it as a Bearer token in the `Authorization` header.
      flows:
        password:
          refreshUrl: https://api.sonetel.com/SonetelAuth/beta/oauth/token
          tokenUrl: https://api.sonetel.com/SonetelAuth/beta/oauth/token
          scopes: {}
x-refined-from:
- 10_text_to_speech.yaml
- sonetel-text-to-speech-openapi.yml