> ## Documentation Index
> Fetch the complete documentation index at: https://api-docs.voicecheap.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 创建翻译视频或音频项目

> 从已上传的 fileKey 创建项目，完成转录和翻译后合成语音。支持提供的 SRT、声音、字幕及可选唇形同步。使用常规媒体积分。可选的 webhookUrl 可接收处理事件。请查询 projects_status。

从已上传的 fileKey 创建项目，完成转录和翻译后合成语音。支持提供的 SRT、声音、字幕及可选唇形同步。使用常规媒体积分。可选的 webhookUrl 可接收处理事件。请查询 projects\_status。

```http theme={null}
POST https://api.voicecheap.ai/v1/actions/translations_create
```

## 身份验证和权限

<ParamField header="x-api-key" type="string" required>
  在此请求头中发送 VoiceCheap API 密钥。也支持通过 Authorization: Bearer 发送同一 API 密钥。OAuth 访问令牌仅适用于 MCP，此 REST 端点不接受 OAuth
  访问令牌。
</ParamField>

所需权限: `projects:write`, `translations:write`, `transcription:write`.

需要有效的付费订阅。权限不会改变团队角色、资源归属、媒体额度或套餐限制。

## 参数

<ParamField body="fileKey" type="string" required>
  文本值。

  最小长度: 1. 最大长度: 1024.
</ParamField>

<ParamField body="targetLanguage" type="string" required>
  文本值。

  允许的值: "afrikaans", "albanian", "amharic", "arabic", "armenian", "assamese", "azerbaijani", "basque", "belarusian", "bengali", "bosnian", "bulgarian", "catalan", "croatian", "czech", "danish", "dutch", "english", "british english", "estonian", "finnish", "french", "french canadian", "galician", "german", "greek", "gujarati", "hebrew", "hindi", "hungarian", "icelandic", "indonesian", "irish", "italian", "japanese", "kannada", "kazakh", "khmer", "korean", "lao", "latvian", "lithuanian", "macedonian", "malay", "malayalam", "mandarin", "marathi", "mongolian", "nepali", "norwegian", "persian", "polish", "portuguese", "brazilian portuguese", "pt\_brazil", "punjabi", "romanian", "russian", "serbian", "slovak", "slovenian", "spanish", "swahili", "swedish", "tagalog", "tamil", "telugu", "thai", "turkish", "ukrainian", "urdu", "vietnamese", "welsh", "yoruba", "zulu".
</ParamField>

<ParamField body="originalLanguage" type="string">
  文本值。

  允许的值: "af", "sq", "am", "ar", "hy", "as", "ast", "az", "ba", "eu", "be", "bn", "bs", "br", "bg", "my", "ca", "ceb", "zh", "hr", "cs", "da", "nl", "en", "eo", "at", "et", "fil", "fo", "fi", "fr", "fr-CA", "fy", "ff", "gd", "gl", "lg", "ka", "de", "el", "gu", "ht", "ha", "haw", "he", "hi", "hu", "is", "ig", "ilo", "id", "ia", "ga", "it", "ja", "jv", "kea", "kn", "kk", "km", "kur", "kir", "ko", "lo", "la", "luo", "lv", "lb", "ln", "lt", "mk", "mg", "ms", "ml", "mt", "mi", "mr", "mo", "mn", "ne", "no", "nn", "nso", "nya", "oc", "or", "pa", "ps", "fa", "pl", "pt", "ro", "ru", "sa", "sr", "sn", "sd", "si", "sk", "sl", "so", "es", "su", "sw", "ss", "sv", "tl", "tg", "ta", "tt", "te", "th", "bo", "tn", "tr", "tk", "ug", "uk", "umb", "ur", "uz", "vi", "cy", "wo", "xh", "yi", "yo", "zu", "cmn", "yue", "en-GB", "en-US", "en-AU", "auto-detect".
</ParamField>

<ParamField body="projectName" type="string">
  文本值。

  最小长度: 1. 最大长度: 200.
</ParamField>

<ParamField body="numberOfSpeakers" type="string">
  文本值。

  允许的值: "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "auto-detect".
</ParamField>

<ParamField body="brandVocabulary" type="array">
  值列表。项目结构请参阅完整输入架构。

  最多项目数: 1000.
</ParamField>

<ParamField body="removeFillerWords" type="boolean">
  布尔值。
</ParamField>

<ParamField body="sourceSrt" type="string">
  文本值。

  最大长度: 1000000.
</ParamField>

<ParamField body="webhookUrl" type="string">
  文本值。

  最大长度: 2048. 格式: "uri".
</ParamField>

<ParamField body="requestId" type="string">
  在传输层可选：如果省略，服务器会在验证前注入标识符。请自行提供稳定的 UUID v4，以便在响应丢失后安全恢复。

  格式: "uuid". 匹配模式: `^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$`.
</ParamField>

<ParamField body="keepBackgroundMusic" type="boolean">
  布尔值。
</ParamField>

<ParamField body="keepOriginalVoice" type="boolean">
  布尔值。
</ParamField>

<ParamField body="originalVoiceVolume" type="number">
  数值。

  最小值: 1. 最大值: 70.
</ParamField>

<ParamField body="voiceMode" type="string">
  文本值。

  允许的值: "cloning", "custom".
</ParamField>

<ParamField body="voiceId" type="string">
  文本值。

  最小长度: 1. 最大长度: 128.
</ParamField>

<ParamField body="subtitles" type="boolean">
  布尔值。
</ParamField>

<ParamField body="subtitlesSource" type="string">
  文本值。

  允许的值: "translated", "original".
</ParamField>

<ParamField body="voiceIsolatorOption" type="string">
  文本值。

  允许的值: "studio", "realistic".
</ParamField>

<ParamField body="lipSyncMode" type="string">
  文本值。

  允许的值: "standard", "pro", "studio".
</ParamField>

<ParamField body="activeSpeakerDetectionEnabled" type="boolean">
  布尔值。
</ParamField>

<ParamField body="voiceCloningSettings" type="object">
  JSON 对象。嵌套字段请参阅完整输入架构。
</ParamField>

<ParamField body="translationTimeSkips" type="array">
  值列表。项目结构请参阅完整输入架构。

  最多项目数: 100.
</ParamField>

<ParamField body="translatedSrt" type="string">
  文本值。

  最大长度: 1000000.
</ParamField>

<Accordion title="完整输入架构">
  以下 JSON Schema 保留了发现接口公开的确切字段名、嵌套类型、默认值、范围和可接受值。其他跨字段规则列于操作说明中。

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "fileKey": {
        "type": "string",
        "minLength": 1,
        "maxLength": 1024
      },
      "targetLanguage": {
        "type": "string",
        "enum": [
          "afrikaans",
          "albanian",
          "amharic",
          "arabic",
          "armenian",
          "assamese",
          "azerbaijani",
          "basque",
          "belarusian",
          "bengali",
          "bosnian",
          "bulgarian",
          "catalan",
          "croatian",
          "czech",
          "danish",
          "dutch",
          "english",
          "british english",
          "estonian",
          "finnish",
          "french",
          "french canadian",
          "galician",
          "german",
          "greek",
          "gujarati",
          "hebrew",
          "hindi",
          "hungarian",
          "icelandic",
          "indonesian",
          "irish",
          "italian",
          "japanese",
          "kannada",
          "kazakh",
          "khmer",
          "korean",
          "lao",
          "latvian",
          "lithuanian",
          "macedonian",
          "malay",
          "malayalam",
          "mandarin",
          "marathi",
          "mongolian",
          "nepali",
          "norwegian",
          "persian",
          "polish",
          "portuguese",
          "brazilian portuguese",
          "pt_brazil",
          "punjabi",
          "romanian",
          "russian",
          "serbian",
          "slovak",
          "slovenian",
          "spanish",
          "swahili",
          "swedish",
          "tagalog",
          "tamil",
          "telugu",
          "thai",
          "turkish",
          "ukrainian",
          "urdu",
          "vietnamese",
          "welsh",
          "yoruba",
          "zulu"
        ]
      },
      "originalLanguage": {
        "type": "string",
        "enum": [
          "af",
          "sq",
          "am",
          "ar",
          "hy",
          "as",
          "ast",
          "az",
          "ba",
          "eu",
          "be",
          "bn",
          "bs",
          "br",
          "bg",
          "my",
          "ca",
          "ceb",
          "zh",
          "hr",
          "cs",
          "da",
          "nl",
          "en",
          "eo",
          "at",
          "et",
          "fil",
          "fo",
          "fi",
          "fr",
          "fr-CA",
          "fy",
          "ff",
          "gd",
          "gl",
          "lg",
          "ka",
          "de",
          "el",
          "gu",
          "ht",
          "ha",
          "haw",
          "he",
          "hi",
          "hu",
          "is",
          "ig",
          "ilo",
          "id",
          "ia",
          "ga",
          "it",
          "ja",
          "jv",
          "kea",
          "kn",
          "kk",
          "km",
          "kur",
          "kir",
          "ko",
          "lo",
          "la",
          "luo",
          "lv",
          "lb",
          "ln",
          "lt",
          "mk",
          "mg",
          "ms",
          "ml",
          "mt",
          "mi",
          "mr",
          "mo",
          "mn",
          "ne",
          "no",
          "nn",
          "nso",
          "nya",
          "oc",
          "or",
          "pa",
          "ps",
          "fa",
          "pl",
          "pt",
          "ro",
          "ru",
          "sa",
          "sr",
          "sn",
          "sd",
          "si",
          "sk",
          "sl",
          "so",
          "es",
          "su",
          "sw",
          "ss",
          "sv",
          "tl",
          "tg",
          "ta",
          "tt",
          "te",
          "th",
          "bo",
          "tn",
          "tr",
          "tk",
          "ug",
          "uk",
          "umb",
          "ur",
          "uz",
          "vi",
          "cy",
          "wo",
          "xh",
          "yi",
          "yo",
          "zu",
          "cmn",
          "yue",
          "en-GB",
          "en-US",
          "en-AU",
          "auto-detect"
        ]
      },
      "projectName": {
        "type": "string",
        "minLength": 1,
        "maxLength": 200
      },
      "numberOfSpeakers": {
        "type": "string",
        "enum": [
          "1",
          "2",
          "3",
          "4",
          "5",
          "6",
          "7",
          "8",
          "9",
          "10",
          "11",
          "12",
          "13",
          "14",
          "15",
          "16",
          "17",
          "18",
          "19",
          "20",
          "21",
          "22",
          "23",
          "24",
          "25",
          "26",
          "27",
          "28",
          "29",
          "30",
          "31",
          "32",
          "auto-detect"
        ]
      },
      "brandVocabulary": {
        "maxItems": 1000,
        "type": "array",
        "items": {
          "type": "string",
          "minLength": 1,
          "maxLength": 200
        }
      },
      "removeFillerWords": {
        "type": "boolean"
      },
      "sourceSrt": {
        "type": "string",
        "maxLength": 1000000
      },
      "webhookUrl": {
        "type": "string",
        "maxLength": 2048,
        "format": "uri"
      },
      "requestId": {
        "type": "string",
        "format": "uuid",
        "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$",
        "description": "UUID v4 for this action. Reuse the same ID with identical arguments on retries."
      },
      "keepBackgroundMusic": {
        "type": "boolean"
      },
      "keepOriginalVoice": {
        "type": "boolean"
      },
      "originalVoiceVolume": {
        "type": "number",
        "minimum": 1,
        "maximum": 70
      },
      "voiceMode": {
        "type": "string",
        "enum": ["cloning", "custom"]
      },
      "voiceId": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      },
      "subtitles": {
        "type": "boolean"
      },
      "subtitlesSource": {
        "type": "string",
        "enum": ["translated", "original"]
      },
      "voiceIsolatorOption": {
        "type": "string",
        "enum": ["studio", "realistic"]
      },
      "lipSyncMode": {
        "type": "string",
        "enum": ["standard", "pro", "studio"]
      },
      "activeSpeakerDetectionEnabled": {
        "type": "boolean"
      },
      "voiceCloningSettings": {
        "type": "object",
        "properties": {
          "stability": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "similarity": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": ["stability", "similarity"],
        "additionalProperties": false
      },
      "translationTimeSkips": {
        "maxItems": 100,
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "startTime": {
              "type": "number",
              "minimum": 0
            },
            "endTime": {
              "type": "number",
              "exclusiveMinimum": 0
            }
          },
          "required": ["startTime", "endTime"],
          "additionalProperties": false
        }
      },
      "translatedSrt": {
        "type": "string",
        "maxLength": 1000000
      }
    },
    "required": ["fileKey", "targetLanguage"],
    "additionalProperties": false
  }
  ```
</Accordion>

## 幂等性

为每次修改操作在 requestId 或 Idempotency-Key HTTP 请求头中提供 UUID v4。网络故障后，请使用相同标识符和完全相同的参数重试。如果同时提供这两个值，它们必须一致。重放已保存的请求不会重复执行操作，也不会再次扣除月度调用次数。失败或中断的请求不会自动重新执行。

对于每次修改操作，如果重试时发现同一请求仍在运行，即使首次执行通常为同步操作，也可能返回 HTTP 202。如果执行已完成但 resultStored 为 false，重试会返回 HTTP 200 和已保存的请求状态，而非原始结果。请通过对应领域的历史记录、结果或下载操作获取输出。

## 请求示例

请将示例资源标识符和媒体键替换为账户返回的值。重试同一次修改操作时，请保持请求标识符不变。

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST 'https://api.voicecheap.ai/v1/actions/translations_create' \
    --header "x-api-key: $VOICECHEAP_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{"fileKey":"uploads/your-user-id/6bee76be-109f-423a-88fb-f41e2aa1f03b-launch.mp4","targetLanguage":"english","originalLanguage":"fr","projectName":"Product launch","numberOfSpeakers":"auto-detect","brandVocabulary":["VoiceCheap"],"removeFillerWords":true,"requestId":"41321bda-e243-4b6f-96a4-622cd047c991","keepBackgroundMusic":true,"keepOriginalVoice":false,"voiceMode":"cloning","subtitles":true,"subtitlesSource":"translated","voiceIsolatorOption":"studio"}'
  ```

  ```javascript JavaScript theme={null}
  const input = {
    fileKey: 'uploads/your-user-id/6bee76be-109f-423a-88fb-f41e2aa1f03b-launch.mp4',
    targetLanguage: 'english',
    originalLanguage: 'fr',
    projectName: 'Product launch',
    numberOfSpeakers: 'auto-detect',
    brandVocabulary: ['VoiceCheap'],
    removeFillerWords: true,
    requestId: '41321bda-e243-4b6f-96a4-622cd047c991',
    keepBackgroundMusic: true,
    keepOriginalVoice: false,
    voiceMode: 'cloning',
    subtitles: true,
    subtitlesSource: 'translated',
    voiceIsolatorOption: 'studio',
  };
  const response = await fetch('https://api.voicecheap.ai/v1/actions/translations_create', {
    method: 'POST',
    headers: {
      'x-api-key': process.env.VOICECHEAP_API_KEY,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify(input),
  });
  const body = await response.json();
  if (!response.ok) throw new Error(body.code + ': ' + body.message);
  console.log(body);
  ```

  ```python Python theme={null}
  import os
  import requests

  response = requests.post(
      "https://api.voicecheap.ai/v1/actions/translations_create",
      headers={"x-api-key": os.environ["VOICECHEAP_API_KEY"]},
      json={"fileKey": "uploads/your-user-id/6bee76be-109f-423a-88fb-f41e2aa1f03b-launch.mp4", "targetLanguage": "english", "originalLanguage": "fr", "projectName": "Product launch", "numberOfSpeakers": "auto-detect", "brandVocabulary": ["VoiceCheap"], "removeFillerWords": True, "requestId": "41321bda-e243-4b6f-96a4-622cd047c991", "keepBackgroundMusic": True, "keepOriginalVoice": False, "voiceMode": "cloning", "subtitles": True, "subtitlesSource": "translated", "voiceIsolatorOption": "studio"},
      timeout=120,
  )
  body = response.json()
  if not response.ok:
      raise RuntimeError(f"{body.get('code')}: {body.get('message')}")
  print(body)
  ```
</RequestExample>

## 响应

首次执行成功时返回 HTTP 200，操作结果位于 data 下。重放请求时可能改为返回已保存的请求状态。示例展示了一种支持的响应，并未包含所有可选字段。

在启动转写及后续翻译和语音生成，或启动使用所提供译文的配音后，返回新的项目标识符。

<ResponseExample>
  ```json HTTP 200 theme={null}
  {
    "data": {
      "success": true,
      "message": "Translation started successfully. Use the status endpoint to track progress.",
      "projectId": "project_launch_2026",
      "estimatedDuration": 10
    },
    "requestId": "41321bda-e243-4b6f-96a4-622cd047c991"
  }
  ```

  ```json HTTP 202 replay_running theme={null}
  {
    "data": {
      "requestId": "41321bda-e243-4b6f-96a4-622cd047c991",
      "operation": "translations_create",
      "createdAt": 1792144800000,
      "updatedAt": 1792144820000,
      "status": "running",
      "pollAfterSeconds": 5
    },
    "requestId": "41321bda-e243-4b6f-96a4-622cd047c991"
  }
  ```

  ```json HTTP 200 replay_completed_without_result theme={null}
  {
    "data": {
      "requestId": "41321bda-e243-4b6f-96a4-622cd047c991",
      "operation": "translations_create",
      "createdAt": 1792144800000,
      "updatedAt": 1792144820000,
      "status": "completed",
      "resultStored": false,
      "message": "The action completed. Retrieve its output from the corresponding history or resource action."
    },
    "requestId": "41321bda-e243-4b6f-96a4-622cd047c991"
  }
  ```
</ResponseExample>

## 结果字段

| 字段 | 说明 |
| - | - |
| `data.success` | 后台工作流已获准执行时为 true；这不表示媒体处理已完成。 |
| `data.message` | 翻译或根据所提供译文进行配音的确认。 |
| `data.projectId` | 父项目标识符。 |
| `data.estimatedDuration` | 粗略处理时长估计，单位为分钟：ceil(source duration in seconds / 60) \* 5。 |

## 已提供并接受 translatedSrt。

相同的结果字段用于确认对所提供目标文本的配音。

```json HTTP 200 theme={null}
{
  "data": {
    "success": true,
    "message": "Dubbing started successfully from the provided translation. Use the status endpoint to track progress.",
    "projectId": "project_launch_2026",
    "estimatedDuration": 10
  }
}
```

## 恢复并轮询此请求

即使连接丢失，也应使用同一标识符。如果 resultStored 为 false，请通过相应的历史记录、结果或下载操作获取输出。切勿仅为查看进度而启动第二次生成。

```bash theme={null}
curl --request POST 'https://api.voicecheap.ai/v1/actions/action_request_get' \
  --header "x-api-key: $VOICECHEAP_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{"requestId":"41321bda-e243-4b6f-96a4-622cd047c991","operation":"translations_create"}'
```

```json HTTP 200 theme={null}
{
  "data": {
    "requestId": "41321bda-e243-4b6f-96a4-622cd047c991",
    "operation": "translations_create",
    "status": "completed",
    "createdAt": 1792144800000,
    "updatedAt": 1792144820000,
    "resultStored": true,
    "result": {
      "success": true,
      "message": "Translation started successfully. Use the status endpoint to track progress.",
      "projectId": "project_launch_2026",
      "estimatedDuration": 10
    }
  }
}
```

## 操作说明

* 已完成上传的 fileKey 必须属于已认证的调用者。服务器会测量已存储媒体的时长和大小。
* 可选的 sourceSrt 需要显式提供 originalLanguage。同时提供 translatedSrt 时，两份 SRT 的字幕条目数量必须相同；提供的译文会按字幕条目索引配对。
* 提供 translatedSrt 时，工作流会对该文本配音，并返回针对所提供翻译的确认响应。提供 sourceSrt 时，按索引对齐字幕条目；未提供 sourceSrt 时，使用自动转写的时间轴。
* 创建结果不含 workId 或 translatedVersionId。它们存在后，请通过 projects\_status 或 projects\_get 获取。
* voiceMode 默认为 cloning。使用 voiceMode custom 时，请选择目录中的音色或经过身份验证的账户保存的自定义音色，不要提供 voiceCloningSettings。团队计费不会授予访问其他成员已保存音色的权限。
* 可选的 subtitles、lipSyncMode 和 translationTimeSkips 需要视频输入。跳过区间必须位于媒体时长范围内，keepBackgroundMusic 必须为 true，keepOriginalVoice 必须为 false。
* lipSyncMode 接受 standard、pro 或 studio，取决于套餐并须通过常规媒体额度检查。每月 API 调用不限量并不意味着语音和口型同步免费。
* 轮询 projects\_status 跟踪媒体工作流；使用 projects\_get 获取所有语言版本。
* originalLanguage 使用 fr 或 en 等源语言代码（在允许时也可使用 auto-detect）；targetLanguage 使用 english 等受支持的目标语言名称。

## 用量

每次成功调用消耗一次月度 API/MCP 调用额度。媒体额度和操作本身的生成限额也适用。

## 错误

| HTTP 状态 | 代码 | 含义或恢复方式 |
| - | - | - |
| 400 | `CREDENTIAL_IN_QUERY` | 凭证通过 access\_token 或 api\_key 查询参数提供。请在标头中发送凭证。 |
| 400 | `FILE_TOO_LARGE` | 已存储的上传内容超过账户的上传大小上限。 |
| 400 | `IDEMPOTENCY_CONFLICT` | Idempotency-Key 请求头必须与请求体中的 requestId 字段一致。 |
| 400 | `INVALID_FILE_TYPE` | 上传文件名不具有受支持的音频或视频扩展名。 |
| 400 | `INVALID_MEDIA_DURATION` | 测得的时长无效或超过套餐上限。 |
| 400 | `INVALID_REQUEST_ID` | 请在 requestId 或 Idempotency-Key 中提供 UUID v4。 |
| 400 | `INVALID_SOURCE_SRT` | sourceSrt 须包含有效的 SRT 字幕条目。 |
| 400 | `INVALID_TRANSLATED_SRT` | 提供的目标语言 SRT 格式错误。 |
| 400 | `LIPSYNC_NOT_AVAILABLE_FOR_AUDIO` | 口型同步需要视频输入。 |
| 400 | `LIPSYNC_VIDEO_TOO_LONG` | 视频超出了所选口型同步模式的时长限制。 |
| 400 | `SOURCE_LANGUAGE_REQUIRED_FOR_SRT` | 提供 sourceSrt 时，请明确设置 originalLanguage。 |
| 400 | `SUBTITLES_NOT_AVAILABLE_FOR_AUDIO` | 烧录字幕需要视频输入。 |
| 400 | `TRANSLATED_SRT_CUE_COUNT_MISMATCH` | 同时提供 sourceSrt 和 translatedSrt 时，两者须包含相同数量的字幕条目。 |
| 400 | `TRANSLATION_TIME_SKIP_CONFLICT` | 翻译时间跳过设置不能与 keepOriginalVoice 为 true 同时使用。 |
| 400 | `TRANSLATION_TIME_SKIP_NOT_AVAILABLE_FOR_AUDIO` | 翻译跳过时段需要视频输入。 |
| 400 | `TRANSLATION_TIME_SKIP_OUT_OF_RANGE` | 某个跳过区间超出了媒体时长。 |
| 400 | `TRANSLATION_TIME_SKIP_REQUIRES_BACKGROUND` | 翻译跳过时段需要将 keepBackgroundMusic 设为 true。 |
| 400 | `VALIDATION_ERROR` | 请根据架构更正输入。无效或不一致的值会在执行前被拒绝。 |
| 400 | `VOICE_CLONING_SETTINGS_NOT_ALLOWED` | voiceCloningSettings 仅在 voiceMode 为 cloning 时适用。 |
| 400 | `VOICE_ID_NOT_ALLOWED_WITH_CLONING` | voiceId 不能与值为 cloning 的 voiceMode 同时使用。 |
| 400 | `VOICE_ID_REQUIRED` | voiceMode 为 custom 时必须提供 voiceId。 |
| 401 | `API_KEY_EXPIRED` | API 密钥已过期。 |
| 401 | `INVALID_API_KEY` | 请提供有效且未过期的 API 密钥。 |
| 401 | `INVALID_CREDENTIAL` | Authorization 标头格式错误或与 x-api-key 冲突。 |
| 401 | `MISSING_CREDENTIAL` | 未提供可用的请求头凭据，或其长度超过 4096 个字符。 |
| 401 | `USER_NOT_FOUND` | 该凭据对应的账户已不存在。 |
| 403 | `ACCOUNT_UNAVAILABLE` | 调用者账户或计费账户不可用，或正在删除。 |
| 403 | `AMBIGUOUS_TEAM_API_KEY` | 此凭据对应的用户属于多个团队，因此计费上下文不明确。 |
| 403 | `CUSTOM_VOICE_ACCESS_DENIED` | 所选音色既不是目录中的音色，也不是经过身份验证的账户保存的自定义音色。 |
| 403 | `INSUFFICIENT_CREDITS` | 账户媒体额度不足，无法使用所选语音设置和可选的口型同步设置。 |
| 403 | `INSUFFICIENT_SCOPE` | 请授予全部所需权限，或选择其他凭据。 |
| 403 | `INTEGRATION_PLAN_UNSUPPORTED` | 无法验证该账户的集成限制。 |
| 403 | `INVALID_FILE_REFERENCE` | fileKey 必须标识属于通过身份验证的调用者的一次已完成上传。 |
| 403 | `LIPSYNC_MODE_ACCESS_DENIED` | 当前套餐不支持所选的可选口型同步模式。 |
| 403 | `SUBSCRIPTION_REQUIRED` | 请使用有效的付费订阅。 |
| 403 | `TEAM_OWNER_NOT_FOUND` | 找不到实际生效的团队所有者账户。 |
| 404 | `MEDIA_NOT_FOUND` | 已上传的对象缺失或为空。 |
| 409 | `CONCURRENT_ACTION_LIMIT_REACHED` | 此账户已有 10 个集成操作正在运行。请先轮询现有请求，再启动另一个操作。 |
| 409 | `IDEMPOTENCY_CONFLICT` | 只有操作和参数完全相同时，才能复用标识符。 |
| 429 | `CONCURRENT_TRANSLATION_LIMIT_REACHED` | 该账户已达到 API 翻译的最大并发数。 |
| 429 | `INTEGRATION_MONTHLY_LIMIT_REACHED` | 请等待月度额度重置，或更改套餐。 |
| 429 | `INTEGRATION_RATE_LIMIT_REACHED` | 如果提供了 Retry-After，请等待其指定的时间，并采用退避重试。 |
| 500 | `INTERNAL_ERROR` | 在决定是否重试修改操作前，请检查已保存的请求状态和资源历史记录。 |
| 503 | `ACTION_RESULT_UNAVAILABLE` | 操作已执行，但未能保存结果。在启动新的生成前，请检查已保存的请求状态和资源历史记录。 |
| 503 | `SERVER_RESTARTING` | 服务器正在重启。请稍后重试；对于修改操作，请保持请求标识符不变。 |

```json theme={null}
{
  "code": "INSUFFICIENT_SCOPE",
  "message": "This credential does not permit the requested action.",
  "status": 403,
  "details": {
    "requiredScopes": ["projects:write", "translations:write", "transcription:write"]
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.