Skip to main content
API guide · prices checked October 26, 2026

CosyVoice API: Models (v3-flash, v3.5-flash, Plus), Pricing & Quick Start

There are three ways to put CosyVoice behind code: run the open-source model on your own server, call Alibaba Cloud's hosted CosyVoice models through Model Studio (DashScope), or skip the API and use CosyVoice.org in your browser.

1. Self-host the open-source model

The official repository ships its own FastAPI and gRPC servers. The commands below are copied from the QwenAudio/CosyVoice README; check it for the current versions before you run them.

Clone and install (Python 3.10, Conda)
git clone --recursive https://github.com/QwenAudio/CosyVoice.git
cd CosyVoice
git submodule update --init --recursive
conda create -n cosyvoice -y python=3.10
conda activate cosyvoice
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ --trusted-host=mirrors.aliyun.com
Download Fun-CosyVoice 3.0 from Hugging Face (ModelScope also works)
# for oversea users, huggingface SDK model download
from huggingface_hub import snapshot_download
snapshot_download('FunAudioLLM/Fun-CosyVoice3-0.5B-2512', local_dir='pretrained_models/Fun-CosyVoice3-0.5B')
Run the FastAPI server in Docker and call it with the bundled client
cd runtime/python
docker build -t cosyvoice:v1.0 .
# for fastapi usage
docker run -d --runtime=nvidia -p 50000:50000 cosyvoice:v1.0 /bin/bash -c "cd /opt/CosyVoice/CosyVoice/runtime/python/fastapi && python3 server.py --port 50000 --model_dir iic/CosyVoice-300M && sleep infinity"
cd fastapi && python3 client.py --port 50000 --mode <sft|zero_shot|cross_lingual|instruct>

The README's server example loads CosyVoice-300M and says to switch to iic/CosyVoice-300M-Instruct for instruct inference; swap --model_dir for the model you downloaded. The README also documents a gRPC server in the same image, vLLM support for CosyVoice 2 and 3, and a TensorRT-LLM runtime under runtime/triton_trtllm.

QwenAudio/CosyVoice README

2. Alibaba Cloud Model Studio (DashScope)

Alibaba Cloud runs CosyVoice as a hosted, pay-per-character API, reached over WebSocket or through the DashScope Python and Java SDKs. Which models you can call depends on the region of your account.

Hosted CosyVoice models by region and feature
ModelRegionsVoice cloningVoice design (Beijing only)Instruction control
cosyvoice-v3.5-plusChina (Beijing)
cosyvoice-v3.5-flashChina (Beijing)
cosyvoice-v3-plusSingapore, China (Beijing)
cosyvoice-v3-flashSingapore, China (Beijing)
cosyvoice-v2China (Beijing)

The v3.5 models have no system voices — you clone or design a voice first. Voice design is offered in China (Beijing) only. Alibaba Cloud Model Studio: speech synthesis models Alibaba Cloud Model Studio: real-time TTS regions and models Alibaba Cloud Model Studio: voice design guide

Official CosyVoice API prices

Official CosyVoice API prices
ModelRegionPrice per 10,000 charactersFree quota
cosyvoice-v3-plusSingapore$0.2610,000 characters for 90 days
cosyvoice-v3-flashSingapore$0.1310,000 characters for 90 days
cosyvoice-v3.5-plusChina (Beijing)$0.22None
cosyvoice-v3.5-flashChina (Beijing)$0.116None
cosyvoice-v3-plusChina (Beijing)$0.286706None
cosyvoice-v3-flashChina (Beijing)$0.14335None
cosyvoice-v2China (Beijing)$0.286706None

Alibaba Cloud International site, as shown on October 26, 2026 (page last updated October 22, 2026). Billed by input characters; output audio is free. The free quota applies in Singapore only and runs 90 days from Model Studio activation, model release or application approval, whichever is latest. Alibaba Cloud Model Studio pricing (International site)

Accounts on Alibaba Cloud's China site see yuan prices instead — for example, in China (Beijing), cosyvoice-v3-flash is ¥1 and cosyvoice-v3.5-flash ¥0.8 per 10,000 characters, with a free quota in Beijing only. 阿里云百炼模型价格 (China site)

Python quick start

Install the DashScope SDK, set your API key in the DASHSCOPE_API_KEY environment variable, and replace the WorkspaceId placeholder in the URL with your Model Studio workspace ID. This is Alibaba Cloud's own Singapore example; never put the key in your code.

Synthesize one sentence with cosyvoice-v3-plus (Singapore)
import dashscope
from dashscope.audio.tts_v2 import *
import os
dashscope.api_key = os.environ.get('DASHSCOPE_API_KEY')
dashscope.base_websocket_api_url='wss://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api-ws/v1/inference'
model = "cosyvoice-v3-plus"
voice = "longanyang"
synthesizer = SpeechSynthesizer(model=model, voice=voice)
audio = synthesizer.call("How is the weather today?")
with open('output.mp3', 'wb') as f:
    f.write(audio)

One call() accepts up to 20,000 characters. Alibaba Cloud now recommends this per-workspace endpoint over the older dashscope-intl.aliyuncs.com address. Alibaba Cloud Model Studio: CosyVoice Python SDK

Voice cloning through the API

Create a custom voice from a reference recording — 10–20 seconds is recommended, up to 60 seconds and 10 MB — then synthesize with its voice ID. Alibaba Cloud doesn't charge for creating a voice, and an account can hold up to 1,000 custom voices. Alibaba Cloud Model Studio: voice cloning guide

3. Prefer not to manage keys and infra?

CosyVoice.org doesn't offer a public API; it runs hosted CosyVoice models for you in the browser. Type a script, pick or clone a voice, and download the audio — start free, and upgrade when you need longer scripts or commercial use.

See CosyVoice.org plans →Try it free in the browser →

Not sure which model generation you need? Read our CosyVoice 3 guide.

CosyVoice API FAQ

Should I use cosyvoice-v3-flash or cosyvoice-v3.5-flash?

Choose by region and voices. cosyvoice-v3.5-flash is offered only in China (Beijing) and has no system voices, so you clone or design one first. cosyvoice-v3-flash is offered in Singapore and China (Beijing) and includes system voices. Both support voice cloning and instruction control.

Is there a free tier for the CosyVoice API?

On Alibaba Cloud's International site, cosyvoice-v3-plus and cosyvoice-v3-flash each come with 10,000 free characters in Singapore, valid for 90 days. Other regions have no free quota there. On the China site, the free quota is in Beijing only.

How is the CosyVoice API billed?

Per 10,000 input characters; the generated audio isn't billed. Prices differ by model and region — see the table above, and check Alibaba Cloud's pricing page before you budget.

Does CosyVoice.org have an API?

No public one. CosyVoice.org is a browser app. For programmatic access, self-host the open model or use Alibaba Cloud Model Studio; to generate speech in the browser, see our plans.

Can I self-host CosyVoice for free?

The code and the Fun-CosyVoice 3.0 weights are free to download under Apache-2.0. You pay for the GPU server, and the README doesn't publish a minimum GPU requirement, so size it by testing.