Built for agents & builders
AI clients (Cursor, Claude, and other agents) can discover the entire API with a single call. The spec is public and CORS-enabled.
curl -s https://booya.ai/functions/getStudioApiSpec | jq .data
Authentication
The embed uses a public embed id (emb_…) — safe to ship in an iframe URL. Direct REST calls from your own server use a secret API key (bya_…) in the X-API-Key header (or apiKey in the body). The secret key is never exposed in the browser — the embed only ever sees the public embed id, and session tokens are scoped to your registered domains.
Scoped tokens
The master AI key never leaves Booya. Sessions get opaque tokens limited to allowed models, domains, and duration.
Domain-locked
Each token is restricted to the customer registered domains via a runtime domain lock.
Metered minutes
Reserve-on-start, true-up-on-end. Included monthly minutes + metered overage.
Quickstart
curl -X POST https://booya.ai/functions/createStudioSession -H "X-API-Key: bya_xxx" -H "Content-Type: application/json" -d '{"model":"booya-fx"}'Try it now
Generate a real, sandboxed key with one click — then drop the snippet on your site to test the live experience. No payment or account required.
Try it with a test key
Generate a real Studio key and embed it on your site to test the live experience. Each key is sandboxed to 30 minutes and you get up to 3 — no payment needed.
Endpoints
Mint a scoped session token + reserve minutes. Returns the token, max duration, and customer config.
Request
{ "model": "booya-fx" }Response
{ "sessionToken": "bya_…", "maxDurationSeconds": 300, "model": "booya-fx", "config": { … } }True-up the minute ledger on session end. Refunds unused reserved minutes, accrues overage.
Request
{ "reservedSeconds": 300, "actualSeconds": 47 }Response
{ "actualSeconds": 47, "overageSeconds": 0, "minutesUsed": 1.2 }Admin-only. Provision a new customer: API key + StudioClient config + embed snippet.
Request
{ "brandName": "Acme", "userEmail": "u@acme.com", "includedMinutes": 120, "allowedModels": ["booya-fx"] }Response
{ "apiKey": "bya_…", "studioClientId": "…", "embedSnippet": "<iframe … />" }Self-serve test key (no payment). Same provisioning logic as a paid customer, sandboxed to 30 minutes, capped at 3 per person. Returns embed id + secret + snippet.
Request
{}Response
{ "embed_id": "emb_…", "api_key": "bya_…", "snippet": "<iframe … />", "remaining": 2, "total": 3 }Embed the player
The fastest path: drop an iframe pointing at the branded embed page. Replace emb_xxx with your public embed id. Optional model param picks among the enabled models.
<iframe src="https://booya.ai/studio/embed?embed=emb_xxx&model=booya-fx" allow="camera; microphone; fullscreen" style="width:100%;height:600px;border:0;border-radius:16px"></iframe>