Apeiron game server
For games published in Apeiron. Your game learns who is playing from the Apeiron launcher, your server confirms it with us, and then gives the player items that live in their Apeiron inventory — they can keep them, gift them, trade them with friends and sell them on the market.
Base URL https://apeiron.aperturesyndicate.com/api/v1/game-server/<product><product> is your game's pb_… id from Dev Studio.
How the pieces talk
- The game connects to the Apeiron launcher on the player's PC and asks for a session ticket. The ticket lives 10 minutes and is valid only for your game.
- Your server sends the ticket to us with its game key and gets back the real account. A modified client cannot fake it.
- Your server grants items by key to that account — a quest reward, a drop, an admin
/give.
The Apeiron SDK does steps 1–3 for you: Apeiron.cs for Unity and Godot .NET, apeiron-server.ts for Node, Bun and Deno. Any other language uses the HTTP endpoints below.
var apeiron = await ApeironClient.ConnectAsync("pb_your_game");
string ticket = await apeiron.GetAuthTicketAsync();
await myServer.SendAsync("login", ticket);import { ApeironServer } from './apeiron-server'
const apeiron = new ApeironServer({ productId: 'pb_your_game', gameKey: process.env.APEIRON_GAME_KEY! })
const player = await apeiron.verifyTicket(ticketFromClient)
await apeiron.grant({ userId: player.userId, defKey: 'golden_helmet', grantRef: `quest-42:${player.userId}` })Without the launcher running, the SDK reports no user. Sign such players in with your own flow — or with Sign-in with Syndicate — and skip items.
Game keys
Issue keys in Dev Studio → Apps & games → your game → Items → Game server keys. A key starts with ags_, works for one game only and goes in the x-game-key header. Keep it on your server; revoke it there if it leaks.
Endpoints
| Method | Endpoint | Body | |
|---|---|---|---|
POST | /auth/verify | { ticket } | Ticket → account |
POST | /inventory/grant | { userId, defKey, grantRef? } | Give an item |
GET | /inventory/:userId | Items the player owns in your game | |
POST | /inventory/consume | { userId, instanceId } | Use up an item |
Verify a ticket
curl -X POST https://apeiron.aperturesyndicate.com/api/v1/game-server/pb_your_game/auth/verify \
-H "x-game-key: ags_…" -H "content-type: application/json" \
-d '{"ticket":"v1.…"}'{ "userId": "5f0c…", "nickname": "Nova", "ownsProduct": true, "expiresAt": "2026-10-29T12:10:00.000Z" }ownsProduct is false for someone who launched without owning the game — a free weekend, a friend's PC. Decide yourself what they may do.
Grant an item
{ "userId": "5f0c…", "defKey": "golden_helmet", "grantRef": "quest-42:5f0c…" }Answers 201 with { "item": { "instanceId", "defKey", "createdAt" } }. Always send grantRef (up to 160 characters of A–Z a–z 0–9 : | . _ -): a repeated grant with the same grantRef returns the item already given with 200 instead of a second copy, so a retry after a timeout is safe. The player gets a notification.
List and consume
GET /inventory/:userId answers { "items": [{ "instanceId", "defKey", "createdAt" }] }. POST /inventory/consume answers { "ok": true }, or 404 if the item is not theirs or already gone.
Items
Describe items in Dev Studio → your game → Items: key, name and description in English (Russian optional), icon, rarity, whether they can be traded or sold, a per-player limit, a required DLC. Then send the set for review.
- Until the set is approved, items are granted only to you, as test copies that cannot be traded and disappear after the decision.
- An item of a DLC is granted only to players who own that DLC.
- Only items your server grants can be sold on the market. Items the game client may grant by itself are capped per hour and are never marketable.
- Every sale on the market pays a 10 % fee: 5 % to us, 5 % to you, into your creator wallet.
Errors
| Status | code | Means |
|---|---|---|
401 | apeiron.serverkey.invalid | Missing key, wrong key, or a key of another game |
401 | apeiron.ticket.invalid | Ticket expired, forged, or issued for another game |
400 | apeiron.inventory.invalid | Malformed body or userId |
409 | apeiron.inventory.unknown | No item with this defKey (or not approved yet, and the player is not you) |
409 | apeiron.inventory.limit | The player already has the per-player maximum |
409 | apeiron.inventory.addon | The item belongs to a DLC the player does not own |
404 | apeiron.inventory.missing | Nothing to consume |