Quickstart Guide
Get up and running with Squiggle in minutes
Step 1: Update Your WebSocket Connection
If you’re already using the OpenAI Realtime API, simply update your WebSocket connection URL:
Step 2: Initialize the Connection
Initialize the connection as you normally would with the OpenAI Realtime API. Squiggle is fully compatible, so your existing code should work without modifications.
Step 3: Handle Squiggle Insights
Squiggle will send additional messages with insights via the websocket connection.
Using Node ws
Library
If you are using the Node.js ws
library, you can use theonmessage
callback to detect new insights:
Using the Realtime API JavaScript Client
OpenAI has published a Realtime API client that provides a layer of abstraction over using the ws
library directly. You can use the client to handle Squiggle insights:
Using the Squiggle REST API
You can also asycnhronously fetch insights related to sessions via the Squiggle REST API, including after the session has ended. Check out the API Reference for more details.
Step 4: Customize Your Configuration (Optional)
You can customize how Squiggle generates insights using the Squiggle REST API. Send a POST request to https://api.squiggle.ai/api/configure
with your desired configuration:
That’s it! You’re now ready to use Squiggle in your application. Check out the Squiggle API Reference for more detailed information on configuring your setup.