TwinToneTwinToneAPI Docs

Get started

Quickstart

Get your first AI-hosted live stream running in under 5 minutes.

Base URL: https://twintone-customer-app.vercel.app/api/v1

API access requires the Growth plan or above. API usage is billed per streamed minute from your credit wallet — it does not consume your plan minutes. See API pricing.


1. Create an API key

Dashboard → Billing → API keys → + Create new key.

  • Pick a name you'll recognize later (e.g. production-backend).
  • Pick the environment:
    • Live (tt_live_…) — dispatches real streams, bills real credits.
    • Test (tt_test_…) — simulates the full lifecycle, no agent dispatch, no billing.
  • Choose scopes (least privilege — you can create separate keys for separate jobs).

The full key is shown once. Copy it somewhere safe — we store only a hash, so it can never be recovered. If you lose it, revoke it and create a new one.

2. Make your first call

curl -X POST https://twintone-customer-app.vercel.app/api/v1/streams \ -H "Authorization: Bearer tt_tes...here" \ -H "Content-Type: application/json" \ -d '{ "creator_id": "mila", "product_name": "Radiance Serum", "platform": "youtube", "script": "Welcome in! Today we are talking about the Radiance Serum..." }'

Python (requests)

import requests resp = requests.post( "https://twintone-customer-app.vercel.app/api/v1/streams", headers={"Authorization": "Bearer ***"}, json={ "creator_id": "mila", "product_name": "Radiance Serum", "platform": "youtube", "script": "Welcome in! Today we are talking about the Radiance Serum...", }, ) print(resp.status_code) print(resp.json())

Node (fetch)

const resp = await fetch("https://twintone-customer-app.vercel.app/api/v1/streams", { method: "POST", headers: { Authorization: "Bearer ***", "Content-Type": "application/json", }, body: JSON.stringify({ creator_id: "mila", product_name: "Radiance Serum", platform: "youtube", script: "Welcome in! Today we are talking about the Radiance Serum...", }), }); console.log(resp.status); console.log(await resp.json());

Response (201):

{ "stream_id": "a1b2c3d4-…", "status": "live", "room_name": "stream-a1b2c3d4", "ws_url": null, "viewer_token": null, "test": true, "created_at": "2026-08-07T10:00:00.000Z" }

With a test key the stream goes live immediately (no agent, no billing) so you can exercise the whole lifecycle — including DELETE — end to end. With a live key the response is status: "preparing" and the stream flips to live once the agent is running (poll or use a webhook).

3. Watch it go live

Poll status:

curl https://twintone-customer-app.vercel.app/api/v1/streams/a1b2c3d4-… \ -H "Authorization: Bearer tt_test_your_key_here"

Or register a webhook and we'll push stream.started / stream.ended events to your server — see Webhooks.

4. End the stream

curl -X DELETE https://twintone-customer-app.vercel.app/api/v1/streams/a1b2c3d4-… \ -H "Authorization: Bearer tt_test_your_key_here"

Next steps

Was this page helpful?