> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# 获取音色

GET https://api.elevenlabs.io/v1/voices/{voice_id}

返回指定音色的元数据。

Reference: https://elevenlabs.io/docs/api-reference/voices/get

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `voice_id` (string, required) — 要使用的音色 ID。可使用 [获取音色](/docs/api-reference/voices/search) 端点列出所有可用音色。

### Query parameters

- `with_settings` (boolean, optional, default: true, deprecated) — 此参数现已弃用，会被忽略，并将在未来版本中移除。

## Response

### 200

成功响应

- `voice_id` (string, required) — 音色的 ID。
- `name` (string, optional) — 音色名称。
- `samples` (list of SampleResponseModel, optional, nullable) — 与该音色关联的样本列表。
- `category` (enum, optional) — 音色类别。
  - Allowed values: `generated`, `cloned`, `premade`, `professional`, `famous`, `high_quality`
- `fine_tuning` (FineTuningResponseModel, optional, nullable) — 音色的微调信息。
- `labels` (map from string to string, optional) — 与该音色关联的标签。
- `description` (string, optional, nullable) — 音色描述。
- `preview_url` (string, optional, nullable) — 音色的预览 URL。
- `available_for_tiers` (list of string, optional) — 该音色适用的套餐层级。
- `settings` (VoiceSettingsResponseModel, optional, nullable) — 音色设置。
- `sharing` (VoiceSharingResponseModel, optional, nullable) — 音色的共享信息。
- `high_quality_base_model_ids` (list of string, optional) — 高质量音色的基础模型 ID。
- `verified_languages` (list of VerifiedVoiceLanguageResponseModel, optional, nullable) — 该音色已验证的语言。
- `collection_ids` (list of string, optional, nullable) — 此音色所属集合的 ID。
- `safety_control` (enum, optional, nullable) — 音色的安全控制设置。
  - Allowed values: `NONE`, `BAN`, `CAPTCHA`, `ENTERPRISE_BAN`, `ENTERPRISE_CAPTCHA`
- `voice_verification` (VoiceVerificationResponseModel, optional, nullable) — 音色验证信息。
- `permission_on_resource` (string, optional, nullable) — 音色资源的权限。
- `is_owner` (boolean, optional, nullable) — 音色是否归用户所有。
- `is_legacy` (boolean, optional, default: false) — 音色是否为旧版。
- `is_mixed` (boolean, optional, default: false) — 音色是否已混音。
- `favorited_at_unix` (integer, optional, nullable) — 音色被标记为收藏时的 Unix 时间戳。
- `created_at_unix` (integer, optional, nullable) — 音色创建时间，以 Unix 时间表示。
- `is_bookmarked` (boolean, optional, nullable) — 当前用户是否已收藏该音色。仅适用于社区（从声音库复制的）音色。
- `recording_quality` (enum, optional, nullable) — 审核流程确定的音色录音质量。
  - Allowed values: `studio`, `good`, `ok`, `poor`, `bad`
- `labelling_status` (enum, optional, nullable) — 音色的审核流程状态。
  - Allowed values: `in_review`, `review_complete`
- `recording_quality_reason` (string, optional, nullable) — 审核流程确定的录音质量评估原因。

## Errors

### 422 Unprocessable Entity Error

验证错误。

- `detail` (list of ValidationError, optional)

## Types

### SampleResponseModel

- `sample_id` (string, optional) — 样本的 ID。
- `file_name` (string, optional) — 样本文件名称。
- `mime_type` (string, optional) — 样本文件的 MIME 类型。
- `size_bytes` (integer, optional) — 样本文件大小，单位为字节。
- `hash` (string, optional) — 示例文件的哈希值。
- `duration_secs` (double, optional, nullable)
- `remove_background_noise` (boolean, optional, nullable)
- `has_isolated_audio` (boolean, optional, nullable)
- `has_isolated_audio_preview` (boolean, optional, nullable)
- `speaker_separation` (SpeakerSeparationResponseModel, optional, nullable)
- `trim_start` (integer, optional, nullable)
- `trim_end` (integer, optional, nullable)

### FineTuningResponseModel

- `is_allowed_to_fine_tune` (boolean, optional) — 用户是否可对音色进行 Finetune。
- `state` (map from string to enum, optional) — 各模型微调流程的状态。
  - Allowed values: `not_started`, `queued`, `fine_tuning`, `fine_tuned`, `failed`, `delayed`
- `verification_failures` (list of string, optional) — Finetune 过程中的验证失败列表。
- `verification_attempts_count` (integer, optional) — 微调过程中的验证尝试次数。
- `manual_verification_requested` (boolean, optional) — 是否已为微调流程请求人工验证。
- `language` (string, optional, nullable) — 微调过程的语言。
- `progress` (map from string to double, optional, nullable) — 微调过程的进度。
- `message` (map from string to string, optional, nullable) — 微调过程的消息。
- `dataset_duration_seconds` (double, optional, nullable) — 数据集时长，单位为秒。
- `verification_attempts` (list of VerificationAttemptResponseModel, optional, nullable) — 验证尝试次数。
- `slice_ids` (list of string, optional, nullable) — 切片 ID 列表。
- `manual_verification` (ManualVerificationResponseModel, optional, nullable) — 微调过程的人工验证。
- `max_verification_attempts` (integer, optional, nullable) — 最大验证尝试次数。
- `next_max_verification_attempts_reset_unix_ms` (integer, optional, nullable) — 下一次最大验证尝试次数重置时间，以 Unix 毫秒表示。
- `finetuning_state` (any, optional)

### VoiceSettingsResponseModel

- `stability` (double, optional, nullable, default: 0.5) — 决定音色的稳定性以及每次生成之间的随机性。较低的值会带来更丰富的情感范围。较高的值可能使音色较为单调，情感有限。
- `use_speaker_boost` (boolean, optional, nullable, default: true) — 此设置可提高与原始说话者的相似度。使用后计算负载会略微增加，从而提高延迟。
- `similarity_boost` (double, optional, nullable, default: 0.75) — 决定 AI 在尝试复现原始音色时应遵循原始音色的程度。
- `style` (double, optional, nullable, default: 0) — 决定音色的风格夸张程度。此设置会尝试增强原始说话者的风格。设为非 0 值时会消耗额外计算资源，并可能增加延迟。
- `speed` (double, optional, nullable, default: 1) — 调整语速。值为 1.0 时使用默认语速；小于 1.0 会减慢语音，大于 1.0 会加快语音。
- `clone_strength` (double, optional, nullable) — 控制音色与专业语音克隆样本的匹配程度，范围为 0（低）到 1（高）。大多数情况下建议设为 0。仅当默认设置出现问题时才提高此值。仅适用于为所选 v4 模型微调的专业语音克隆。

### VoiceSharingResponseModel

- `status` (enum, optional) — 音色共享状态。
  - Allowed values: `enabled`, `disabled`, `copied`, `copied_disabled`
- `history_item_sample_id` (string, optional, nullable) — 历史记录项的样本 ID。
- `date_unix` (integer, optional) — 音色分享日期，以 Unix 时间表示。
- `whitelisted_emails` (list of string, optional) — 已加入白名单的邮箱列表。
- `public_owner_id` (string, optional) — 公开所有者的 ID。
- `original_voice_id` (string, optional) — 原始音色的 ID。
- `financial_rewards_enabled` (boolean, optional) — 是否启用财务奖励。
- `free_users_allowed` (boolean, optional) — 是否允许免费用户。
- `live_moderation_enabled` (boolean, optional) — 是否启用实时审核。
- `rate` (double, optional, nullable) — 音色共享费率。
- `fiat_rate` (double, optional, nullable) — 音色共享费率，以每 1000 积分的美元金额表示。
- `notice_period` (integer, optional) — 音色共享的通知期。
- `disable_at_unix` (integer, optional, nullable) — 音色分享日期，以 Unix 时间表示。
- `voice_mixing_allowed` (boolean, optional) — 是否允许音色混合。
- `featured` (boolean, optional) — 音色是否为精选音色。
- `category` (enum, optional) — 音色类别。
  - Allowed values: `generated`, `cloned`, `premade`, `professional`, `famous`, `high_quality`
- `reader_app_enabled` (boolean, optional, nullable) — Reader App 是否已启用。
- `image_url` (string, optional, nullable) — 音色图像的 URL。
- `ban_reason` (string, optional, nullable) — 音色被禁用的原因。
- `liked_by_count` (integer, optional) — 该音色的点赞数。
- `cloned_by_count` (integer, optional) — 该音色的克隆数量。
- `name` (string, optional) — 音色名称。
- `description` (string, optional, nullable) — 音色描述。
- `labels` (map from string to string, optional) — 音色标签。
- `review_status` (enum, optional) — 音色的审核状态。
  - Allowed values: `not_requested`, `pending`, `declined`, `declined_resubmittable`, `allowed`, `allowed_with_changes`
- `review_message` (string, optional, nullable) — 音色的审核消息。
- `enabled_in_library` (boolean, optional) — 音色是否已在声音库中启用。
- `instagram_username` (string, optional, nullable) — 音色的 Instagram 用户名。
- `twitter_username` (string, optional, nullable) — 该音色的 Twitter/X 用户名。
- `youtube_username` (string, optional, nullable) — 该音色的 YouTube 用户名。
- `tiktok_username` (string, optional, nullable) — 该音色的 TikTok 用户名。
- `moderation_check` (VoiceSharingModerationCheckResponseModel, optional, nullable) — 音色的审核检查。
- `reader_restricted_on` (list of ReaderResourceResponseModel, optional, nullable) — 音色在 Reader 中的限制状态。

### VerifiedVoiceLanguageResponseModel

- `language` (string, required) — 音色的语言。
- `model_id` (string, required) — 音色的模型 ID。
- `accent` (string, optional, nullable) — 音色的口音（如适用）。
- `locale` (string, optional, nullable) — 音色的区域设置（如适用）。
- `preview_url` (string, optional, nullable) — 音色的预览 URL（如适用）。

### VoiceVerificationResponseModel

- `requires_verification` (boolean, required) — 音色是否需要验证。
- `is_verified` (boolean, required) — 音色是否已验证。
- `verification_failures` (list of string, required) — 验证失败列表。
- `verification_attempts_count` (integer, required) — 验证尝试次数。
- `language` (string, optional, nullable) — 音色的语言。
- `verification_attempts` (list of VerificationAttemptResponseModel, optional, nullable) — 尝试验证的次数。

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### SpeakerSeparationResponseModel

- `voice_id` (string, required) — 音色的 ID。
- `sample_id` (string, required) — 样本的 ID。
- `status` (enum, required) — 说话人分离的状态。
  - Allowed values: `not_started`, `pending`, `completed`, `failed`
- `speakers` (map from string to SpeakerResponseModel, optional, nullable) — 样本中的说话人。
- `selected_speaker_ids` (list of string, optional, nullable) — 所选说话人的 ID。

### VerificationAttemptResponseModel

- `text` (string, required) — 验证尝试的文本。
- `date_unix` (integer, required) — 验证尝试日期，以 Unix 时间表示。
- `accepted` (boolean, required) — 验证尝试是否已通过。
- `similarity` (double, required) — 验证尝试的相似度。
- `levenshtein_distance` (double, required) — 验证尝试的 Levenshtein 距离。
- `recording` (RecordingResponseModel, optional, nullable) — 验证尝试的录音。

### ManualVerificationResponseModel

- `extra_text` (string, required) — 人工验证的额外文本。
- `request_time_unix` (integer, required) — 人工验证日期，以 Unix 时间表示。
- `files` (list of ManualVerificationFileResponseModel, required) — 人工验证的文件。

### VoiceSharingModerationCheckResponseModel

- `date_checked_unix` (integer, optional, nullable) — 内容审核检查日期，以 Unix 时间表示。
- `name_value` (string, optional, nullable) — 音色名称值。
- `name_check` (boolean, optional, nullable) — 名称检查是否成功。
- `description_value` (string, optional, nullable) — 音色的描述值。
- `description_check` (boolean, optional, nullable) — 描述检查是否成功。
- `sample_ids` (list of string, optional, nullable) — 样本 ID 列表。
- `sample_checks` (list of double, optional, nullable) — 样本检查列表。
- `captcha_ids` (list of string, optional, nullable) — captcha ID 列表。
- `captcha_checks` (list of double, optional, nullable) — CAPTCHA 验证值列表。

### ReaderResourceResponseModel

- `resource_type` (enum, required) — 资源类型。
  - Allowed values: `read`, `collection`
- `resource_id` (string, required) — 资源的 ID。

### ValidationErrorLocItems

- string
- integer

### SpeakerResponseModel

- `speaker_id` (string, required) — 说话人的 ID。
- `duration_secs` (double, required) — 说话人片段时长，单位为秒。
- `utterances` (list of UtteranceResponseModel, optional, nullable) — 说话者的话语。

### RecordingResponseModel

- `recording_id` (string, required) — 录音的 ID。
- `mime_type` (string, required) — 录音的 MIME 类型。
- `size_bytes` (integer, required) — 录音大小，单位为字节。
- `upload_date_unix` (integer, required) — 录音日期，以 Unix 时间表示。
- `transcription` (string, required) — 录音的转录文本。

### ManualVerificationFileResponseModel

- `file_id` (string, required) — 文件 ID。
- `file_name` (string, required) — 文件名称。
- `mime_type` (string, required) — 文件的 MIME 类型。
- `size_bytes` (integer, required) — 文件大小，单位为字节。
- `upload_date_unix` (integer, required) — 文件日期，以 Unix 时间表示。

### UtteranceResponseModel

- `start` (double, required) — 话语的起始时间，单位为秒。
- `end` (double, required) — 话语结束时间，单位为秒。

## Examples

**Response**

```json
{
  "voice_id": "21m00Tcm4TlvDq8ikWAM",
  "name": "Rachel",
  "category": "professional",
  "fine_tuning": {
    "is_allowed_to_fine_tune": true,
    "state": {
      "eleven_multilingual_v2": "fine_tuned"
    },
    "verification_failures": [],
    "verification_attempts_count": 2,
    "manual_verification_requested": false
  },
  "labels": {
    "accent": "American",
    "age": "middle-aged",
    "description": "expressive",
    "gender": "female",
    "use_case": "social media"
  },
  "description": "A warm, expressive voice with a touch of humor.",
  "preview_url": "https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3",
  "available_for_tiers": [
    "creator",
    "enterprise"
  ],
  "settings": {
    "stability": 1,
    "use_speaker_boost": true,
    "similarity_boost": 1,
    "style": 0,
    "speed": 1
  },
  "sharing": {
    "status": "enabled",
    "history_item_sample_id": "DCwhRBWXzGAHq8TQ4Fs18",
    "date_unix": 1714204800,
    "whitelisted_emails": [
      "example@example.com"
    ],
    "public_owner_id": "DCwhRBWXzGAHq8TQ4Fs18",
    "original_voice_id": "DCwhRBWXzGAHq8TQ4Fs18",
    "financial_rewards_enabled": true,
    "free_users_allowed": true,
    "live_moderation_enabled": true,
    "rate": 0.05,
    "notice_period": 30,
    "disable_at_unix": 1714204800,
    "voice_mixing_allowed": false,
    "featured": true,
    "category": "professional",
    "reader_app_enabled": true,
    "liked_by_count": 100,
    "cloned_by_count": 50,
    "name": "Rachel",
    "description": "A female voice with a soft and friendly tone.",
    "labels": {
      "accent": "American",
      "gender": "female"
    },
    "review_status": "allowed",
    "enabled_in_library": true,
    "moderation_check": {
      "date_checked_unix": 1714204800,
      "name_value": "Rachel",
      "name_check": true,
      "description_value": "A female voice with a soft and friendly tone.",
      "description_check": true,
      "sample_ids": [
        "sample1",
        "sample2"
      ],
      "sample_checks": [
        0.95,
        0.98
      ],
      "captcha_ids": [
        "captcha1",
        "captcha2"
      ],
      "captcha_checks": [
        0.95,
        0.98
      ]
    },
    "reader_restricted_on": [
      {
        "resource_type": "read",
        "resource_id": "FCwhRBWXzGAHq8TQ4Fs18"
      }
    ]
  },
  "high_quality_base_model_ids": [
    "eleven_v2_flash",
    "eleven_flash_v2",
    "eleven_turbo_v2_5",
    "eleven_multilingual_v2",
    "eleven_v2_5_flash",
    "eleven_flash_v2_5",
    "eleven_turbo_v2"
  ],
  "verified_languages": [
    {
      "language": "en",
      "model_id": "eleven_multilingual_v2",
      "accent": "american",
      "locale": "en-US",
      "preview_url": "https://storage.googleapis.com/eleven-public-prod/premade/voices/9BWtsMINqrJLrRacOk9x/405766b8-1f4e-4d3c-aba1-6f25333823ec.mp3"
    }
  ],
  "voice_verification": {
    "requires_verification": false,
    "is_verified": true,
    "verification_failures": [],
    "verification_attempts_count": 0,
    "language": "en",
    "verification_attempts": [
      {
        "text": "Hello, how are you?",
        "date_unix": 1714204800,
        "accepted": true,
        "similarity": 0.95,
        "levenshtein_distance": 2,
        "recording": {
          "recording_id": "CwhRBWXzGAHq8TQ4Fs17",
          "mime_type": "audio/mpeg",
          "size_bytes": 1000000,
          "upload_date_unix": 1714204800,
          "transcription": "Hello, how are you?"
        }
      }
    ]
  },
  "is_owner": false,
  "is_legacy": false,
  "is_mixed": false
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/voices/21m00Tcm4TlvDq8ikWAM"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/voices/21m00Tcm4TlvDq8ikWAM';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/voices/21m00Tcm4TlvDq8ikWAM"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/voices/21m00Tcm4TlvDq8ikWAM")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/voices/21m00Tcm4TlvDq8ikWAM")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/voices/21m00Tcm4TlvDq8ikWAM');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/voices/21m00Tcm4TlvDq8ikWAM");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/voices/21m00Tcm4TlvDq8ikWAM")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```