Apeiron game server

Last updated: 2026-10-29Link your game and its server to the player's Syndicate account through Apeiron — session tickets, game keys, and granting items that live in the player's inventory.

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.

text
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

  1. 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.
  2. Your server sends the ticket to us with its game key and gets back the real account. A modified client cannot fake it.
  3. 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.

csharp
var apeiron = await ApeironClient.ConnectAsync("pb_your_game");
string ticket = await apeiron.GetAuthTicketAsync();
await myServer.SendAsync("login", ticket);
typescript
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

MethodEndpointBody
POST/auth/verify{ ticket }Ticket → account
POST/inventory/grant{ userId, defKey, grantRef? }Give an item
GET/inventory/:userIdItems the player owns in your game
POST/inventory/consume{ userId, instanceId }Use up an item

Verify a ticket

bash
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.…"}'
json
{ "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

json
{ "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

StatuscodeMeans
401apeiron.serverkey.invalidMissing key, wrong key, or a key of another game
401apeiron.ticket.invalidTicket expired, forged, or issued for another game
400apeiron.inventory.invalidMalformed body or userId
409apeiron.inventory.unknownNo item with this defKey (or not approved yet, and the player is not you)
409apeiron.inventory.limitThe player already has the per-player maximum
409apeiron.inventory.addonThe item belongs to a DLC the player does not own
404apeiron.inventory.missingNothing to consume
Apeiron game server | AS Docs