POST
/
api
/
v1
/
playnotes
curl --request POST \
  --url https://api.play.ai/api/v1/playnotes \
  --header 'Authorization: Bearer <token>' \
  --header 'X-USER-ID: <api-key>' \
  --header 'content-type: multipart/form-data' \
  --form 'sourceFileUrl=<string>' \
  --form synthesisStyle=podcast \
  --form voice1=s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json \
  --form voice1Name=Angelo \
  --form voice1Gender=Male \
  --form voice2=s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json \
  --form voice2Name=Deedee \
  --form voice2Gender=Male \
  --form webHookUrl=https://my.webhook.url.com
{
  "id": "qHMJf1MqlSPsfBdQIyYi",
  "ownerId": "gpTwobxZzJRczfqommFemErGJTU2",
  "name": "<string>",
  "sourceFileUrl": "<string>",
  "audioUrl": "<string>",
  "synthesisStyle": "podcast",
  "voice1": "s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json",
  "voice1Name": "<string>",
  "voice1Gender": "Male",
  "voice2": "s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json",
  "voice2Name": "<string>",
  "voice2Gender": "Male",
  "webHookUrl": "https://my.webhook.url.com",
  "status": "generating",
  "duration": 123,
  "requestedAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z"
}

Check out the Generate Conversation from PDF with PlayNote API guide for a step-by-step approach to using the PlayNote API to create a podcast-style conversation (and more!) from a PDF.

After you create your PlayNotes, you can proceed to poll its status via the Get PlayNote endpoint.

Note: You can have only one active generation. If you face this error code 403 with the message {"errorMessage":"User already has an active generation","errorId":"UNAUTHORIZED"} then please wait for some time and try again later.

Authorizations

Authorization
string
header
required

Your secret API key from PlayAI, formatted as Bearer YOUR_SECRET_API_KEY.

X-USER-ID
string
header
required

Your unique user ID from PlayAI.

Headers

content-type
enum<string>
required
Available options:
multipart/form-data
accept
enum<string>
Available options:
application/json

Body

multipart/form-data
synthesisStyle
enum<string>
required

The synthesis style of the PlayNote

Available options:
podcast,
executive-briefing,
childrens-story,
debate
voice1
string
required

The unique ID for a PlayAI Voice.

Example:

"s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json"

voice1Name
string | null
required
Example:

"Angelo"

sourceFile
file

The source file to be uploaded. One and only one of sourceFile or sourceFileUrl must be provided.

sourceFileUrl
string

URL to the source file. One and only one of sourceFile or sourceFileUrl must be provided.

voice1Gender
enum<string> | null
Available options:
Male,
Female
voice2
string

The unique ID for a PlayAI Voice.

Example:

"s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json"

voice2Name
string | null
Example:

"Deedee"

voice2Gender
enum<string> | null
Available options:
Male,
Female
webHookUrl
string

A URL to receive status updates for the PlayNote

Example:

"https://my.webhook.url.com"

Response

201 - application/json
PlayNote created successfully
id
string
required

The unique ID for each PlayNote

Example:

"qHMJf1MqlSPsfBdQIyYi"

ownerId
string
required

The PlayAI unique ID for each user

Example:

"gpTwobxZzJRczfqommFemErGJTU2"

name
string
required

The name of the PlayNote

sourceFileUrl
string
required

URL to the source file

synthesisStyle
enum<string>
required

The synthesis style of the PlayNote

Available options:
podcast,
executive-briefing,
childrens-story,
debate
voice1
string
required

The unique ID for a PlayAI Voice.

Example:

"s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json"

status
enum<string>
required

The current status of the PlayNote

Available options:
generating,
completed,
failed
requestedAt
string
required

When the PlayNote was requested

audioUrl
string | null

URL to the generated PlayNote audio file

voice1Name
string

Name of the voice1 character

voice1Gender
enum<string>

Gender of the voice1 character

Available options:
Male,
Female
voice2
string

The unique ID for a PlayAI Voice.

Example:

"s3://voice-cloning-zero-shot/baf1ef41-36b6-428c-9bdf-50ba54682bd8/original/manifest.json"

voice2Name
string | null

Name of the voice2 character

voice2Gender
enum<string> | null

Gender of the voice2 character

Available options:
Male,
Female
webHookUrl
string

A URL to receive status updates for the PlayNote

Example:

"https://my.webhook.url.com"

duration
number | null

Duration of the audio in seconds

createdAt
string | null

When the PlayNote was created