メインコンテンツへスキップ
POST
/
voices
Create Voice
curl --request POST \
  --url https://api.cartesia.ai/voices \
  --header 'Cartesia-Version: <cartesia-version>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "embedding": [
    123
  ],
  "base_voice_id": "<string>"
}
'
{
  "id": "<string>",
  "is_owner": true,
  "name": "<string>",
  "description": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "language": "en",
  "embedding": [
    123
  ],
  "country": "US",
  "preview_file_url": "<string>"
}
このエンドポイントは非推奨です!代わりに ボイスをクローン を使用してください。

承認

X-API-Key
string
header
必須

ヘッダー

Cartesia-Version
enum<string>
必須

API version header.

利用可能なオプション:
2024-11-13
:

"2024-11-13"

ボディ

application/json
name
string
必須

The name of the voice.

description
string
必須

The description of the voice.

embedding
number<double>[]
必須

A 192-dimensional vector (i.e. a list of 192 numbers) that represents the voice.

language
enum<string> | null

The language that the given voice should speak the transcript in.

利用可能なオプション:
en,
fr,
de,
es,
pt,
zh,
ja,
hi,
it,
ko,
nl,
pl,
ru,
sv,
tr
base_voice_id
string | null

Pull in features from a base voice, used for features like voice mixing.

レスポンス

200 - application/json
id
string
必須

The ID of the voice.

is_owner
boolean
必須

Whether your organization owns the voice.

name
string
必須

The name of the voice.

description
string
必須

The description of the voice.

created_at
string<date-time>
必須

The date and time the voice was created.

language
string
必須

The voice's language, as an ISO 639-1 code (e.g. en, fr, zh)

:

"en"

embedding
number<double>[] | null

The vector embedding of the voice.

country
string | null

The country associated with the voice, as an ISO 3166-1 alpha-2 code when available (e.g. US, GB, FR).

:

"US"

preview_file_url
string | null

A URL to download a preview audio file of this voice. Useful to avoid consuming credits to sample the voice. The URL requires the same Authorization header. Voice previews may be changed, moved, or deleted so you should avoid storing the URL permanently. This property will be null if there's no preview available. Only included when expand[] includes preview_file_url.