跳转到主要内容
Step Plan 除推理大模型外,还支持语音合成模型通过专属路径接入。所有请求统一使用 /step_plan/v1/... 路径前缀,域名固定为 https://api.stepfun.com

前置条件

  1. 已订阅 Step Plan 套餐
  2. 已获取 API Key

语音合成模型

支持的模型

模型说明
stepaudio-2.5-tts基于语境理解的新一代 Contextual TTS,支持全局语境 + 文中语境双档控制,生成具有呼吸感、轻重主次、情绪弧线的真人级表达

接口路径

能力请求方式Step Plan 路径
非流式语音合成POSThttps://api.stepfun.com/step_plan/v1/audio/speech
流式语音合成WebSocketwss://api.stepfun.com/step_plan/v1/realtime/audio
音色试听POSThttps://api.stepfun.com/step_plan/v1/audio/voices/preview
音色复刻POSThttps://api.stepfun.com/step_plan/v1/audio/voices
接口参数与开放平台完全一致,详见各接口的 API 文档:语音合成流式语音合成复刻试听复刻音色

计费说明

计费逻辑与开放平台一致,最终按开放平台实际计费金额折算为 Step Plan 总额度消耗。具体单价请参考 定价与限速

示例

curl -X POST 'https://api.stepfun.com/step_plan/v1/audio/speech' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $STEP_API_KEY" \
-d '{
    "model": "stepaudio-2.5-tts",
    "input": "今天天气不错,适合出去走走。",
    "voice": "cixingnansheng",
    "instruction": "语气温柔,语速偏慢",
    "response_format": "mp3"
}' \
--output speech.mp3