Build interactive voice experiences by combining Speech-to-Text, NLU, and Text-to-Speech. The endpoints below let you discover configured agents and obtain LiveKit session details to connect to an agent.
Need an API Key? If you don't have an API key yet, you can create one here: https://playground.induslabs.io/register

Screenshot: where to find your API key. Create one at playground.induslabs.io/register
/api/agentsReturns a list of configured voice agents available in the developer environment.
| Name | Type | Default | Description |
|---|---|---|---|
api_key* | string | required | API key used for authentication. |
| Status | Type | Description |
|---|---|---|
200 OK | application/json | List of agents and metadata. |
401 Unauthorized | application/json | Missing or invalid credentials. |
curl -N -X POST \
"https://developer.induslabs.io/api/agents" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_API_KEY"}'
import requests
url = "https://developer.induslabs.io/api/agents"
payload = {"api_key": "YOUR_API_KEY"}
resp = requests.post(url, json=payload, headers={"Content-Type": "application/json"}, timeout=30)
resp.raise_for_status()
print(resp.json())
type Agent = { agent_id: string; name?: string };
const resp = await fetch("https://developer.induslabs.io/api/agents", {
method: "POST",
headers: { "Content-Type": "application/json", accept: "application/json" },
body: JSON.stringify({ api_key: process.env.NEXT_PUBLIC_INDUS_API_KEY }),
});
if (!resp.ok) throw new Error("Failed to load agents");
const agents: Agent[] = await resp.json();
/api/livekitRequest LiveKit session details for a given agent so clients can join the voice session.
| Name | Type | Default | Description |
|---|---|---|---|
api_key* | string | required | API key used for authentication. |
agent_id* | string | required | ID of the agent to connect to. |
| Status | Type | Description |
|---|---|---|
200 OK | application/json | LiveKit connection details and metadata. |
401 Unauthorized | application/json | Missing or invalid credentials. |
curl -N -X POST \
"https://developer.induslabs.io/api/livekit" \
-H "accept: application/json" \
-H "Content-Type: application/json" \
-d '{"api_key":"YOUR_API_KEY","agent_id":"AGENT_ID"}'
import requests
url = "https://developer.induslabs.io/api/livekit"
payload = {"api_key": "YOUR_API_KEY", "agent_id": "AGT_E882B100"}
resp = requests.post(url, json=payload, headers={"Content-Type": "application/json"}, timeout=30)
resp.raise_for_status()
print(resp.json())
import { Room } from "livekit-client";
const resp = await fetch("https://developer.induslabs.io/api/livekit", {
method: "POST",
headers: { "Content-Type": "application/json", accept: "application/json" },
body: JSON.stringify({
api_key: process.env.NEXT_PUBLIC_INDUS_API_KEY,
agent_id: "AGENT_ID"
}),
});
if (!resp.ok) throw new Error("Failed to start LiveKit");
const { url, token } = await resp.json(); // expects { url, token }
const room = new Room();
await room.connect(url, token);
// add RoomEvent listeners as needed
React + TypeScriptExample of fetching agents, requesting a LiveKit session for one agent, and connecting to the room from a React app.
npm install livekit-clientimport { useEffect, useMemo, useState } from "react";
import { Room, RoomEvent } from "livekit-client";
const API_BASE = "https://developer.induslabs.io/api";
const API_KEY = "YOUR_API_KEY"; // Prefer an env var like process.env.NEXT_PUBLIC_INDUS_API_KEY
type Agent = { agent_id: string; name?: string };
type LivekitSession = { url: string; token: string };
async function fetchAgents(): Promise<Agent[]> {
const res = await fetch(`${API_BASE}/agents`, {
method: "POST",
headers: { "Content-Type": "application/json", accept: "application/json" },
body: JSON.stringify({ api_key: API_KEY })
});
if (!res.ok) throw new Error("Failed to load agents");
return res.json();
}
async function startLivekit(agentId: string): Promise<LivekitSession> {
const res = await fetch(`${API_BASE}/livekit`, {
method: "POST",
headers: { "Content-Type": "application/json", accept: "application/json" },
body: JSON.stringify({ api_key: API_KEY, agent_id: agentId })
});
if (!res.ok) throw new Error("Failed to start LiveKit");
return res.json(); // expects { url, token }
}
export function VoiceAgentLivekit() {
const [agents, setAgents] = useState<Agent[]>([]);
const [room, setRoom] = useState<Room | null>(null);
const [status, setStatus] = useState("idle");
useEffect(() => {
fetchAgents().then(setAgents).catch(console.error);
}, []);
const connect = useMemo(
() => async (agentId: string) => {
setStatus("connecting");
const { url, token } = await startLivekit(agentId);
const lkRoom = new Room();
lkRoom.on(RoomEvent.Connected, () => setStatus("connected"));
lkRoom.on(RoomEvent.Disconnected, () => setStatus("disconnected"));
await lkRoom.connect(url, token);
setRoom(lkRoom);
},
[]
);
useEffect(() => {
return () => room?.disconnect();
}, [room]);
if (!agents.length) return <p>Loading agents...</p>;
return (
<div>
<p>Status: {status}</p>
{agents.map((agent) => (
<button key={agent.agent_id} onClick={() => connect(agent.agent_id)}>
Join {agent.name || agent.agent_id}
</button>
))}
</div>
);
}
The /api/livekit response should include url and token. Supply your API key via environment variables in production and extend with reconnection/error handling as needed.