Overview
Telegram Mini Apps run on the ZeroGPU browser SDK: one script tag in your Mini App’s HTML turns the devices opening it into inference nodes on the ZeroGPU network. The SDK detects the Telegram WebApp environment automatically and adapts to it.Requirements
- A Telegram Mini App (a web app opened inside Telegram).
- An SDK key (
zgpu-sdk-…) from the Edge Operator Portal. When you add your app, select Telegram Mini App as an app type and use yourt.melink as the website. - The same browser requirements as the Chrome / Web SDK: WebAssembly, IndexedDB, and Web Workers, all available in Telegram’s in-app browser.
Installation
Add the loader to your Mini App’s HTML. It always resolves the latest released SDK:Initialization
The simplest setup is auto-init: put your SDK key on the script tag and the SDK starts when the page loads.ZeroGpuSdk.initZeroGpuSdk({ edgeOperatorKey }) exactly as in the Chrome / Web SDK. All the same options apply.
Authentication
The SDK authenticates with your SDK key (zgpu-sdk-…), passed as edgeOperatorKey. The key only joins devices to your fleet; it can’t call the inference API or spend credits.
Register device
Registration is automatic. Inside Telegram, the SDK:- Detects
window.Telegram.WebAppand registers the device with thetelegram-webappplatform. - Uses the Telegram user ID as
appUserId, so you don’t need to pass it. - Downloads and caches its assigned model, then opens a connection for tasks.
Start contributing compute
The device contributes compute while your Mini App is open. There’s nothing else to call.Stop / pause
Keep the handle returned byinitZeroGpuSdk and call shutdown() to stop:
Device lifecycle
The lifecycle matches the Chrome / Web SDK:starting, running, degraded, shutdown, or error, with degraded, recovered, and shutdown events.
Telegram’s in-app WebViews behave differently from regular browsers, so the SDK adapts its memory and storage checks there, and includes a guard that stops it from restarting repeatedly if the WebView keeps crashing and reloading.
Example integration
index.html
enableConsoleLogs off for release.
Troubleshooting
See Chrome / Web troubleshooting for worker and CSP issues.

