Get started
Overview
Crackle runs voice agents: you describe how an agent should talk and what it can do, and it holds a real-time spoken conversation with the people who use your product. These docs cover everything you can do from your own code.
QuickstartStart a call from your server and talk to an agent from a web page.AuthenticationCreate an API key, send it, and revoke it when you need to.API referenceEvery request, with its parameters, a sample and its errors.CookbooksWorked examples that build one whole thing each, with all of the code.
How a call works
Three parties take part in a call: your server, your app (a web page or a phone), and the agent. Your API key never leaves your server.
- Your server starts the callIt sends the agent’s ID to
POST /v1/callswith your API key, and gets back a room address and a join token. - Your app joins the roomIt connects with the token and turns on the microphone. The agent is already there, and greets the caller.
- They talkThe agent listens, replies in its own voice, and can call your endpoints as tools to look things up or get things done.
- You get the recordWhen the call ends, the transcript, duration and cost are in the call log and sent to your webhook.
What you can do with the API
- Agents: create and change agents from code instead of in the studio.
- Variables: tell an agent who it is talking to on each call.
- Tools: let an agent look things up or take actions in your systems.
- Calls: start calls, speak into them and end them.
- Web and mobile clients: put a call in a web page or an app, with live captions.
- Webhooks: be told when calls start and end, with the transcript.
The studio and the API
Everything in these docs can also be done by hand in the studio, and the two work on the same things: an agent you make in the studio can take calls started through the API, and an agent you create through the API shows up in the studio. Most people build and test an agent in the studio first, then wire it into their product with the API.