Prerequisites
- Python 3.6+
-
requests
library (pip install requests
)
Authentication
You’ll need an API key to authenticate your requests. Replace'YOUR_API_KEY'
in the examples below with your actual API key.
You can get an API key by logging into Wondercraft or creating an account (click “Go to studio” above) if you don’t already have one.
Please note, you’ll need to be on a paid plan to access the API.
You can create a new key by navigating to the workspace selector (on the top left of the platform) > Workspace Settings > API keys. There, you will be able to create a new key which you can use to authenticate your requests.
The API key should be passed in the header of your requests as X-API-KEY
.
Creating Audio Content
To create a new podcast episode, you’ll use the/podcast
endpoint with a POST request.
Wondercraft AI will start a job that will generate a script for your podcast based on the provided prompt.
Checking Episode Status
Once you’ve started the episode creation process, you can check its status using the/podcast/{job_id}
endpoint with a GET request.
Error Handling
Both endpoints may return a 422 status code for validation errors. Make sure to handle these errors appropriately in your production code. Additionally, please note that there is currently a limit of 5 concurrent jobs. If you exceed this limit, you will receive a 429 status code.Advanced Customization
This API is under rapid development. We are working hard to improve existing
functionality and add missing functionality and as such might need to drop
support for existing workflows. If you have any feature requests or concerns,
please contact support@wondercraft.ai
/podcast/scripted
endpoint instead. The payload for that request
looks slightly different. You will provide script segemnts, where each segment contains the text and the voice id for the
speaker.
