{"servers":[{"url":"https://api.modellix.ai/api/v1/alibaba/cosyvoice-v3-flash"}],"post":{"description":"[Core Function] CosyVoice v3 Flash is Alibaba's low-latency text-to-speech model. [Strengths] Rich system voice catalog, fixed-format instruction on Instruct-capable system voices, SSML, hot_fix, AIGC watermark, Markdown filter (cloned voices only), and multiple audio formats with faster turnaround than Plus. [Best For] Voice assistants, interactive prompts, IVR, short announcements, dialect system voices, and latency-sensitive batch TTS. [Limitations] Do NOT use when maximum speech quality or long-form audiobook fidelity is the priority (use Plus). System-voice instruction must follow CosyVoice voice-list fixed Chinese formats. [Routing] Choose Flash when speed or a richer system-voice catalog matters most. Choose Plus for premium narration quality.","operationId":"cosyvoice3FlashAsync","requestBody":{"content":{"application/json":{"examples":{"basic":{"summary":"Minimal synthesis with system voice","value":{"text":"There is a large garden behind my house.","voice":"longanyang"}},"dialect_voice":{"summary":"Dialect system voice (Henan-capable longanhuan_v3)","value":{"format":"wav","sample_rate":24000,"text":"Have you eaten yet?","voice":"longanhuan_v3"}},"with_controls":{"summary":"System voice with format and prosody","value":{"format":"mp3","language_hint":"en","pitch":1,"rate":1.1,"sample_rate":22050,"text":"Please check your order status.","voice":"longanyang"}}},"schema":{"allOf":[{"description":"Shared CosyVoice v3 TTS request fields. Submit as an async task; poll GET /api/v1/tasks/{task_id} for the audio URL in result.resources.","properties":{"aigc_propagate_id":{"description":"AIGC PropagateID. Only effective when enable_aigc_tag is true.","type":"string"},"aigc_propagator":{"description":"AIGC ContentPropagator. Only effective when enable_aigc_tag is true.","type":"string"},"bit_rate":{"description":"Audio bit rate in kbps. Optional. Range 6 to 510. Only supported when format is opus; do not use for mp3, pcm, or wav.","example":32,"maximum":510,"minimum":6,"type":"integer"},"enable_aigc_tag":{"default":false,"description":"Embed AIGC invisible watermark into wav/mp3/opus output. Supported on cosyvoice-v3-plus and cosyvoice-v3-flash.","type":"boolean"},"enable_ssml":{"default":false,"description":"Whether to parse text as SSML. Default false. When true, text must follow Alibaba CosyVoice SSML rules.","example":false,"type":"boolean"},"format":{"default":"mp3","description":"Audio encoding format. Default mp3.","enum":["mp3","pcm","wav","opus"],"example":"mp3","type":"string"},"hot_fix":{"description":"Text hot-fix before synthesis. Optional object with pronunciation (custom pinyin for Chinese words) and replace (text substitution) arrays per Alibaba HTTP API.","example":{"replace":[{"Modellix":"Modelix"}]},"type":"object"},"instruction":{"description":"Optional speaking-style instruction for Instruct-capable system voices. Enforced weighted length ≤100 (CJK ideographs / Han count as 2; other characters count as 1). Alibaba requires fixed Chinese formats from the CosyVoice voice list for system voices.","example":"Speak in a friendly customer-service tone.","type":"string"},"language_hint":{"description":"Target language hint for pronunciation (numbers, symbols, minor languages).","enum":["zh","en","fr","de","ja","ko","ru","pt","th","id","vi","es","it","ms","fil","ar"],"example":"en","type":"string"},"pitch":{"default":1,"description":"Pitch multiplier. Default 1.0. Range 0.5 (lower) to 2.0 (higher).","example":1,"maximum":2,"minimum":0.5,"type":"number"},"rate":{"default":1,"description":"Speech rate multiplier. Default 1.0. Range 0.5 (slow) to 2.0 (fast).","example":1,"maximum":2,"minimum":0.5,"type":"number"},"sample_rate":{"default":22050,"description":"Audio sample rate in Hz. Default 22050.","enum":[8000,16000,22050,24000,44100,48000],"example":24000,"type":"integer"},"seed":{"default":0,"description":"Random seed for reproducible synthesis when text, voice, and other parameters are identical. Default 0. Range 0 to 65535.","example":0,"maximum":65535,"minimum":0,"type":"integer"},"text":{"description":"Text to synthesize. Required. Max 20,000 Unicode characters. Supports plain text, SSML (set enable_ssml to true), and LaTeX formulas per Alibaba documentation.","example":"There is a large garden behind my house.","maxLength":20000,"minLength":1,"type":"string"},"volume":{"default":50,"description":"Output volume. Default 50. Range 0 (silent) to 100 (maximum).","example":50,"maximum":100,"minimum":0,"type":"integer"}},"type":"object"},{"properties":{"enable_markdown_filter":{"default":false,"description":"Filter Markdown markers before synthesis. Only supported on cosyvoice-v3-flash with cloned voices.","type":"boolean"},"voice":{"description":"System or cloned voice ID for cosyvoice-v3-flash. Full official CosyVoice voice catalog (use only voices listed under cosyvoice-v3-flash for system voices): https://help.aliyun.com/zh/model-studio/cosyvoice-voice-list . Do not mix Plus and Flash system voices. Cloned or designed voice IDs are also accepted. Sample system voices (not exhaustive): longanyang, longhuhu_v3, longpaopao_v3, longshanshan_v3, longjiaxin_v3, loongkyong_v3, longfei_v3, longyingxiao_v3, longyingxun_v3, longxiaochun_v3, longantai_v3, longmiao_v3, longjiqi_v3, longanran_v3, longshuo_v3.","example":"longanyang","maxLength":256,"minLength":1,"type":"string","x-systemVoiceIds":["longanyang","longhuhu_v3","longpaopao_v3","longshanshan_v3","longjiaxin_v3","loongkyong_v3","longfei_v3","longyingxiao_v3","longyingxun_v3","longxiaochun_v3","longantai_v3","longmiao_v3","longjiqi_v3","longanran_v3","longshuo_v3"]}},"required":["text","voice"],"type":"object"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"code":0,"data":{"get_result":{"method":"GET","url":"https://api.modellix.ai/api/v1/tasks/task-cosyvoice-v3-flash-001"},"model_id":"alibaba/cosyvoice-v3-flash","status":"pending","task_id":"task-cosyvoice-v3-flash-001"},"message":"success"},"schema":{"description":"Response object for asynchronous task submission.","properties":{"code":{"description":"Response code, 0 indicates success","example":0,"type":"integer"},"data":{"description":"Task submission details. Poll GET /api/v1/tasks/{task_id} until status is success; audio appears in result.resources.","properties":{"get_result":{"description":"Endpoint to query the task result. See Common API: Query Task Result.","properties":{"method":{"example":"GET","type":"string"},"url":{"example":"https://api.modellix.ai/api/v1/tasks/task-cosyvoice-v3-plus-001","type":"string"}},"type":"object"},"model_id":{"description":"Model ID in provider/model format","example":"alibaba/cosyvoice-v3-plus","type":"string"},"status":{"description":"Initial task status","enum":["pending","processing"],"example":"pending","type":"string"},"task_id":{"description":"Unique task identifier for polling","example":"task-cosyvoice-v3-plus-001","type":"string"}},"required":["status","task_id","model_id"],"type":"object"},"message":{"description":"Response message","example":"success","type":"string"}},"required":["code","message","data"],"type":"object"}}},"description":"Task submitted successfully. Poll GET /api/v1/tasks/{task_id} until the task completes; synthesized audio is returned on the task result."},"400":{"content":{"application/json":{"example":{"code":400,"message":"Invalid parameters: voice is required for alibaba/cosyvoice-v3-plus"},"schema":{"properties":{"code":{"description":"Error code (equals HTTP status code)","example":400,"type":"integer"},"message":{"description":"Error message in format 'Category: detail'","example":"Invalid parameters: voice is required for alibaba/cosyvoice-v3-plus","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Invalid request parameters"},"401":{"content":{"application/json":{"example":{"code":401,"message":"Authentication failed: invalid API key"},"schema":{"properties":{"code":{"description":"Error code (equals HTTP status code)","example":400,"type":"integer"},"message":{"description":"Error message in format 'Category: detail'","example":"Invalid parameters: voice is required for alibaba/cosyvoice-v3-plus","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Unauthorized - Invalid or missing API Key"},"429":{"content":{"application/json":{"example":{"code":429,"message":"Rate limit exceeded: 100 requests per minute, retry after 60 seconds"},"schema":{"properties":{"code":{"description":"Error code (equals HTTP status code)","example":400,"type":"integer"},"message":{"description":"Error message in format 'Category: detail'","example":"Invalid parameters: voice is required for alibaba/cosyvoice-v3-plus","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Too many requests - Rate limit exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum requests per minute","schema":{"example":100,"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining quota in current window","schema":{"example":0,"type":"integer"}},"X-RateLimit-Reset":{"description":"Rate limit window reset time (Unix timestamp)","schema":{"example":1704067260,"type":"integer"}}}},"500":{"content":{"application/json":{"example":{"code":500,"message":"Internal server error"},"schema":{"properties":{"code":{"description":"Error code (equals HTTP status code)","example":400,"type":"integer"},"message":{"description":"Error message in format 'Category: detail'","example":"Invalid parameters: voice is required for alibaba/cosyvoice-v3-plus","type":"string"}},"required":["code","message"],"type":"object"}}},"description":"Internal server error"}},"summary":"CosyVoice v3 Flash","x-mint":{"href":"alibaba/cosyvoice-v3-flash"}}}