Skip to content

Choose your region

App links across the docs follow your region.

Open app(opens in a new tab)

API keys and the Conversation API

Create and manage API keys for your organisation, mint short-lived ephemeral session keys on your server, and run SimConverse conversations from your own application.

For admins

Use API keys to provision live SimConverse conversations from your own backend or to connect an MCP client with a bearer token.

Self-service API key management is turned on per organisation (and is off during a free trial). You must have the Admin role. If you do not see the API tab under Administer > Integrations, contact support.

  1. Open Administer, then Integrations in the sidebar.
  2. Select the API tab (if API is your only enabled integration, it opens directly).
  3. Select Create API Key, enter a descriptive name, choose the access level, and confirm.
  4. Copy and store the key immediately in your server’s secret store. You cannot view the full secret again after closing the dialog.

To stop access for a key that is compromised or no longer needed, open its action menu in the keys table and revoke it.

Never place a standard API key in browser, desktop, or mobile client code. Instead, use the three-step ephemeral session flow documented in the in-app usage guide on the API tab (with copyable cURL, TypeScript, and Rust examples):

  1. Mint. Your server authenticates with your standard read-write key and mints a short-lived ephemeral key for one end-user subject.
  2. Start. Using the ephemeral key, start a conversation session via HTTP (StartConversation), which returns the conversation ID.
  3. Connect. Return only the ephemeral key and conversation ID to the client, keep the key in memory, and connect over Socket.IO at /api/v2/socket.io/ on the /conversation namespace using binary MessagePack framing (socket.io-client@4 with socket.io-msgpack-parser@3).

Once connected to the /conversation namespace with auth.token set to the ephemeral key:

  • Wait for the server_event SessionReady before starting audio turns. ActiveTimeUpdated reports elapsed active conversation time in milliseconds (totalActiveMs), and fatal_error with organization_concurrency_limit reports when your organisation’s concurrent conversation limit is reached.
  • Send command BeginInput, wait for InputReady, stream audio with input_audio_chunk (ordered by sequence), and finish the turn with command EndInput.
  • Play returned audio from response_audio_chunk and halt playback on stop_playback.
  • Trigger character actions, attachments, or App actions with semantic commands (PerformAction, PerformInvestigation, ReportAppAction), and handle video signalling events (Offer, IceCandidate, Configuration, Answer, Ready, Interrupt) when running video conversations.
  • Send EndConversation over the socket to close the conversation cleanly so grading runs. Closing the network socket alone does not guarantee that the conversation finishes and receives a grade.

API key usage draws on your organisation’s billing plan and respects your organisation’s active plan state and concurrent conversation limits.