curl --request POST \
--url https://api.geekidea.ai/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen/qwen3-tts-flash",
"input": "今天天气真好,我们去公园散步吧。",
"voice": "Cherry",
"response_format": "wav",
"language": "Chinese",
"metadata": {}
}
'import requests
url = "https://api.geekidea.ai/v1/audio/speech"
payload = {
"model": "qwen/qwen3-tts-flash",
"input": "今天天气真好,我们去公园散步吧。",
"voice": "Cherry",
"response_format": "wav",
"language": "Chinese",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'qwen/qwen3-tts-flash',
input: '今天天气真好,我们去公园散步吧。',
voice: 'Cherry',
response_format: 'wav',
language: 'Chinese',
metadata: {}
})
};
fetch('https://api.geekidea.ai/v1/audio/speech', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Create speech
Turns text into speech and returns the audio synchronously (WAV for now). Voices, languages, formats and length limits are listed in the model’s generation_config from GET /v1/models. The x-geekidea-id header is the call ID, x-geekidea-characters is the billed character count and x-geekidea-cost is the charge in USD; GET /v1/generations/ returns the usage and a link to the audio.
curl --request POST \
--url https://api.geekidea.ai/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen/qwen3-tts-flash",
"input": "今天天气真好,我们去公园散步吧。",
"voice": "Cherry",
"response_format": "wav",
"language": "Chinese",
"metadata": {}
}
'import requests
url = "https://api.geekidea.ai/v1/audio/speech"
payload = {
"model": "qwen/qwen3-tts-flash",
"input": "今天天气真好,我们去公园散步吧。",
"voice": "Cherry",
"response_format": "wav",
"language": "Chinese",
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'qwen/qwen3-tts-flash',
input: '今天天气真好,我们去公园散步吧。',
voice: 'Cherry',
response_format: 'wav',
language: 'Chinese',
metadata: {}
})
};
fetch('https://api.geekidea.ai/v1/audio/speech', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}{
"error": {
"message": "The model does not exist or you do not have access to it.",
"type": "not_found_error",
"param": "model",
"code": "model_not_found",
"retryable": false,
"errors": [
{
"param": "messages",
"code": "missing_parameter",
"message": "<string>"
}
]
}
}Authorizations
Provide your API key in the Authorization header using Bearer auth
Body
Speech request (OpenAI format; language is a GEEKIDEA extension)
Model ID (author/model); see GET /v1/models?type=audio
1"qwen/qwen3-tts-flash"
Text to read aloud; the limit is the model's generation_config.max_input_characters
10000"今天天气真好,我们去公园散步吧。"
Voice; allowed values are in the model's generation_config.voice. Defaults to the model's default
"Cherry"
Audio format; allowed values are in the model's generation_config.response_format. Defaults to the model's default
"wav"
Language to read in (Chinese / English …); allowed values are in the model's generation_config.language. Detected automatically when omitted
"Chinese"
Custom key-value pairs stored on the Generation (up to 16)
Show child attributes
Show child attributes
Response
openapi.audio.speech.response
The response is of type file.
