> 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.

# 创建播客

POST https://api.elevenlabs.io/v1/studio/podcasts
Content-Type: application/json

创建并自动转换播客项目。目前，LLM 费用由我们承担，但仍会收取音频生成费用。未来将同时收取 LLM 和音频生成费用。

Reference: https://elevenlabs.io/docs/api-reference/studio/create-podcast

## 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

### Headers

- `safety-identifier` (string, optional, nullable) — 用于审核。工作区必须已加入许可名单才能使用此功能。

### Body (application/json)

This endpoint expects a Body_Create_podcast_v1_studio_podcasts_post.

- `model_id` (string, required) — 此 Studio 项目使用的模型 ID。可通过 GET /v1/models 查询所有可用模型。
- `mode` (BodyCreatePodcastV1StudioPodcastsPostMode, required) — 要生成的播客类型。可以是“conversation”（两个音色之间的互动），或“bulletin”（独白）。
- `source` (BodyCreatePodcastV1StudioPodcastsPostSource, required) — 播客的源内容。
- `quality_preset` (enum, optional, nullable) — 生成音频的输出质量。必须为以下之一： 'standard' - 标准输出格式，采样率为 44.1kHz、比特率为 128kbps。 'high' - 高质量输出格式，采样率为 44.1kHz、比特率为 192kbps，并采用我们显著改进的处理。 'ultra' - 超高质量输出格式，采样率为 44.1kHz、比特率为 192kbps，并采用我们最高级别的处理。 'ultra_lossless' - 超高质量输出格式，采样率为 44.1kHz、比特率为 705.6kbps，以完全无损格式采用我们最高级别的处理。 未提供时，默认使用当前订阅版本可用的最高质量预设。
  - Allowed values: `standard`, `high`, `ultra`, `ultra_lossless`
- `duration_scale` (enum, optional, default: default) — 生成播客的时长。必须为以下之一： short - 生成短于 3 分钟的播客。 default - 生成时长约为 3 至 7 分钟的播客。 long - 生成长于 7 分钟的播客。
  - Allowed values: `short`, `default`, `long`
- `language` (string, optional, nullable) — 可选的 Studio 项目语言。双字母语言代码（ISO 639-1）。
- `intro` (string, optional, nullable) — 始终添加到播客开头的介绍文本。
- `outro` (string, optional, nullable) — 将始终添加到播客结尾的片尾文本。
- `instructions_prompt` (string, optional, nullable) — 用于调整播客风格和语气的额外生成提示词。
- `highlights` (list of string, optional, nullable) — Studio 项目内容的简要摘要或亮点，提供关键要点或主题。长度应为 10 到 70 个字符。
- `callback_url` (string, optional, nullable) — Studio 项目转换时，服务将调用此 URL。请求将包含一个含有转换状态的 JSON 对象。 消息： 1. 项目转换成功时： \{ type: "project\_conversion\_status", event\_timestamp: 1234567890, data: \{ request\_id: "1234567890", project\_id: "21m00Tcm4TlvDq8ikWAM", conversion\_status: "success", project\_snapshot\_id: "22m00Tcm4TlvDq8ikMAT", error\_details: None, } } 2. 项目转换失败时： \{ type: "project\_conversion\_status", event\_timestamp: 1234567890, data: \{ request\_id: "1234567890", project\_id: "21m00Tcm4TlvDq8ikWAM", conversion\_status: "error", project\_snapshot\_id: None, error\_details: "Error details if conversion failed" } } 3. 章节转换成功时： \{ type: "chapter\_conversion\_status", event\_timestamp: 1234567890, data: \{ request\_id: "1234567890", project\_id: "21m00Tcm4TlvDq8ikWAM", chapter\_id: "22m00Tcm4TlvDq8ikMAT", conversion\_status: "success", chapter\_snapshot\_id: "23m00Tcm4TlvDq8ikMAV", error\_details: None, } } 4. 章节转换失败时： \{ type: "chapter\_conversion\_status", event\_timestamp: 1234567890, data: \{ request\_id: "1234567890", project\_id: "21m00Tcm4TlvDq8ikWAM", chapter\_id: "22m00Tcm4TlvDq8ikMAT", conversion\_status: "error", chapter\_snapshot\_id: None, error\_details: "Error details if conversion failed" } }
- `apply_text_normalization` (enum, optional, nullable) — 此参数通过 4 种模式控制文本规范化：'auto'、'on'、'apply_english' 和 'off'。 设为 'auto' 时，系统会自动决定是否应用文本规范化 （例如将数字拼写出来）。设为 'on' 时，始终应用文本规范化；设为 'off' 时则跳过。'apply_english' 与 'on' 相同，但会假定文本为英语。
  - Allowed values: `auto`, `on`, `off`, `apply_english`

## Response

### 200

成功响应

- `project` (ProjectResponseModel, required) — 与创建的播客关联的项目。

## Errors

### 422 Unprocessable Entity Error

验证错误。

- `detail` (list of ValidationError, optional)

## Types

### BodyCreatePodcastV1StudioPodcastsPostMode

要生成的播客类型。可以是“conversation”（两个音色之间的互动），或“bulletin”（独白）。

- PodcastConversationMode: PodcastConversationMode
- PodcastBulletinMode: PodcastBulletinMode

### BodyCreatePodcastV1StudioPodcastsPostSource

播客的源内容。

- PodcastTextSource: PodcastTextSource
- PodcastURLSource: PodcastURLSource
- list of BodyCreatePodcastV1StudioPodcastsPostSourceOneOf2Items

### ProjectResponseModel

- `project_id` (string, required) — 项目的 ID。
- `name` (string, required) — 项目名称。
- `create_date_unix` (integer, required) — 项目创建日期。
- `created_by_user_id` (string, required, nullable) — 创建项目的用户 ID。
- `default_title_voice_ref_id` (string, required) — 默认标题项目音色引用 ID。
- `default_paragraph_voice_ref_id` (string, required) — 默认段落项目音色引用 ID。
- `default_model_id` (string, required) — 默认模型 ID。
- `can_be_downloaded` (boolean, required) — 项目是否可下载。
- `volume_normalization` (boolean, required) — 项目是否使用音量规范化。
- `state` (enum, required) — 项目状态。
  - Allowed values: `creating`, `default`, `converting`, `in_queue`
- `access_level` (enum, required) — 项目的访问级别。
  - Allowed values: `admin`, `editor`, `commenter`, `viewer`
- `quality_check_on` (boolean, required, deprecated) — 是否为此项目启用质量检查。
- `quality_check_on_when_bulk_convert` (boolean, required, deprecated) — 批量转换时是否为项目启用质量检查。
- `default_title_voice_id` (string, required, deprecated) — 默认标题音色 ID。
- `default_paragraph_voice_id` (string, required, deprecated) — 默认段落音色 ID。
- `last_conversion_date_unix` (integer, optional, nullable) — 项目上次转换日期。
- `title` (string, optional, nullable) — 项目标题。
- `author` (string, optional, nullable) — 项目作者。
- `description` (string, optional, nullable) — 项目描述。
- `genres` (list of string, optional, nullable) — 项目流派列表。
- `cover_image_url` (string, optional, nullable) — 项目封面图片 URL。
- `target_audience` (enum, optional, nullable) — 项目的目标受众。
  - Allowed values: `children`, `young adult`, `adult`, `all ages`
- `language` (string, optional, nullable) — 项目语言的双字母语言代码（ISO 639-1）。
- `content_type` (string, optional, nullable) — 项目的内容类型，例如“Novel”或“Short Story”
- `original_publication_date` (string, optional, nullable) — 项目的原始发布日期。
- `mature_content` (boolean, optional, nullable) — 项目是否包含成人内容。
- `isbn_number` (string, optional, nullable) — 项目的 ISBN 编号。
- `fiction` (enum, optional, nullable) — 项目是否为虚构内容。
  - Allowed values: `fiction`, `non-fiction`
- `creation_meta` (ProjectCreationMetaResponseModel, optional, nullable) — 项目的创建元数据。
- `source_type` (enum, optional, nullable) — 项目的源类型。
  - Allowed values: `blank`, `book`, `article`, `genfm`, `video`, `screenplay`
- `chapters_enabled` (boolean, optional, nullable, default: true) — 是否为项目启用章节。
- `captions_enabled` (boolean, optional, nullable, default: true) — 是否为项目启用字幕。
- `caption_style` (CaptionStyleModel, optional, nullable) — 应用于所有字幕的全局样式
- `caption_style_template_overrides` (map from string to CaptionStyleModel, optional, nullable) — 已对提供模板进行的样式更改
- `public_share_id` (string, optional, nullable) — 项目公开分享 ID。
- `aspect_ratio` (enum, optional, nullable) — 项目的宽高比。
  - Allowed values: `16:9`, `9:16`, `4:5`, `1:1`
- `agent_settings` (StudioAgentSettingsModel, optional, nullable) — 项目的智能体相关设置

### ValidationError

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

### PodcastConversationMode

- `type` ("conversation", required) — 要创建的播客类型。
- `conversation` (PodcastConversationModeData, required) — 对话的音色设置。

### PodcastBulletinMode

- `type` ("bulletin", required) — 要创建的播客类型。
- `bulletin` (PodcastBulletinModeData, required) — 公告的音色设置。

### PodcastTextSource

- `type` ("text", required) — 要创建的来源类型。
- `text` (string, required) — 用于创建播客的文本。

### PodcastURLSource

- `type` ("url", required) — 要创建的来源类型。
- `url` (string, required) — 用于创建播客的 URL。

### BodyCreatePodcastV1StudioPodcastsPostSourceOneOf2Items

- PodcastTextSource: PodcastTextSource
- PodcastURLSource: PodcastURLSource

### ProjectCreationMetaResponseModel

- `creation_progress` (double, required) — 项目创建进度。
- `status` (enum, required) — 项目创建操作的状态。
  - Allowed values: `draft`, `pending`, `creating`, `finished`, `failed`
- `type` (enum, required) — 项目创建操作类型。
  - Allowed values: `blank`, `generate_podcast`, `auto_assign_voices`, `dub_video`, `import_speech`

### CaptionStyleModel

- `template` (CaptionStyleTemplateModel, optional, nullable)
- `text_font` (string, optional, nullable)
- `text_scale` (double, optional, nullable)
- `text_color` (string, optional, nullable)
- `text_align` (enum, optional, nullable)
  - Allowed values: `start`, `center`, `end`
- `text_style` (enum, optional, nullable)
  - Allowed values: `normal`, `italic`
- `text_weight` (enum, optional, nullable)
  - Allowed values: `normal`, `bold`, `900`
- `text_transform` (enum, optional, nullable)
  - Allowed values: `none`, `uppercase`
- `text_blend_mode` (enum, optional, nullable)
  - Allowed values: `normal`, `difference`, `multiply`
- `text_shadow` (StudioTextStyleShadowModel, optional, nullable)
- `text_outline` (StudioTextStyleOutlineModel, optional, nullable)
- `background_enabled` (boolean, optional, nullable)
- `background_color` (string, optional, nullable)
- `background_opacity` (double, optional, nullable)
- `background_blur` (double, optional, nullable)
- `background_border_radius` (double, optional, nullable)
- `word_highlights_enabled` (boolean, optional, nullable)
- `word_highlights_color` (string, optional, nullable)
- `word_highlights_background_color` (string, optional, nullable)
- `word_highlights_opacity` (double, optional, nullable)
- `word_highlights_border_radius` (double, optional, nullable)
- `word_highlights_blur` (double, optional, nullable)
- `section_animation` (CaptionStyleSectionAnimationModel, optional, nullable)
- `word_animation` (CaptionStyleWordAnimationModel, optional, nullable)
- `character_animation` (CaptionStyleCharacterAnimationModel, optional, nullable)
- `cursor_enabled` (boolean, optional, nullable)
- `width_pct` (double, optional, nullable)
- `horizontal_placement` (CaptionStyleHorizontalPlacementModel, optional, nullable)
- `vertical_placement` (CaptionStyleVerticalPlacementModel, optional, nullable)
- `auto_break_enabled` (boolean, optional, nullable)
- `max_lines_per_section` (integer, optional, nullable)
- `max_words_per_line` (integer, optional, nullable)

### StudioAgentSettingsModel

- `tool_settings` (map from string to StudioAgentToolSettingsModel, optional)

### ValidationErrorLocItems

- string
- integer

### PodcastConversationModeData

- `host_voice_id` (string, required) — 主持人音色的 ID。
- `guest_voice_id` (string, required) — 嘉宾音色 ID。

### PodcastBulletinModeData

- `host_voice_id` (string, required) — 主持人音色的 ID。

### CaptionStyleTemplateModel

- `key` (string, required)
- `label` (string, required)
- `requires_high_fps` (boolean, optional, default: false)

### StudioTextStyleShadowModel

- `enabled` (boolean, required)
- `color` (string, required)
- `opacity` (double, required)
- `blur` (double, required)
- `offset_x` (double, required)
- `offset_y` (double, required)

### StudioTextStyleOutlineModel

- `enabled` (boolean, required)
- `color` (string, required)
- `opacity` (double, required)
- `width` (double, required)

### CaptionStyleSectionAnimationModel

- `enter_type` (enum, required)
  - Allowed values: `none`, `fade`, `scale`, `pop`, `slide_up`, `slide_down`, `slam`, `scale_down`, `slide_in`
- `exit_type` (enum, required)
  - Allowed values: `none`, `fade`, `scale`, `pop`, `slide_up`, `slide_down`, `slam`, `scale_down`, `slide_in`

### CaptionStyleWordAnimationModel

- `enter_type` (enum, required)
  - Allowed values: `none`, `fade`, `scale`, `pop`, `slide_up`, `slide_down`, `slam`, `scale_down`, `slide_in`
- `exit_type` (enum, required)
  - Allowed values: `none`, `fade`, `scale`, `pop`, `slide_up`, `slide_down`, `slam`, `scale_down`, `slide_in`

### CaptionStyleCharacterAnimationModel

- `enter_type` (enum, required)
  - Allowed values: `none`, `fade`, `typewriter`
- `exit_type` (enum, required)
  - Allowed values: `none`, `fade`

### CaptionStyleHorizontalPlacementModel

- `align` (enum, required)
  - Allowed values: `left`, `center`, `right`
- `translate_pct` (double, required)

### CaptionStyleVerticalPlacementModel

- `align` (enum, required)
  - Allowed values: `top`, `center`, `bottom`
- `translate_pct` (double, required)

### StudioAgentToolSettingsModel

- `skip_confirmation` (boolean, optional, default: false)

## Examples

**Request**

```json
{
  "model_id": "eleven_multilingual_v2",
  "mode": {
    "conversation": {
      "guest_voice_id": "bYTqZQo3Jz7LQtmGTgwi",
      "host_voice_id": "6lCwbsX1yVjD49QmpkTR"
    },
    "type": "conversation"
  },
  "source": {
    "type": "url",
    "url": "https://en.wikipedia.org/wiki/Cognitive_science"
  }
}
```

**Response**

```json
{
  "project": {
    "project_id": "aw1NgEzBg83R7vgmiJt6",
    "name": "My Project",
    "create_date_unix": 1714204800,
    "created_by_user_id": "Vbtgl3bRdj6lk79rYAgx",
    "default_title_voice_ref_id": "JBFqnCBsd6RMkjVDRZzb",
    "default_paragraph_voice_ref_id": "JBFqnCBsd6RMkjVDRZzb",
    "default_model_id": "eleven_multilingual_v2",
    "can_be_downloaded": true,
    "volume_normalization": true,
    "state": "default",
    "access_level": "viewer",
    "quality_check_on": false,
    "quality_check_on_when_bulk_convert": false,
    "default_title_voice_id": "JBFqnCBsd6RMkjVDRZzb",
    "default_paragraph_voice_id": "JBFqnCBsd6RMkjVDRZzb",
    "last_conversion_date_unix": 1714204800,
    "title": "My Project",
    "author": "John Doe",
    "description": "This is a description of my project.",
    "genres": [
      "Novel",
      "Short Story"
    ],
    "cover_image_url": "https://example.com/cover.jpg",
    "target_audience": "young adult",
    "language": "en",
    "content_type": "Novel",
    "original_publication_date": "2025-01-01",
    "mature_content": false,
    "isbn_number": "978-90-274-3964-2",
    "fiction": "fiction",
    "creation_meta": {
      "creation_progress": 0.5,
      "status": "pending",
      "type": "blank"
    },
    "public_share_id": "abc123def456789"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/studio/podcasts"

payload = {
    "model_id": "eleven_multilingual_v2",
    "mode": {
        "conversation": {
            "guest_voice_id": "bYTqZQo3Jz7LQtmGTgwi",
            "host_voice_id": "6lCwbsX1yVjD49QmpkTR"
        },
        "type": "conversation"
    },
    "source": {
        "type": "url",
        "url": "https://en.wikipedia.org/wiki/Cognitive_science"
    }
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/studio/podcasts';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"model_id":"eleven_multilingual_v2","mode":{"conversation":{"guest_voice_id":"bYTqZQo3Jz7LQtmGTgwi","host_voice_id":"6lCwbsX1yVjD49QmpkTR"},"type":"conversation"},"source":{"type":"url","url":"https://en.wikipedia.org/wiki/Cognitive_science"}}'
};

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"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/studio/podcasts"

	payload := strings.NewReader("{\n  \"model_id\": \"eleven_multilingual_v2\",\n  \"mode\": {\n    \"conversation\": {\n      \"guest_voice_id\": \"bYTqZQo3Jz7LQtmGTgwi\",\n      \"host_voice_id\": \"6lCwbsX1yVjD49QmpkTR\"\n    },\n    \"type\": \"conversation\"\n  },\n  \"source\": {\n    \"type\": \"url\",\n    \"url\": \"https://en.wikipedia.org/wiki/Cognitive_science\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	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/studio/podcasts")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"model_id\": \"eleven_multilingual_v2\",\n  \"mode\": {\n    \"conversation\": {\n      \"guest_voice_id\": \"bYTqZQo3Jz7LQtmGTgwi\",\n      \"host_voice_id\": \"6lCwbsX1yVjD49QmpkTR\"\n    },\n    \"type\": \"conversation\"\n  },\n  \"source\": {\n    \"type\": \"url\",\n    \"url\": \"https://en.wikipedia.org/wiki/Cognitive_science\"\n  }\n}"

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.post("https://api.elevenlabs.io/v1/studio/podcasts")
  .header("Content-Type", "application/json")
  .body("{\n  \"model_id\": \"eleven_multilingual_v2\",\n  \"mode\": {\n    \"conversation\": {\n      \"guest_voice_id\": \"bYTqZQo3Jz7LQtmGTgwi\",\n      \"host_voice_id\": \"6lCwbsX1yVjD49QmpkTR\"\n    },\n    \"type\": \"conversation\"\n  },\n  \"source\": {\n    \"type\": \"url\",\n    \"url\": \"https://en.wikipedia.org/wiki/Cognitive_science\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.elevenlabs.io/v1/studio/podcasts', [
  'body' => '{
  "model_id": "eleven_multilingual_v2",
  "mode": {
    "conversation": {
      "guest_voice_id": "bYTqZQo3Jz7LQtmGTgwi",
      "host_voice_id": "6lCwbsX1yVjD49QmpkTR"
    },
    "type": "conversation"
  },
  "source": {
    "type": "url",
    "url": "https://en.wikipedia.org/wiki/Cognitive_science"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/studio/podcasts");
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"model_id\": \"eleven_multilingual_v2\",\n  \"mode\": {\n    \"conversation\": {\n      \"guest_voice_id\": \"bYTqZQo3Jz7LQtmGTgwi\",\n      \"host_voice_id\": \"6lCwbsX1yVjD49QmpkTR\"\n    },\n    \"type\": \"conversation\"\n  },\n  \"source\": {\n    \"type\": \"url\",\n    \"url\": \"https://en.wikipedia.org/wiki/Cognitive_science\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [
  "model_id": "eleven_multilingual_v2",
  "mode": [
    "conversation": [
      "guest_voice_id": "bYTqZQo3Jz7LQtmGTgwi",
      "host_voice_id": "6lCwbsX1yVjD49QmpkTR"
    ],
    "type": "conversation"
  ],
  "source": [
    "type": "url",
    "url": "https://en.wikipedia.org/wiki/Cognitive_science"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/studio/podcasts")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```