CCAPI
  1. Audio
CCAPI
  • Chat
    • Create chat completion
      POST
  • Audio
    • Convert text to speech
      POST
  • Images
    • Generate images (OpenAI-compatible)
      POST
    • Generate images (multimodal contents API)
      POST
    • Get job status
      GET
  • Catalog
    • List available models
      GET
    • List providers
      GET
    • Get provider details
      GET
  • Schemas
    • Schemas
      • ErrorObject
      • ErrorResponse
      • ChatMessage
      • ChatToolFunction
      • ChatTool
      • ChatCompletionRequest
      • ChatCompletionResponse
      • AudioSpeechRequest
      • AudioSpeechResponse
      • LegacyImageGenerationRequest
      • LegacyImageGenerationResponse
      • MultimodalInputContent
      • MultimodalImageParameters
      • MultimodalImageGenerationRequest
      • ImageDatum
      • MultimodalImageGenerationResponse
      • ModelSummary
      • ModelListResponse
      • ProviderSummary
      • ProviderListResponse
      • ProviderDetailResponse
    • Response
      • BadRequest
      • Unauthorized
      • BillingError
      • RateLimit
      • InternalError
  1. Audio

Convert text to speech

POST
/audio/speech
Generate audio (MP3, WAV, or OGG) using ElevenLabs-powered voices.

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": "elevenlabs/eleven_turbo_v2",
    "input": "Welcome to CCAPI, your unified AI gateway.",
    "voice": "aria",
    "output_format": "mp3",
    "response_format": "url"
}

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 --request POST 'http://prod-cn.your-api-server.com/audio/speech' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "elevenlabs/eleven_turbo_v2",
    "input": "Welcome to CCAPI, your unified AI gateway.",
    "voice": "aria",
    "output_format": "mp3",
    "response_format": "url"
}'

Responses

🟢200OK
application/json
Audio generated successfully
Body

Example
{
    "created": 0,
    "format": "mp3",
    "characters": 0,
    "duration": 0,
    "credits_charged": 0,
    "audio_url": "http://example.com",
    "b64_audio": "string"
}
🟠400Bad Request
🟠401Unauthorized
🟠402Payment Required
🔴500Internal Server Error
Modified at 2025-11-12 07:09:16
Previous
Create chat completion
Next
Generate images (OpenAI-compatible)
Built with