How it works
Mythos launches a Consumer into your app with a short-lived, signed launch token. The SDK exchanges it once, establishes the app session, and exposes session data to your server and browser code.
Launch flow
- The Consumer launches your listing from Mythos.
- Mythos redirects the browser to your app with a signed, single-use token.
- The browser client and server handler exchange that token for a secure session.
getSessionreturns the Consumer and listing context, ornullwhen the app is opened standalone.- The browser calls
confirmChargebefore a billable action. - The server calls
chargeafter approval, or usesllmfor gateway-routed model billing.
Publish handshake
Before a listing goes live, Mythos requests /.well-known/mythos-handshake. The handler exposed by mythos.handlers, pagesHandler, mythosExpress, or mythos.router answers that check. The optional listing-registered callback lets an app persist dynamically created listing IDs.
The SDK does all of this for you. Start with the quickstart for your framework instead of implementing token exchange or metering yourself.