Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
フィードバックを送信
ポッドキャストを生成する(API メソッド)
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
非推奨: Podcast API は非推奨になりました。Google は新規のお客様のホワイトリスト登録を行っていません。 Gemini Enterprise には、ソース ドキュメントに基づいてポッドキャストを生成できる API が用意されています。出力は、エンドユーザーがノートブック内から生成できるポッドキャストと非常によく似ています。
API を介したポッドキャストの生成は、数十冊または数百冊の書籍、記事、コースがあり、それぞれにポッドキャストを生成する場合のバッチジョブに適しています。
ポッドキャスト API はスタンドアロンの API です。つまり、NotebookLM Enterprise ノートブック、Gemini Enterprise ライセンス、データストアは必要ありません。必要なのは、有効な Google Cloud プロジェクトとポッドキャスト API ユーザーロールだけです。
API の入力は context 要素の配列です。これは、ポッドキャストの生成元となるソース資料です。入力は、テキスト、画像、音声、動画の形式にできます。コンテキスト配列のコンテンツの合計は 100,000 トークン未満にする必要があります。
サポートされているタイプの一覧については、Gemini 2.5 Flash に関するこのページの画像、ドキュメント、動画、音声の技術仕様をご覧ください。
出力
API からの出力は、MP3 形式のポッドキャストです。
始める前に
API を使用してポッドキャストを生成するには、次のものが必要です。
コンテキスト入力からポッドキャストを生成する
次のコマンドを使用して、ポッドキャスト メソッドを呼び出してポッドキャストを生成します。
入力は、テキスト、画像、音声クリップ、動画クリップなどのマルチメディア オブジェクトの配列です。
REST
ポッドキャストを生成してエクスポートする手順は次のとおりです。
次の curl コマンドを実行します。
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://discoveryengine.googleapis.com/v1/projects/PROJECT_ID /locations/global/podcasts" \
-d '{
"podcastConfig": {
"focus": "FOCUS ",
"length": "LENGTH ",
"languageCode": "LANGUAGE_CODE "
},
"contexts": [
{
"text": "TEXT_CONTENT "
},
{
"inlineData": {
"mimeType": "MIME_TYPE ",
"data": "BASE64_ENCODED_DATA "
}
}
],
"title": "PODCAST_TITLE ",
"description": "PODCAST_DESCRIPTION "
}'
次のように置き換えます。
PROJECT_ID : 実際のプロジェクトの ID。
FOCUS : ポッドキャストの焦点となる内容を提案するプロンプト。
LENGTH : 検証には次の 2 つの方法があります。SHORT(通常は 4~5 分)
STANDARD(通常は約 10 分ですが、データセットが小さい場合は短くなることがあります)
LANGUAGE_CODE : 省略可。ポッドキャストの言語コードを指定します。BCP47 で定義されている言語タグを使用します。言語コードが指定されていない場合、ポッドキャストは英語で生成されます。
TEXT_CONTENT : 含めるテキスト コンテンツ。
inlineData: テキスト以外のメディアのオブジェクト。
MIME_TYPE : BLOB データの MIME タイプ(例: "image/png")。
BASE64_ENCODED_DATA : メディア データの base64 エンコードされた未加工のバイト。
PODCAST_TITLE : ポッドキャストのタイトル。これは内部で使用することも、エンドユーザーに表示することもできます。
PODCAST_DESCRIPTION : ポッドキャストの説明。これは内部で使用することも、エンドユーザーに表示することもできます。
コマンド例と結果
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
"https://discoveryengine.googleapis.com/v1/projects/my-project-123/locations/global/podcasts" \
-d '{
"podcastConfig": {
"focus": "Can you talk about how to find a job in Google?",
"length": "SHORT"
},
"contexts": [
{
"text": "Breaking into Google is a highly competitive endeavor, attracting millions of applicants globally due to its reputation as a top employer, its innovative work, and comprehensive perks. Success hinges on a multi-faceted approach, starting with meticulously tailored online applications that incorporate job description keywords for ATS and showcasing Googlyness—a blend of curiosity, collaborative spirit, and leadership potential. The rigorous, multi-stage interview process involves recruiter screens, behavioral interviews (often using the STAR method), and for technical roles, demanding coding challenges and system design questions that assess not just correct answers but also problem-solving thought processes and communication skills. Networking for referrals and informational interviews can significantly boost visibility, but ultimately, thorough preparation through mock interviews and platforms like LeetCode, combined with patience and resilience through the often lengthy process, are paramount for navigating this challenging but rewarding path."
},
{
"inlineData": {
"mimeType": "image/png",
"data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="
}
}
],
"title": "Find a job at Google ",
"description": "This podcast is based on a plain text document and an image that describe various aspects of getting a job at Google."
}'
{
"name": "projects/123456/locations/global/operations/create-podcast-54321"
}
ポッドキャストの生成には数分かかります。
オペレーション名をメモします。ステップ 4 でポッドキャストをダウンロードする際に必要になります。上記の例では、オペレーション名は projects/123456/locations/global/operations/create-podcast-54321 です。
省略可。ポッドキャスト作成オペレーションのステータスをポーリングします。長時間実行オペレーションの詳細を取得する をご覧ください。
オペレーションが完了したら、次の curl コマンドを実行してポッドキャストをダウンロードします。
curl -v \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://discoveryengine.googleapis.com/v1/OPERATION_NAME :download?alt=media" \
--output FILENAME .mp3 -L
次のように置き換えます。
OPERATION_NAME : ステップ 2 でメモしたオペレーションの名前。
FILENAME : ポッドキャストのファイル名。
このコマンドは、ポッドキャストをローカル ディレクトリの MP3 ファイルにダウンロードします。
コマンド例と結果
curl -v \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://discoveryengine.googleapis.com/v1/projects/123456/locations/global/operations/create-podcast-54321:download?alt=media" \
--output my-podcast.mp3 -L
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host discoveryengine.googleapis.com:443 was resolved.
...
{ [42044 bytes data]
100 14.3M 100 14.3M 0 0 10.9M 0 0:00:01 0:00:01 --:--:-- 29.7M
* Connection #0 to host discoveryengine.googleapis.com left intact
コンプライアンス
ポッドキャスト API は、顧客管理の暗号鍵である Gemini Enterprise の CMEK に準拠していません。
フィードバックを送信
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンス により使用許諾されます。コードサンプルは Apache 2.0 ライセンス により使用許諾されます。詳しくは、Google Developers サイトのポリシー をご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2026-06-02 UTC。
ご意見をお聞かせください
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2026-06-02 UTC。"],[],[]]