> For the complete documentation index, see [llms.txt](https://series-1.gitbook.io/rundot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://series-1.gitbook.io/rundot-docs/readme.md).

# RUN.world SDK

The RUN.world SDK gives your HTML5 game access to monetization, multiplayer, storage, AI, and more, all through a single import.

## Quick Start

```typescript
import RundotGameAPI from '@series-inc/rundot-game-sdk/api'
```

Every API is accessed through `RundotGameAPI`. For example:

```typescript
// Save player progress
await RundotGameAPI.appStorage.setItem('level', '5')

// Show a rewarded ad
const result = await RundotGameAPI.ads.showRewardedAdAsync()

// Get server time
const time = await RundotGameAPI.requestTimeAsync()
```

## API Reference

### Monetization

| API                                                        | What it does                                                   |
| ---------------------------------------------------------- | -------------------------------------------------------------- |
| [Ad Monetization](/rundot-docs/readme/ads.md)              | Serve rewarded video and interstitial ads to earn revenue.     |
| [Purchases](/rundot-docs/readme/purchases.md)              | Let players spend RUN Bits on digital goods.                   |
| [Shop](/rundot-docs/readme/shop.md)                        | List shop items and run the purchase flow for digital goods.   |
| [Entitlements](/rundot-docs/readme/entitlements.md)        | Track and consume what players own (items, passes, power-ups). |
| [Collectibles (BETA)](/rundot-docs/readme/collectibles.md) | Manage digital collectibles and inventory items.               |
| [Credits (BETA)](/rundot-docs/readme/credits.md)           | Grant and track player creator credits and balances.           |
| [Choices](/rundot-docs/readme/choices.md)                  | Read and spend player Choices diamond balances.                |

### Messaging & Social

| API                                                         | What it does                                                 |
| ----------------------------------------------------------- | ------------------------------------------------------------ |
| [Notifications](/rundot-docs/readme/notifications.md)       | Schedule local notifications for re-engagement.              |
| [In-App Messaging](/rundot-docs/readme/in_app_messaging.md) | Display toast notifications and in-app messages.             |
| [Popups](/rundot-docs/readme/popups.md)                     | Host toasts, platform like prompts, and comments sheet.      |
| [Clips (BETA)](/rundot-docs/readme/clips.md)                | Record, save, and share video gameplay clips.                |
| [Sharing](/rundot-docs/readme/sharing.md)                   | Share links, generate QR codes, and handle share parameters. |
| [Activity (BETA)](/rundot-docs/readme/activity.md)          | Post activity feeds and social status updates.               |

### Assets & Media

| API                                                   | What it does                                                                 |
| ----------------------------------------------------- | ---------------------------------------------------------------------------- |
| [Assets](/rundot-docs/readme/assets.md)               | Load game assets from the CDN with caching, preloading, and WebView support. |
| [CDN](/rundot-docs/readme/cdn.md)                     | Direct CDN asset fetching and signed URL resolution.                         |
| [Shared Assets](/rundot-docs/readme/shared_assets.md) | Download host-provisioned asset bundles shared across titles.                |
| [Asset Library](/rundot-docs/readme/asset_library.md) | Query and browse shared platform asset catalogs.                             |
| [Files (BETA)](/rundot-docs/readme/files.md)          | Upload and manage game-specific file attachments.                            |
| [Video (BETA)](/rundot-docs/readme/video.md)          | Hand off video playback to native Picture-in-Picture (iOS only).             |
| [UGC (BETA)](/rundot-docs/readme/ugc.md)              | User-generated content creation and moderation.                              |

### Game Systems & Multiplayer

| API                                                                             | What it does                                                               |
| ------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| [Multiplayer (BETA)](/rundot-docs/readme/multiplayer.md)                        | Build synchronous multiplayer sessions with real-time updates.             |
| [Advanced Multiplayer (BETA)](/rundot-docs/readme/advanced-multiplayer.md)      | Shared persistent worlds, turn loops, and matchmaking.                     |
| [Syncplay](/rundot-docs/readme/syncplay.md)                                     | Deterministic rollback netcode, physics, and gameplay modules.             |
| [PvP System (BETA)](/rundot-docs/readme/pvp_system.md)                          | Competitive matchmaking, ratings, and PvP room orchestration.              |
| [Simulation API (BETA)](/rundot-docs/readme/server_authoritative.md)            | Drive authoritative game state through the simulation system.              |
| [Simulation: Config Reference (BETA)](/rundot-docs/readme/simulation_config.md) | Define entities, recipes, loot tables, and lifecycle hooks in JSON config. |
| [Simulation: Energy System (BETA)](/rundot-docs/readme/energy_system.md)        | Implement regenerating energy/stamina with offline catch-up.               |
| [Simulation: Gacha System (BETA)](/rundot-docs/readme/gacha_system.md)          | Add loot boxes with weighted pools, pity counters, and guarantees.         |
| [Simulation: Building Timers (BETA)](/rundot-docs/readme/building_timers.md)    | Timed upgrades, build queues, and passive resource generation.             |
| [Stats (BETA)](/rundot-docs/readme/stats.md)                                    | Record and aggregate gameplay metrics and statistics.                      |
| [Leaderboards](/rundot-docs/readme/leaderboard.md)                              | Competitive leaderboards with multiple security levels.                    |
| [Big Numbers](/rundot-docs/readme/bignumbers.md)                                | Handle exponential economies without losing precision.                     |
| [Experiments (LiveOps)](/rundot-docs/readme/liveops.md#experiments-ab-testing)  | Run A/B tests with deterministic per-player variants.                      |

### Device, Platform & Input

| API                                                               | What it does                                                                      |
| ----------------------------------------------------------------- | --------------------------------------------------------------------------------- |
| [Runtime Environment](/rundot-docs/readme/runtime-environment.md) | Storage scopes, the network allowlist, and device features the platform provides. |
| [Environment](/rundot-docs/readme/environment.md)                 | Detect device type, platform, screen size, and dev mode.                          |
| [Safe Area](/rundot-docs/readme/safe_area.md)                     | Read safe-area insets to avoid overlapping host UI and notches.                   |
| [System](/rundot-docs/readme/system.md)                           | Device specs, Steam detection, pointer lock, and fullscreen.                      |
| [Gamepad](/rundot-docs/readme/gamepad.md)                         | Standardized controller input, mapping, and vibration.                            |
| [Navigation (BETA)](/rundot-docs/readme/navigation.md)            | In-app deep navigation and game switching.                                        |
| [Access Gate](/rundot-docs/readme/access_gate.md)                 | Validate user access gates and pass entitlements.                                 |
| [App (BETA)](/rundot-docs/readme/app.md)                          | Native app lifecycle and host window controls.                                    |

### AI & Generation

| API                                                                                 | What it does                                                                                                |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| [AI](/rundot-docs/readme/ai.md)                                                     | Generate text and images using hosted AI models.                                                            |
| [Runtime image generation](/rundot-docs/readme/image_gen.md)                        | Generate and transform images from a running game.                                                          |
| [Audio Generation (BETA)](/rundot-docs/readme/audio_gen.md)                         | Generate runtime sound effects and musical loops.                                                           |
| [Video Generation (BETA)](/rundot-docs/readme/video_gen.md)                         | Generate AI video clips and animations.                                                                     |
| [3D Generation (BETA)](/rundot-docs/readme/three_d_gen.md)                          | Generate 3D procedural meshes and assets.                                                                   |
| [Design-time image generation](/rundot-docs/readme/design-time-image-generation.md) | Use `rundot` to make local images, references, edits, and transforms while developing.                      |
| [Agent Runtime (BETA)](/rundot-docs/readme/agent-runtime.md)                        | Build durable chat agents and game characters with tools, approvals, recovery, and multiple-tab protection. |

### Utility & Platform

| API                                                             | What it does                                                      |
| --------------------------------------------------------------- | ----------------------------------------------------------------- |
| [Analytics](/rundot-docs/readme/analytics.md)                   | Record gameplay telemetry, funnel steps, and user properties.     |
| [Attribution](/rundot-docs/readme/attribution.md)               | Read the web campaign and UTM parameters the player arrived with. |
| [Context](/rundot-docs/readme/context.md)                       | Access launch parameters and share parameters.                    |
| [Embedded Libraries](/rundot-docs/readme/embedded_libraries.md) | Load and manage embedded libraries shipped by the host.           |
| [Haptics](/rundot-docs/readme/haptics.md)                       | Trigger haptic feedback on supported devices.                     |
| [Lifecycles](/rundot-docs/readme/lifecycles.md)                 | React to host lifecycle changes (pause/resume/teardown).          |
| [Logging](/rundot-docs/readme/logging.md)                       | Stream structured logs for debugging and support.                 |
| [Playable (BETA)](/rundot-docs/readme/playable.md)              | Lightweight UA playable ad hooks and conversion CTAs.             |
| [Preloader](/rundot-docs/readme/preloader.md)                   | Control the native loading screen during heavy loads.             |
| [Profile](/rundot-docs/readme/profile.md)                       | Access the current user profile.                                  |
| [Rate Limits](/rundot-docs/readme/rate_limits.md)               | Platform rate limits and throughput guidelines.                   |
| [Release Notes](/rundot-docs/readme/release_notes.md)           | Query version changelogs and platform release notes.              |
| [Storage](/rundot-docs/readme/storage.md)                       | Persist player data at device, app, or global scope.              |
| [Time](/rundot-docs/readme/time.md)                             | Server time synchronization and formatting.                       |

***

New to RUN.world? See [Getting Started](/rundot-docs/readme/getting-started.md) | [Testing Locally With Playground](/rundot-docs/readme/playground.md) | [Deploying Your Game](/rundot-docs/readme/deploying-your-game.md) | [rundot CLI Reference](/rundot-docs/readme/cli-reference.md) | [Design-time image generation](/rundot-docs/readme/design-time-image-generation.md) | [Marketing Your Game (BETA)](/rundot-docs/readme/marketing-your-game.md) | [Runtime Environment](/rundot-docs/readme/runtime-environment.md) | [Setting Your Game Thumbnail](/rundot-docs/readme/setting-your-game-thumbnail.md) | [Troubleshooting](/rundot-docs/readme/troubleshooting.md)
