跳转到主要内容
Open API 使用 JSON 字段 code 表示业务结果。HTTP 状态码用于传输层(例如认证失败为 401),成功与否以 code 为准。

码表

响应结构

  • 成功:code === 200,载荷在 data
  • 失败:message 供日志与支持排查

常见场景

同一 X-Idempotency-Key 在幂等 POST 接口的 TTL 内重复使用时返回。响应可能包含 Retry-After: 2。见 幂等
任务无法扣减项目积分时返回。见 价格 或在 vmeg.ai 价格页 充值。
上游服务调用失败或超时。使用 taskId 轮询 GET /openapi/v1/tasks/detail(vmeg.ai 网页任务记录不包含 Open API 任务);若已配置 Webhook,可等待重试。
data[].voiceId 不符合批处理规则时返回。常见 message 模式:
  • voiceId 不存在voiceId not found in system or clone voice library: data[0] ... Use POST /openapi/v1/assets/voice/basic/list for system voices or POST /openapi/v1/assets/voice/clone/list for clone voices.
  • 同批音色不兼容all voiceId in one batch must share the same provider, but found multiple: S1, S2. Please use voices from the same provider, or split into separate requests.
  • 系统预设与 timbreRefAudio 混批timbreRefAudio requires a clone provider (V1-V5), but voiceId in this batch resolved to a system provider (S1). ...
文本转语音支持的克隆方式