Cloud saves
For games that do not want a server of their own: JSON values under short keys, kept per player and game, on every device the player uses.
From the game
await playium.save.set('progress', { room: 3, items: ['key'] });
const saved = await playium.save.get('progress'); // null when there is none
const progress = saved?.value; // saved.version is for ifVersion
const all = await playium.save.list(); // keys, versions and sizes
await playium.save.delete('progress');Conflicts
The last write wins by default. To notice that another tab or device wrote in between, pass the version you read: save.set(key, value, { ifVersion }). A mismatch fails with save_version_conflict; ifVersion: 0 means the key must not exist yet.
Limits
| Limit | Default |
|---|---|
| Keys per player and game | 64 |
| Size of one value | 64 KB |
| Total per player and game | 1 MB |
| Key | A-Z a-z 0-9 _ . -, 1 to 64 characters |
Errors: save_not_found, save_version_conflict, save_too_large, save_key_limit.
From your server
The same endpoints take the play token, so your server can read and write a player's saves with the token the game sends it:
GET https://platformbackend-production-e04dbbd2.up.railway.app/v1/saves Authorization: Bearer <play token>
GET https://platformbackend-production-e04dbbd2.up.railway.app/v1/saves/:key
PUT https://platformbackend-production-e04dbbd2.up.railway.app/v1/saves/:key { "value": ..., "if_version": 3 }
DELETE https://platformbackend-production-e04dbbd2.up.railway.app/v1/saves/:key?if_version=3Saves made in the preview or with a dev key are kept apart from players' saves, so testing never touches them. Saves are deleted with the player's account.