Longplay is the current public integration name; the Longplay packages and native coordinates below are published. Previously published Indiana packages and downloads remain immutable; the CLI installs only the longplay command and the indiana alias is retired. Preserve configuration and credentials when migrating.
The product is called Longplay. The installation commands and examples below use the actual published package names, commands, and protocol identifiers.
Every client speaks HTTP protocol 0.10. These examples use production API https://api.longplayai.com with that deployment's Sandbox App/Key. Sandbox is still production data. Keep Server Keys on trusted backends; browsers and apps use backend-issued Customer sessions.
Installable clients
Client
Package
Version
Runtime
Coverage
JavaScript / TypeScript
@tinkerlandai/longplay-sdk (npm)
Latest stable
Node.js 22+ backends, browsers
All server and browser capabilities: Customers, entitlements, balances, payments, offers, Features, Funnels, Paywalls, page experiments and screen rendering
Web SDK (script)
https://cdn.longplayai.com/sdk/module
Latest Web release
Browsers, no npm required
The same browser SDK's entitlements, events, content, Paywalls, Funnels and page experiments
IAM
@tinkerlandai/longplay-iam (npm)
0.7.10
Node.js 22+
Build-time App page map generation, validation and upload
Python
tinkerlandai-longplay-sdk (import longplay)
Latest stable
Python 3.11+
Server SDK with sync and async clients; see the platform support table for capabilities
Go
longplayai.com/sdk/go
Latest stable
Go 1.23+
Server SDK with a goroutine-safe client; see the platform support table for capabilities
Longplay CLI
longplay
0.3.23
Node.js 22+
Console management, document validation and code-reference scanning
React Native
@tinkerlandai/longplay-react-native (npm)
Latest stable
React Native 0.79+ / Metro 0.82+
Customer identity, holdings, entitlement checks, commerce commands, Offering/Paywall/content resolution, experiments and events; optional native integration adds Funnel/Paywall/content presentation and store purchase/restore; trusted usage writes go through the backend
iOS / macOS (Swift)
tinkerlandai.longplay (SwiftPM registry)
Latest stable
Swift 6 / iOS 16+ / macOS 12+
Customer identity, entitlement and Feature reads, Funnel/Paywall/content presentation, store purchase and restore, events and push; trusted usage writes go through the backend
Android (Kotlin)
ai.tinkerland:longplay-sdk (Maven)
Latest stable
minSdk 23 / Java 17
Customer identity, entitlement and Feature reads, Funnel/Paywall/content presentation, store purchase and restore, events and push; trusted usage writes go through the backend
Installable clients
JavaScript / TypeScript
Package
@tinkerlandai/longplay-sdk (npm)
Version
Latest stable
Runtime
Node.js 22+ backends, browsers
Coverage
All server and browser capabilities: Customers, entitlements, balances, payments, offers, Features, Funnels, Paywalls, page experiments and screen rendering
Web SDK (script)
Package
https://cdn.longplayai.com/sdk/module
Version
Latest Web release
Runtime
Browsers, no npm required
Coverage
The same browser SDK's entitlements, events, content, Paywalls, Funnels and page experiments
IAM
Package
@tinkerlandai/longplay-iam (npm)
Version
0.7.10
Runtime
Node.js 22+
Coverage
Build-time App page map generation, validation and upload
Python
Package
tinkerlandai-longplay-sdk (import longplay)
Version
Latest stable
Runtime
Python 3.11+
Coverage
Server SDK with sync and async clients; see the platform support table for capabilities
Go
Package
longplayai.com/sdk/go
Version
Latest stable
Runtime
Go 1.23+
Coverage
Server SDK with a goroutine-safe client; see the platform support table for capabilities
Longplay CLI
Package
longplay
Version
0.3.23
Runtime
Node.js 22+
Coverage
Console management, document validation and code-reference scanning
React Native
Package
@tinkerlandai/longplay-react-native (npm)
Version
Latest stable
Runtime
React Native 0.79+ / Metro 0.82+
Coverage
Customer identity, holdings, entitlement checks, commerce commands, Offering/Paywall/content resolution, experiments and events; optional native integration adds Funnel/Paywall/content presentation and store purchase/restore; trusted usage writes go through the backend
iOS / macOS (Swift)
Package
tinkerlandai.longplay (SwiftPM registry)
Version
Latest stable
Runtime
Swift 6 / iOS 16+ / macOS 12+
Coverage
Customer identity, entitlement and Feature reads, Funnel/Paywall/content presentation, store purchase and restore, events and push; trusted usage writes go through the backend
Android (Kotlin)
Package
ai.tinkerland:longplay-sdk (Maven)
Version
Latest stable
Runtime
minSdk 23 / Java 17
Coverage
Customer identity, entitlement and Feature reads, Funnel/Paywall/content presentation, store purchase and restore, events and push; trusted usage writes go through the backend
For Python and Go server capabilities and runtime prerequisites, consult the platform support table and each language guide. HTTP reference pages list the method for each operation. Confirm that your chosen SDK version supports the operation, and use the Server Key or Run credential required by its guide. Available operations without a Python or Go method can be called through the HTTP API with the same headers, credentials and error format.
Install the latest stable release, then commit exact dependencies and lockfiles. https://cdn.longplayai.com/sdk/longplay/stable resolves the stable version for the selected package; without the package parameter it stays on the last bundled release that older installers rely on, which is not any package's latest version, so always pass the parameter. These examples use protocol 0.10 at https://api.longplayai.com; check the target protocol, API origin and credentials together when changing deployments.
Server Key client, session issuing, Funnel start and decisions, Paywall start and AI usage
@tinkerlandai/longplay-sdk
Browser
Customer Token client, Features, Funnel and Paywall display
@tinkerlandai/longplay-sdk/page
Browser
Anonymous URL redirect experiments
@tinkerlandai/longplay-sdk/visual
Browser
Anonymous visual experiments
@tinkerlandai/longplay-sdk/popup
Browser
Standalone screen rendering, sanitizing and previews
@tinkerlandai/longplay-sdk/native-shell
WebView
Funnel shell assets for native WebViews
@tinkerlandai/longplay-sdk/openrouter
Trusted backend
OpenRouter usage billing; also install @openrouter/sdk
Entry points
@tinkerlandai/longplay-sdk/server
Runs in
Trusted backend
Purpose
Server Key client, session issuing, Funnel start and decisions, Paywall start and AI usage
@tinkerlandai/longplay-sdk
Runs in
Browser
Purpose
Customer Token client, Features, Funnel and Paywall display
@tinkerlandai/longplay-sdk/page
Runs in
Browser
Purpose
Anonymous URL redirect experiments
@tinkerlandai/longplay-sdk/visual
Runs in
Browser
Purpose
Anonymous visual experiments
@tinkerlandai/longplay-sdk/popup
Runs in
Browser
Purpose
Standalone screen rendering, sanitizing and previews
@tinkerlandai/longplay-sdk/native-shell
Runs in
WebView
Purpose
Funnel shell assets for native WebViews
@tinkerlandai/longplay-sdk/openrouter
Runs in
Trusted backend
Purpose
OpenRouter usage billing; also install @openrouter/sdk
The package ships type declarations and supports ESM bundlers and Node.js 22+. Use Vite, Next.js or webpack, or await Longplay.ready from the unified script entry; see Script installation in the JavaScript guide. Never import /server into browser code.
Plain HTML sites resolve and save an immutable Web module at installation. Loading alone does not create a session or start experiments. The complete example covers backend-issued Customer Tokens and logout cleanup.
terminalShell
1SDK_MODULE_URL="$(curl -fsS https://cdn.longplayai.com/sdk/module)" &&2printf'export * from "%s";\n'"$SDK_MODULE_URL" > longplay-sdk.js
Commit the generated longplay-sdk.js, which points to an immutable module URL. Resolve again explicitly to upgrade. The classic /sdk.js loader still follows Web releases.
Pages that show a Funnel or Paywall can open their connections early. Put these two lines in the page head. crossorigin is required: the SDK sends requests without credentials, so a preconnect without it opens a connection the SDK cannot use.
IAM is versioned independently of the business SDK. Configure generation and local checks first, authorize uploads separately, and explicitly bind the browser to that build's descriptor.
The Python SDK is distributed from longplayai.com, not PyPI. The distribution is tinkerlandai-longplay-sdk and the import is longplay. Other dependencies install from your configured package index as usual.
The module path is longplayai.com/sdk/go. Install it through Go's default module proxy and checksum database; no repository access is needed.
terminalShell
1SDK_VERSION="$(curl -fsS 'https://cdn.longplayai.com/sdk/longplay/stable?package=go')" &&2go get longplayai.com/sdk/go@v"$SDK_VERSION"
main.goGo
1import longplay "longplayai.com/sdk/go"
With GOPROXY=direct, Go discovers the same module download through https://longplayai.com/sdk/go?go-get=1. Check the version with go list -m longplayai.com/sdk/go.
Resolve stable only during initial installation or an explicit upgrade. Commit the resolved versions and lockfiles; later builds use those files without querying latest again.
To upgrade, rerun stable resolution, review the version change and commit updated dependencies and lockfiles. To roll back, restore previous files or select an explicit historical version.
Default installs resolve stable. For historical installation or rollback, choose an explicit version and restore its dependencies and lockfiles; the examples below use each package's current published version; package versions are independent. Versioned downloads and registry/Maven records remain immutable when stable advances.
On macOS and Linux, curl can also download the complete platform archive and verify SHA-256 without npm or sudo. This channel has its own version in the website download manifest:
Afterwards, longplay update upgrades in place from the original installation channel and keeps configuration and credentials. An npm release does not update website archives.
Install the independent npm package from latest. Requires React Native 0.79+, Metro 0.82+ and package exports support. --save-exact writes the resolved version to package.json; commit the lockfile and use npm ci afterward.
terminalShell
1npm install --save-exact @tinkerlandai/longplay-react-native@latest2npm ls @tinkerlandai/longplay-react-native --depth=0
Import createLongplayReactNative from @tinkerlandai/longplay-react-native. The package includes ESM, CommonJS and TypeScript declarations, and its data client uses Fetch and AbortController with no native linking; optional native integration is added through autolinking.
The independent package and the @tinkerlandai/longplay-sdk/react-native subpath share the same core implementation; choose one entry per app. Both cover Customer identity, holdings, entitlement checks, commerce commands, Offering/Paywall/content resolution, experiments and events. The independent package's optional native integration adds Funnel/Paywall/content presentation and Apple/Google purchase, restore and subscription-management bridges. Trusted usage writes still go through the backend.
Native packages are distributed through Longplay's Swift Package Registry and Maven repository without source repository access. Clients receive backend-issued Customer Tokens and never carry a Server Key; trusted usage writes go through the app's own backend.
Requires Swift 6, iOS 16+ or macOS 12+. Resolve the latest stable release in the consuming Swift package and write an exact dependency to Package.swift. No GitHub repository access is needed.
Use import Longplay in application code. This uses Swift Package Registry: declare the dependency in a Swift package, then add that package's product to the Xcode app target. Commit Package.swift, Package.resolved and registry configuration; use swift package resolve --force-resolved-versions in CI. Resolve stable again explicitly when upgrading.
Requires minSdk 23, Java 17 and android.useAndroidX=true in gradle.properties. Resolve stable once at the project root into longplay-sdk.version; builds read that exact version without querying the network.
Add the Longplay repository to dependencyResolutionManagement.repositories in settings.gradle.kts, alongside google() and mavenCentral():
Import ai.tinkerland.longplay.LongplayClient in application code. Gradle reads the POM and module metadata and downloads the AAR; other dependencies remain on Google or Maven Central. Commit longplay-sdk.version and app/gradle.lockfile; omit --write-locks from normal builds. Resolve stable and update locks explicitly when upgrading.
Create a Sandbox Server Key with customers:write in Console, put the variables below in a Git-ignored backend .env, and run one of the examples. Success returns a Customer UUID; running it again returns the same Customer with created false.
401: the Key is incomplete, expired or revoked. 403: the Key lacks customers:write, or the App UUID or environment does not match the Key. Server Key requests must not carry a browser Origin.
400 UNSUPPORTED_PROTOCOL_VERSION: add the X-Indiana-Protocol header to direct HTTP calls; the SDKs send it automatically.