Sign in
Docs
API referenceVoice

API reference

Start a voice call

Have a token? Manage tokens in the console
POST
/v1/voice/sessions

Start a call with Io on one of your coordinator threads. Answers the room to join, a join token for you alone that admits you for at most ten minutes, Io's identity in the room and the data channel's topic. Speech recognition runs on your device; nothing said is stored by this service.

Needs scope voice:call.

Authorization

bearer
headerAuthorizationBearer <JWT>

An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.

Request Body

iohr.voice.v1.CreateSessionRequest; path variables override their fields

application/json
  1. body

iohr.voice.v1.CreateSessionRequest

account_id?string
lang?string
thread_id?string

Response Body

iohr.voice.v1.CreateSessionResponse

application/json
  1. response

iohr.voice.v1.CreateSessionResponse

agent_identity*string
expires_at*string
identity*string
livekit_url*string
room*string
session?

iohr.voice.v1.Session

token*string
topic*string
import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try {  const { value } = await api.voice.createSession({ lang: "<lang>" });  console.log(value);} catch (e) {  if (!(e instanceof ApiError)) throw e;  console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);  process.exitCode = 1;}

npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.

Example Response
{  "agent_identity": "string",  "expires_at": "string",  "identity": "string",  "livekit_url": "string",  "room": "string",  "session": {    "account_id": "string",    "characters": 0,    "duration_ms": "string",    "end_reason": "string",    "ended_at": "string",    "handoffs": 0,    "max_characters": 0,    "max_seconds": 0,    "room": "string",    "session_id": "string",    "started_at": "string",    "state": "string",    "thread_id": "string",    "turns": 0  },  "token": "string",  "topic": "string"}