1. Audio
  • Start
    • Product Intrduction
    • Quick to use
    • Using Nexhina in AI Coding Tools
  • API integration explanation
    • Quick Start
    • Getting an API Key
    • Authentication
    • Request URL
    • HTTP Status Codes
    • Streaming Output Guide
  • API Endpoints
    • Chat
      • Chat Completion
    • Models
      • List Available Models
    • Responses
      • Responses API
    • Embeddings
      • Text Embedding
    • Images
      • Text-to-Image
      • Image-to-Image
    • Audio
      • Text-to-Speech (TTS)
        POST
      • Speech-to-Text (STT)
        POST
      • Audio Translation
        POST
    • Video
      • Generate Video
    • Moderation
      • Content Moderation
    • Rerank
      • Rerank
  • Platform-related
    • Platform agreement
    • Privacy Policy
    • General Questions
  1. Audio

Text-to-Speech (TTS)

POST
/v1/audio/speech
Synthesizes speech from text, returns audio stream

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired

Example
{
    "model": "cosyvoice-v2",
    "voice": "longxiaochun",
    "input": "Welcome to POLOAPI"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location '/v1/audio/speech' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "cosyvoice-v2",
    "voice": "longxiaochun",
    "input": "Welcome to POLOAPI"
}'

Responses

🟢200
audio/mpeg
Audio stream (binary)
🟠401
Modified at 2026-08-18 09:38:04
Previous
Image-to-Image
Next
Speech-to-Text (STT)
Built with