Query Custom Prompt List
Query the custom prompt list.
Request URL
GET {base_url}/{api_path}/custom_prompt/list?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| page | No | Integer | Define which page is displayed. |
| page_size | No | Integer | Define how many records per page. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| total_number | Integer | The total number of custom prompts. |
| prompt_list | Array<Custom_Prompt> | The list of custom prompts. |
- 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.
Example
Request example
GET /openapi/v1.0/custom_prompt/list?access_token=YGQuUtZMCYJtcAd8mBBSNIC8tIcyXj2k&page=1&page_size=4 HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"total_number": 47,
"prompt_list": [
{
"id": 56,
"file": "vm_away-modified-by-feature-code.wav",
"suffix": ".wav",
"type": "record",
"storage": 1,
"created_ts": 1781072335,
"updated_ts": 1788144083,
"real_filename": "vm_away-modified-by-feature-code.wav"
},
{
"id": 55,
"file": "BusyNow-modified-by-feature-code",
"suffix": ".wav",
"type": "tts",
"storage": 1,
"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,
"real_filename": "BusyNow-modified-by-feature-code.wav"
},
{
"id": 54,
"file": "tesppp99-modified-by-feature-code.wav",
"suffix": ".wav",
"type": "record",
"storage": 1,
"created_ts": 1778494904,
"updated_ts": 1788144044,
"real_filename": "tesppp99-modified-by-feature-code.wav"
},
{
"id": 53,
"file": "demo-modified",
"suffix": ".wav",
"type": "tts",
"storage": 1,
"created_ts": 1778494697,
"updated_ts": 1788144128,
"asr_manufacturer": "xunfei",
"language": "zh-CN",
"voice_id": "zh-CN_female_x4_panting",
"text": "testtttt",
"speed": 50,
"volume": 50,
"pitch": 50,
"real_filename": "demo-modified.wav"
}
]
}