Use this file to discover all available pages before exploring further.
The ContextLM API delivers a streamlined interface to advanced context-aware podcast generation technology. Follow this quick start guide to master implementing engaging, natural-sounding podcast within your application.
Make a POST request to this endpoint: https://api.contextlm.ai/v1/generate_podcast to generate podcast.Remember to replace ContextLM_API_KEY with your actual API key.Terminal example
curl -X POST 'https://api.contextlm.ai/v1/generate_podcast' \-H 'x-api-key: $ContextLM_API_KEY' \-H 'Content-Type: application/json' \-d '{"dialogues": [{"role": "host", "content": "Alright, Sarah, what’s the one habit that completely changed your productivity?"}, {"role": "guest", "content": "Hands down—time blocking. Game changer."}], "host": "en-US-Ben-M-POD", "guest": "en-US-Kate-F-POD"}'
Python example
import requestsresponse = requests.post("https://api.contextlm.ai/v1/generate_podcast",headers={"x-api-key": "$ContextLM_API_KEY"},json={"dialogues": [{"role": "host", "content": "Alright, Sarah, what’s the one habit that completely changed your productivity?"}, {"role": "guest", "content": "Hands down—time blocking. Game changer."}], "host": "en-US-Ben-M-POD", "guest": "en-US-Kate-F-POD"},)print(response.json())
ContextLM supports speech synthesis with a variety of voices. Checkout the API reference for more details. To try out all the available voices, visit the Voice Library page.