[{"data":1,"prerenderedAt":770},["ShallowReactive",2],{"navigation":3,"\u002Fdocs\u002Fstart\u002Fauthentication":235,"surround-\u002Fdocs\u002Fstart\u002Fauthentication":767},[4],{"title":5,"path":6,"stem":7,"children":8,"page":18},"Docs","\u002Fdocs","docs",[9,33,68,95,130,161,208],{"title":10,"path":11,"stem":12,"children":13,"page":18,"type":32},"Start","\u002Fdocs\u002Fstart","docs\u002F1.start",[14,20,24,28],{"title":15,"path":16,"stem":17,"new":18,"type":19,"children":-1},"Get started with Lanson Live API","\u002Fdocs\u002Fstart\u002Fquickstart","docs\u002F1.start\u002F2.quickstart",false,"page",{"title":21,"path":22,"stem":23,"new":18,"type":19,"children":-1},"Authentication","\u002Fdocs\u002Fstart\u002Fauthentication","docs\u002F1.start\u002F3.authentication",{"title":25,"path":26,"stem":27,"new":18,"type":19,"children":-1},"Choose an API","\u002Fdocs\u002Fstart\u002Fchoose-an-api","docs\u002F1.start\u002F5.choose-an-api",{"title":29,"path":30,"stem":31,"new":18,"type":19,"children":-1},"Pricing","\u002Fdocs\u002Fstart\u002Fpricing","docs\u002F1.start\u002F6.pricing","group",{"title":34,"path":35,"stem":36,"children":37,"new":18,"type":32},"Realtime","\u002Fdocs\u002Frealtime","docs\u002F2.realtime\u002F1.index",[38,40,44,48,52,56,60,64],{"title":39,"path":35,"stem":36,"new":18,"type":19,"children":-1},"Realtime Overview",{"title":41,"path":42,"stem":43,"new":18,"type":19,"children":-1},"Realtime Quickstart","\u002Fdocs\u002Frealtime\u002Fquickstart","docs\u002F2.realtime\u002F2.quickstart",{"title":45,"path":46,"stem":47,"new":18,"type":19,"children":-1},"Connection Lifecycle","\u002Fdocs\u002Frealtime\u002Fconnection-lifecycle","docs\u002F2.realtime\u002F3.connection-lifecycle",{"title":49,"path":50,"stem":51,"new":18,"type":19,"children":-1},"Audio Input","\u002Fdocs\u002Frealtime\u002Faudio-input","docs\u002F2.realtime\u002F4.audio-input",{"title":53,"path":54,"stem":55,"new":18,"type":19,"children":-1},"Transcript Lifecycle","\u002Fdocs\u002Frealtime\u002Ftranscript-lifecycle","docs\u002F2.realtime\u002F5.transcript-lifecycle",{"title":57,"path":58,"stem":59,"new":18,"type":19,"children":-1},"Realtime Translation","\u002Fdocs\u002Frealtime\u002Frealtime-translation","docs\u002F2.realtime\u002F6.realtime-translation",{"title":61,"path":62,"stem":63,"new":18,"type":19,"children":-1},"Session Configuration","\u002Fdocs\u002Frealtime\u002Fsession-configuration","docs\u002F2.realtime\u002F7.session-configuration",{"title":65,"path":66,"stem":67,"new":18,"type":19,"children":-1},"Handling Interruptions & Silence","\u002Fdocs\u002Frealtime\u002Finterruptions-silence","docs\u002F2.realtime\u002F8.interruptions-silence",{"title":69,"path":70,"stem":71,"children":72,"new":18,"type":32},"Recorded","\u002Fdocs\u002Frecorded","docs\u002F3.recorded\u002F1.index",[73,75,79,83,87,91],{"title":74,"path":70,"stem":71,"new":18,"type":19,"children":-1},"Recorded Overview",{"title":76,"path":77,"stem":78,"new":18,"type":19,"children":-1},"Transcribe Audio","\u002Fdocs\u002Frecorded\u002Ftranscribe-audio","docs\u002F3.recorded\u002F2.transcribe-audio",{"title":80,"path":81,"stem":82,"new":18,"type":19,"children":-1},"Timestamps & Speakers","\u002Fdocs\u002Frecorded\u002Ftimestamps-speakers","docs\u002F3.recorded\u002F3.timestamps-speakers",{"title":84,"path":85,"stem":86,"new":18,"type":19,"children":-1},"Subtitles","\u002Fdocs\u002Frecorded\u002Fsubtitles","docs\u002F3.recorded\u002F4.subtitles",{"title":88,"path":89,"stem":90,"new":18,"type":19,"children":-1},"Recorded Translation","\u002Fdocs\u002Frecorded\u002Ftranslation","docs\u002F3.recorded\u002F5.translation",{"title":92,"path":93,"stem":94,"new":18,"type":19,"children":-1},"Structured Results","\u002Fdocs\u002Frecorded\u002Fstructured-results","docs\u002F3.recorded\u002F6.structured-results",{"title":96,"path":97,"stem":98,"children":99,"new":18,"type":32},"Concepts","\u002Fdocs\u002Fconcepts","docs\u002F4.concepts\u002F1.index",[100,102,106,110,114,118,122,126],{"title":101,"path":97,"stem":98,"new":18,"type":19,"children":-1},"Voice Context Layer",{"title":103,"path":104,"stem":105,"new":18,"type":19,"children":-1},"Stable vs. Partial Text","\u002Fdocs\u002Fconcepts\u002Fstable-vs-partial-text","docs\u002F4.concepts\u002F2.stable-vs-partial-text",{"title":107,"path":108,"stem":109,"new":18,"type":19,"children":-1},"StableStream™","\u002Fdocs\u002Fconcepts\u002Fstablestream","docs\u002F4.concepts\u002F3.stablestream",{"title":111,"path":112,"stem":113,"new":18,"type":19,"children":-1},"Context-Aware Processing","\u002Fdocs\u002Fconcepts\u002Fcontext-aware-processing","docs\u002F4.concepts\u002F4.context-aware-processing",{"title":115,"path":116,"stem":117,"new":18,"type":19,"children":-1},"Understanding Latency","\u002Fdocs\u002Fconcepts\u002Flatency","docs\u002F4.concepts\u002F5.latency",{"title":119,"path":120,"stem":121,"new":18,"type":19,"children":-1},"Live Translation","\u002Fdocs\u002Fconcepts\u002Flive-translation","docs\u002F4.concepts\u002F6.live-translation",{"title":123,"path":124,"stem":125,"new":18,"type":19,"children":-1},"Trinity Engine","\u002Fdocs\u002Fconcepts\u002Ftrinity-engine","docs\u002F4.concepts\u002F7.trinity-engine",{"title":127,"path":128,"stem":129,"new":18,"type":19,"children":-1},"LiveFinal™","\u002Fdocs\u002Fconcepts\u002Flivefinal","docs\u002F4.concepts\u002F8.livefinal",{"title":131,"path":132,"stem":133,"children":134,"new":18,"type":32},"Guides","\u002Fdocs\u002Fguides","docs\u002F5.guides\u002F1.index",[135,137,141,145,149,153,157],{"title":136,"path":132,"stem":133,"new":18,"type":19,"children":-1},"Browser Live Captions",{"title":138,"path":139,"stem":140,"new":18,"type":19,"children":-1},"Server-side Streaming","\u002Fdocs\u002Fguides\u002Fserver-side-streaming","docs\u002F5.guides\u002F2.server-side-streaming",{"title":142,"path":143,"stem":144,"new":18,"type":19,"children":-1},"Build a Stable Caption UI","\u002Fdocs\u002Fguides\u002Fstable-caption-ui","docs\u002F5.guides\u002F3.stable-caption-ui",{"title":146,"path":147,"stem":148,"new":18,"type":19,"children":-1},"Build Live Translation","\u002Fdocs\u002Fguides\u002Flive-translation","docs\u002F5.guides\u002F4.live-translation",{"title":150,"path":151,"stem":152,"new":18,"type":19,"children":-1},"Save a Transcript","\u002Fdocs\u002Fguides\u002Fsave-transcript","docs\u002F5.guides\u002F5.save-transcript",{"title":154,"path":155,"stem":156,"new":18,"type":19,"children":-1},"Reconnect a Live Session","\u002Fdocs\u002Fguides\u002Freconnection","docs\u002F5.guides\u002F6.reconnection",{"title":158,"path":159,"stem":160,"new":18,"type":19,"children":-1},"Client-VAD speech segments","\u002Fdocs\u002Fguides\u002Fclient-vad-segments","docs\u002F5.guides\u002F7.client-vad-segments",{"title":162,"path":163,"stem":164,"children":165,"new":18,"type":32},"API Reference","\u002Fdocs\u002Fapi-reference","docs\u002F6.api-reference\u002F1.index",[166,168,172,176,180,184,188,192,196,200,204],{"title":167,"path":163,"stem":164,"new":18,"type":19,"children":-1},"API Reference Overview",{"title":169,"path":170,"stem":171,"new":18,"type":19,"children":-1},"Realtime API","\u002Fdocs\u002Fapi-reference\u002Frealtime-api","docs\u002F6.api-reference\u002F2.realtime-api",{"title":173,"path":174,"stem":175,"new":18,"type":19,"children":-1},"Client Messages","\u002Fdocs\u002Fapi-reference\u002Fclient-messages","docs\u002F6.api-reference\u002F3.client-messages",{"title":177,"path":178,"stem":179,"new":18,"type":19,"children":-1},"Server Events","\u002Fdocs\u002Fapi-reference\u002Fserver-events","docs\u002F6.api-reference\u002F4.server-events",{"title":181,"path":182,"stem":183,"new":18,"type":19,"children":-1},"Segment Transcription API","\u002Fdocs\u002Fapi-reference\u002Fsegment-transcription","docs\u002F6.api-reference\u002F5.segment-transcription",{"title":185,"path":186,"stem":187,"new":18,"type":19,"children":-1},"Batch Transcription Jobs","\u002Fdocs\u002Fapi-reference\u002Fbatch-jobs","docs\u002F6.api-reference\u002F6.batch-jobs",{"title":189,"path":190,"stem":191,"new":18,"type":19,"children":-1},"Languages & Models","\u002Fdocs\u002Fapi-reference\u002Flanguages","docs\u002F6.api-reference\u002F7.languages",{"title":193,"path":194,"stem":195,"new":18,"type":19,"children":-1},"Errors","\u002Fdocs\u002Fapi-reference\u002Ferrors","docs\u002F6.api-reference\u002F8.errors",{"title":197,"path":198,"stem":199,"new":18,"type":19,"children":-1},"Rate Limits","\u002Fdocs\u002Fapi-reference\u002Frate-limits","docs\u002F6.api-reference\u002F9.rate-limits",{"title":201,"path":202,"stem":203,"new":18,"type":19,"children":-1},"Admin API","\u002Fdocs\u002Fapi-reference\u002Fadmin","docs\u002F6.api-reference\u002F10.admin",{"title":205,"path":206,"stem":207,"new":18,"type":19,"children":-1},"Language Detection","\u002Fdocs\u002Fapi-reference\u002Flanguage-detection","docs\u002F6.api-reference\u002F11.language-detection",{"title":209,"path":210,"stem":211,"children":212,"new":18,"type":32},"Production","\u002Fdocs\u002Fproduction","docs\u002F7.production\u002F1.index",[213,215,219,223,227,231],{"title":214,"path":210,"stem":211,"new":18,"type":19,"children":-1},"Production Checklist",{"title":216,"path":217,"stem":218,"new":18,"type":19,"children":-1},"Reconnection & Retries","\u002Fdocs\u002Fproduction\u002Freconnection-retries","docs\u002F7.production\u002F2.reconnection-retries",{"title":220,"path":221,"stem":222,"new":18,"type":19,"children":-1},"Latency Best Practices","\u002Fdocs\u002Fproduction\u002Flatency-best-practices","docs\u002F7.production\u002F3.latency-best-practices",{"title":224,"path":225,"stem":226,"new":18,"type":19,"children":-1},"Security & Privacy","\u002Fdocs\u002Fproduction\u002Fsecurity-privacy","docs\u002F7.production\u002F4.security-privacy",{"title":228,"path":229,"stem":230,"new":18,"type":19,"children":-1},"Data Retention","\u002Fdocs\u002Fproduction\u002Fdata-retention","docs\u002F7.production\u002F5.data-retention",{"title":232,"path":233,"stem":234,"new":18,"type":19,"children":-1},"Changelog","\u002Fdocs\u002Fproduction\u002Fchangelog","docs\u002F7.production\u002F6.changelog",{"id":236,"title":21,"body":237,"description":758,"extension":759,"links":760,"meta":761,"navigation":763,"new":18,"path":22,"rawbody":764,"seo":765,"stem":23,"technology":760,"__hash__":766},"content\u002Fdocs\u002F1.start\u002F3.authentication.md",{"type":238,"value":239,"toc":742},"minimark",[240,244,249,290,297,305,309,327,331,338,348,351,355,362,367,370,377,428,432,503,507,515,524,528,531,583,594,597,607,611,714,720,724],[241,242,243],"p",{},"Lanson Live API requests require authentication. This page explains how to get an API key through Lanson Live App, use it on your server, and issue short-lived tokens for browsers.",[245,246,248],"h2",{"id":247},"get-an-api-key","Get an API key",[250,251,252,261,278],"ol",{},[253,254,255,256,260],"li",{},"Sign in to ",[257,258,259],"strong",{},"Lanson Live App",", or create a free account.",[253,262,263,264,273,274,277],{},"Open the ",[257,265,266],{},[267,268,272],"a",{"href":269,"rel":270},"https:\u002F\u002Flive.lansonai.com\u002F?panel=developer",[271],"nofollow","API Key Console"," (Live → ",[257,275,276],{},"Account → Developer",").",[253,279,280,281,284,285,289],{},"Click ",[257,282,283],{},"Create API key",", optionally add a label, and copy the ",[286,287,288],"code",{},"sk-..."," key when it appears.",[241,291,292,293,296],{},"New API developer accounts include ",[257,294,295],{},"$5 of free credit",". Usage is charged in USD; you can top up from the same Developer panel.",[298,299,302],"callout",{"color":300,"icon":301},"amber","i-lucide-triangle-alert",[241,303,304],{},"The plaintext key is shown only once. Store it in your server-side secret manager; never commit it or put it in browser code.",[245,306,308],{"id":307},"api-key-format","API key format",[310,311,312,318,321],"ul",{},[253,313,314,315],{},"Prefix: ",[286,316,317],{},"sk-",[253,319,320],{},"The plaintext key is returned only once at provisioning. The server stores only a SHA-256 hash.",[253,322,323,324,326],{},"Minimum length: 16 characters (at least 13 characters after ",[286,325,317],{},")",[245,328,330],{"id":329},"server-side-usage","Server-side usage",[241,332,333,334,337],{},"All endpoints accept the key via the ",[286,335,336],{},"Authorization: Bearer"," header. For a quick auth check, issue a session token:",[339,340,346],"pre",{"className":341,"code":343,"language":344,"meta":345},[342],"language-bash","curl -X POST -H \"Authorization: Bearer sk-...\" \\\n  https:\u002F\u002Faudio.lansonai.com\u002Fv1\u002Faudio\u002Ftranscriptions\u002Fsession-token\n","bash","",[286,347,343],{"__ignoreMap":345},[241,349,350],{},"This works for both offline HTTP requests and WebSocket upgrade handshakes.",[245,352,354],{"id":353},"browser-side-security","Browser-side security",[298,356,359],{"color":357,"icon":358},"red","i-lucide-circle-alert",[241,360,361],{},"Never expose your long-lived API key in frontend code or WebSocket URLs. Use a short-lived session token for browser connections.",[363,364,366],"h3",{"id":365},"session-token-flow","Session token flow",[241,368,369],{},"Browsers cannot safely store a long-lived key. LansonAI provides a short-lived token mechanism:",[241,371,372],{},[373,374],"img",{"alt":375,"src":376},"Session Token Exchange Flow","\u002Fimages\u002Fdocs\u002Fbrowser-live-captions-flow.png",[250,378,379,385,399,409,418],{},[253,380,381,384],{},[257,382,383],{},"Frontend → Backend",": Request a short-lived session token.",[253,386,387,390,391,394,395,398],{},[257,388,389],{},"Backend → LansonAI",": Call ",[286,392,393],{},"POST \u002Fv1\u002Faudio\u002Ftranscriptions\u002Fsession-token"," with ",[286,396,397],{},"Authorization: Bearer sk-..."," (long-lived key, server-side only).",[253,400,401,404,405,408],{},[257,402,403],{},"LansonAI → Backend",": Returns an ephemeral ",[286,406,407],{},"rt_..."," token (valid for 60 seconds).",[253,410,411,414,415,417],{},[257,412,413],{},"Backend → Frontend",": Return the ",[286,416,407],{}," token to the client.",[253,419,420,423,424,427],{},[257,421,422],{},"Frontend → LansonAI",": Open WebSocket connection directly using ",[286,425,426],{},"?access_token=rt_...",".",[363,429,431],{"id":430},"session-token-details","Session token details",[433,434,435,448],"table",{},[436,437,438],"thead",{},[439,440,441,445],"tr",{},[442,443,444],"th",{},"Property",[442,446,447],{},"Value",[449,450,451,462,470,478,489],"tbody",{},[439,452,453,457],{},[454,455,456],"td",{},"Prefix",[454,458,459],{},[286,460,461],{},"rt_",[439,463,464,467],{},[454,465,466],{},"Validity",[454,468,469],{},"60 seconds",[439,471,472,475],{},[454,473,474],{},"Signature",[454,476,477],{},"HMAC-SHA256",[439,479,480,483],{},[454,481,482],{},"Signing secret",[454,484,485,488],{},[286,486,487],{},"GATEWAY_SESSION_TOKEN_SECRET"," (server-side config)",[439,490,491,494],{},[454,492,493],{},"Transport",[454,495,496,497,499,500],{},"URL query ",[286,498,426],{}," or ",[286,501,502],{},"?token=rt_...",[363,504,506],{"id":505},"token-response","Token response",[339,508,513],{"className":509,"code":511,"language":512,"meta":345},[510],"language-json","{\n  \"token\": \"rt_eyJ...\",\n  \"expires_in\": 60,\n  \"endpoint\": \"\u002Fv1\u002Faudio\u002Ftranscriptions\u002Fstream\"\n}\n","json",[286,514,511],{"__ignoreMap":345},[241,516,517,518,520,521,427],{},"If ",[286,519,487],{}," is not configured, the endpoint returns ",[286,522,523],{},"503 token_issuer_unavailable",[245,525,527],{"id":526},"websocket-authentication-methods","WebSocket authentication methods",[241,529,530],{},"The realtime WebSocket accepts three authentication methods:",[433,532,533,546],{},[436,534,535],{},[439,536,537,540,543],{},[442,538,539],{},"Method",[442,541,542],{},"Use case",[442,544,545],{},"Usage",[449,547,548,560,572],{},[439,549,550,554,557],{},[454,551,552],{},[286,553,397],{},[454,555,556],{},"Server-side clients",[454,558,559],{},"HTTP upgrade header",[439,561,562,566,569],{},[454,563,564],{},[286,565,426],{},[454,567,568],{},"Browser",[454,570,571],{},"URL query parameter",[439,573,574,578,580],{},[454,575,576],{},[286,577,502],{},[454,579,568],{},[454,581,582],{},"URL query parameter (alias)",[298,584,585],{"color":300,"icon":301},[241,586,587,588,590,591,593],{},"Never put ",[286,589,288],{}," in a URL. Browser connections must always use ",[286,592,407],{}," session tokens.",[245,595,201],{"id":596},"admin-api",[241,598,599,600,603,604,606],{},"Key provisioning, revocation, and plan-catalog endpoints exist under ",[286,601,602],{},"\u002Fv1\u002Fexternal-transcription",", but they are for internal operators and dashboards, not regular API consumers. See ",[267,605,201],{"href":202}," for details.",[245,608,610],{"id":609},"error-handling","Error handling",[433,612,613,626],{},[436,614,615],{},[439,616,617,620,623],{},[442,618,619],{},"Error code",[442,621,622],{},"HTTP",[442,624,625],{},"Cause",[449,627,628,641,653,665,677,690,702],{},[439,629,630,635,638],{},[454,631,632],{},[286,633,634],{},"missing_api_key",[454,636,637],{},"401",[454,639,640],{},"No Authorization header or query token",[439,642,643,648,650],{},[454,644,645],{},[286,646,647],{},"invalid_api_key",[454,649,637],{},[454,651,652],{},"Key format invalid or unknown key",[439,654,655,660,662],{},[454,656,657],{},[286,658,659],{},"revoked_api_key",[454,661,637],{},[454,663,664],{},"Key has been revoked",[439,666,667,672,674],{},[454,668,669],{},[286,670,671],{},"expired_api_key",[454,673,637],{},[454,675,676],{},"Key has expired",[439,678,679,684,687],{},[454,680,681],{},[286,682,683],{},"auth_unavailable",[454,685,686],{},"503",[454,688,689],{},"Key store unavailable",[439,691,692,697,699],{},[454,693,694],{},[286,695,696],{},"invalid_session_token",[454,698,637],{},[454,700,701],{},"Session token invalid or expired",[439,703,704,709,711],{},[454,705,706],{},[286,707,708],{},"token_issuer_unavailable",[454,710,686],{},[454,712,713],{},"Token issuer not configured",[241,715,716,717,719],{},"See ",[267,718,193],{"href":194}," for the full error reference.",[245,721,723],{"id":722},"next-steps","Next steps",[310,725,726,732,737],{},[253,727,728,731],{},[267,729,730],{"href":16},"Quickstart"," — first request",[253,733,734,736],{},[267,735,193],{"href":194}," — full error reference",[253,738,739,741],{},[267,740,169],{"href":170}," — WebSocket endpoint details",{"title":345,"searchDepth":743,"depth":743,"links":744},2,[745,746,747,748,754,755,756,757],{"id":247,"depth":743,"text":248},{"id":307,"depth":743,"text":308},{"id":329,"depth":743,"text":330},{"id":353,"depth":743,"text":354,"children":749},[750,752,753],{"id":365,"depth":751,"text":366},3,{"id":430,"depth":751,"text":431},{"id":505,"depth":751,"text":506},{"id":526,"depth":743,"text":527},{"id":596,"depth":743,"text":201},{"id":609,"depth":743,"text":610},{"id":722,"depth":743,"text":723},"API key, session token, and browser-side security.","md",null,{"updated":762},"2026-11-08",true,"---\ntitle: Authentication\ndescription: \"API key, session token, and browser-side security.\"\nupdated: 2026-11-08\n---\nLanson Live API requests require authentication. This page explains how to get an API key through Lanson Live App, use it on your server, and issue short-lived tokens for browsers.\n\n## Get an API key\n\n1. Sign in to **Lanson Live App**, or create a free account.\n2. Open the **[API Key Console](https:\u002F\u002Flive.lansonai.com\u002F?panel=developer)** (Live → **Account → Developer**).\n3. Click **Create API key**, optionally add a label, and copy the `sk-...` key when it appears.\n\nNew API developer accounts include **$5 of free credit**. Usage is charged in USD; you can top up from the same Developer panel.\n\n::callout{icon=\"i-lucide-triangle-alert\" color=\"amber\"}\nThe plaintext key is shown only once. Store it in your server-side secret manager; never commit it or put it in browser code.\n::\n\n## API key format\n\n- Prefix: `sk-`\n- The plaintext key is returned only once at provisioning. The server stores only a SHA-256 hash.\n- Minimum length: 16 characters (at least 13 characters after `sk-`)\n\n## Server-side usage\n\nAll endpoints accept the key via the `Authorization: Bearer` header. For a quick auth check, issue a session token:\n\n```bash\ncurl -X POST -H \"Authorization: Bearer sk-...\" \\\n  https:\u002F\u002Faudio.lansonai.com\u002Fv1\u002Faudio\u002Ftranscriptions\u002Fsession-token\n```\n\nThis works for both offline HTTP requests and WebSocket upgrade handshakes.\n\n## Browser-side security\n\n::callout{icon=\"i-lucide-circle-alert\" color=\"red\"}\nNever expose your long-lived API key in frontend code or WebSocket URLs. Use a short-lived session token for browser connections.\n::\n\n### Session token flow\n\nBrowsers cannot safely store a long-lived key. LansonAI provides a short-lived token mechanism:\n\n![Session Token Exchange Flow](\u002Fimages\u002Fdocs\u002Fbrowser-live-captions-flow.png)\n\n1. **Frontend → Backend**: Request a short-lived session token.\n2. **Backend → LansonAI**: Call `POST \u002Fv1\u002Faudio\u002Ftranscriptions\u002Fsession-token` with `Authorization: Bearer sk-...` (long-lived key, server-side only).\n3. **LansonAI → Backend**: Returns an ephemeral `rt_...` token (valid for 60 seconds).\n4. **Backend → Frontend**: Return the `rt_...` token to the client.\n5. **Frontend → LansonAI**: Open WebSocket connection directly using `?access_token=rt_...`.\n\n### Session token details\n\n| Property | Value |\n|---|---|\n| Prefix | `rt_` |\n| Validity | 60 seconds |\n| Signature | HMAC-SHA256 |\n| Signing secret | `GATEWAY_SESSION_TOKEN_SECRET` (server-side config) |\n| Transport | URL query `?access_token=rt_...` or `?token=rt_...` |\n\n### Token response\n\n```json\n{\n  \"token\": \"rt_eyJ...\",\n  \"expires_in\": 60,\n  \"endpoint\": \"\u002Fv1\u002Faudio\u002Ftranscriptions\u002Fstream\"\n}\n```\n\nIf `GATEWAY_SESSION_TOKEN_SECRET` is not configured, the endpoint returns `503 token_issuer_unavailable`.\n\n## WebSocket authentication methods\n\nThe realtime WebSocket accepts three authentication methods:\n\n| Method | Use case | Usage |\n|---|---|---|\n| `Authorization: Bearer sk-...` | Server-side clients | HTTP upgrade header |\n| `?access_token=rt_...` | Browser | URL query parameter |\n| `?token=rt_...` | Browser | URL query parameter (alias) |\n\n::callout{icon=\"i-lucide-triangle-alert\" color=\"amber\"}\nNever put `sk-...` in a URL. Browser connections must always use `rt_...` session tokens.\n::\n\n## Admin API\n\nKey provisioning, revocation, and plan-catalog endpoints exist under `\u002Fv1\u002Fexternal-transcription`, but they are for internal operators and dashboards, not regular API consumers. See [Admin API](\u002Fdocs\u002Fapi-reference\u002Fadmin) for details.\n\n## Error handling\n\n| Error code | HTTP | Cause |\n|---|---|---|\n| `missing_api_key` | 401 | No Authorization header or query token |\n| `invalid_api_key` | 401 | Key format invalid or unknown key |\n| `revoked_api_key` | 401 | Key has been revoked |\n| `expired_api_key` | 401 | Key has expired |\n| `auth_unavailable` | 503 | Key store unavailable |\n| `invalid_session_token` | 401 | Session token invalid or expired |\n| `token_issuer_unavailable` | 503 | Token issuer not configured |\n\nSee [Errors](\u002Fdocs\u002Fapi-reference\u002Ferrors) for the full error reference.\n\n## Next steps\n\n- [Quickstart](\u002Fdocs\u002Fstart\u002Fquickstart) — first request\n- [Errors](\u002Fdocs\u002Fapi-reference\u002Ferrors) — full error reference\n- [Realtime API](\u002Fdocs\u002Fapi-reference\u002Frealtime-api) — WebSocket endpoint details\n",{"title":21,"description":758},"8_dhAubUb06aQFMHLWoamfyJTyE2R6WlnyayqYPfd3E",[768,769],{"title":15,"path":16,"stem":17,"children":-1},{"title":25,"path":26,"stem":27,"children":-1},1795064384569]