1. Audio
AITK-Doc
English
  • 中文
  • English
  • Home Page
  • AITK-API
    • Model
      • Native OpenAI Format
      • Native Gemini Format
    • Chat
      • Native OpenAI Format
      • Native Gemini Format
      • Native Claude Format
      • Responses Request (openai)
    • Audio
      • Native OpenAI Format TTS
        POST
      • Native Gemini Format TTS
        POST
    • Images
      • Native OpenAI Format Image Editing (JSON)
      • Native OpenAI Format Image Generation
      • Native OpenAI Format Image Editing (Multipart)
      • Native Gemini Format Image Generation
    • Video
      • Seedance2.0 format
        • Create Video Generation Task
        • Query Video Generation Task Status
    • Vector
      • Embeddings
        • Create Embedding
    • Translation
      • Speech Translation
  • AI application
    • AITK API Integration with Claude Code
    • AITK API Integration with Cursor
    • AITK API Integration with Codex-cli
    • AITK API Integration with Codex Desktop
    • AITK API Integration with Hermes Agent
  1. Audio

Native OpenAI Format TTS

POST
/v1/audio/speech
POST /v1/audio/speech

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Header 参数

Body 参数application/json

示例
{
    "model": "tts",
    "input": "The quick brown fox jumped over the lazy dog",
    "voice": "alloy",
    "speed": 2
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location 'https://api.aitk.com/v1/audio/speech' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "tts",
    "input": "The quick brown fox jumped over the lazy dog",
    "voice": "alloy",
    "speed": 2
}'

返回响应

🟢200
audio/mpeg
示例
{
  "audio_data" : ""
}
🟠400
🟠404
🔴500
修改于 2026-11-23 02:12:04
上一页
Responses Request (openai)
下一页
Native Gemini Format TTS
Built with