Query Information of a Custom Prompt

Query information of a custom prompt.

Request URL

GET {base_url}/{api_path}/custom_prompt/get?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
id Yes Integer The ID of the custom prompt.
Note: You can query the ID of the prompt using Search Custom Prompts.

Response parameters

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
prompt Object<Custom_Prompt> The custom prompt information.
Custom_Prompt
Parameter Type Description
id Integer The ID of the custom prompt.
file String The filename of the custom prompt without the file extension.
suffix String The file extension (e.g., ".wav").
type String The prompt type.
  • tts: Custom prompt generated via Text-to-Speech feature.
  • record: Custom prompt recorded by an extension or uploaded from local storage.
storage Integer The ID of the storage device.
real_filename String The complete filename, including the extension (e.g., "demo.wav").
created_ts Integer The creation timestamp in seconds.
updated_ts Integer The modification timestamp in seconds.
asr_manufacturer String The text-to-speech vendor for the prompt generated via TTS.
language String The language code used for TTS.
voice_id String The voice used for TTS.
text String The text used to generate prompt via TTS.
speed Integer The speech rate for TTS.
volume Integer The volume for TTS.
pitch Integer The pitch for TTS.
extension String The extension number that records the prompt.
path String The storage path of the prompt on storage devices.

Examples

Request example

GET /openapi/v1.0/custom_prompt/get?access_token=QuIR6B6rY9PnMZGmx1B70tPW3cPHhvTl&id=55 HTTP/1.1
Host: 192.168.5.150:8088
Content-Type: application/json

Response example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "prompt": {
        "id": 55,
        "file": "BusyNow-modified-by-feature-code",
        "suffix": ".wav",
        "type": "tts",
        "storage": 1,
        "path": "/ysdisk/ysapps/pbxcenter/var/lib/asterisk/sounds/record",
        "created_ts": 1778556748,
        "updated_ts": 1788143938,
        "asr_manufacturer": "xunfei",
        "language": "zh-CN",
        "voice_id": "zh-CN_female_x4_panting",
        "text": "2222",
        "speed": 50,
        "volume": 50,
        "pitch": 50
    }
}