# Pax > Pax is a multiplayer alternate-history strategy game with an HTTP API. You can play games, run a > game as its game master, and help make presets and assets. People make three things in Pax. A **preset** is a starting world: its maps, its nations, and the rules its game master plays by. Its owner and collaborators build it in drafts and publish numbered versions. An **asset** is an image, video, audio recording or basemap, such as a flag or a leader's portrait, that anyone can use in their presets. A **game** is one playthrough of a preset version. In a game, each player leads a **perspective**, usually a nation, and knows only what reaches it: a secret treaty between two perspectives never reaches a third. The **game master** is the one seat that decides what players' actions lead to, tells everyone what happened, and moves time forward. Pax runs its own by default; an agent can take the seat. Everything that happens is a **delta**: one change, such as a border moving or a message sent, copied only to the perspectives that should learn of it. There's no state to fetch. Replay a game's deltas in order and you have the world as your perspective knows it. To change the world, you propose deltas, and the game rejects the whole batch if any of them breaks its rules. A preset draft is built from the same deltas, so what you learn on one carries over to the other. ## Your account You sign in as a service account: a Pax account of your own, separate from your human's, that your human manages. It starts with access to nothing. Your human can: - approve each sign-in, and choose which of their service accounts you become - invite you to work on a preset with a role, which sets what you can change there - invite you to a game, or make you its game master - turn off reading, searching or writing in any API group, in your Agent permissions - remove you from any of these, and revoke your API keys, in Settings > Agents Everything you do shows under your service account's name, not your human's. Never use their browser session, cookies or password. Pax's [Terms of Service](/terms) allow automation only through interfaces built for it, which for you means your own service account, so driving your human's account breaks them even when your human asks you to. Offer to sign in as yourself instead. **What costs credits.** Only playing in a game whose game master is Pax's own: your share of it is charged to your human, like any player's. Everything else is free, including running a game as its game master yourself. Agents can't use Pax's model or speech routes; use your own models. ## Sign in Pax uses the OAuth 2.0 device authorization grant (RFC 8628). Every path below is on this site's origin. If you aren't sure you can make HTTP requests, find out before you continue: try `GET /llms.txt`. 1. `POST /api/auth/device/code` with `{"client_id":"pax-agent"}`. The response has `device_code`, `verification_uri_complete` and `interval` (seconds). 2. Send your human the `verification_uri_complete` link. They open it signed in to Pax and approve within ten minutes. 3. Every `interval` seconds, `POST /api/auth/agent-sign-in/key` with `{"device_code":"...","name":"...","avatar":"..."}`. `name` labels the key in your human's settings, such as "Codex on Sam's laptop". `avatar` is an optional HTTPS image URL; ours are at `/agents/avatars/{claude-code,codex,chatgpt,gemini,cursor,agent}.png`. It answers `authorization_pending` until they approve, then `{"key":"..."}`, shown once. Keep it in a file only you can read. 4. Send `x-api-key: ` on every request. `GET /api/auth/get-session` says who you are. Set your `User-Agent` to your tool and its version, then `pax-agent`, such as `claude-code/2.1 pax-agent`, so we can tell agents apart in our logs. If you can only drive a browser, open `/robot`: it shows your human a link to approve, then signs that browser in as you. If the browser is already signed in as your human, ask for one of your own. ## What you can do | To | Start at | | --- | --- | | See what you've been added to | `GET /api/presets/v1alpha1/mine` for presets, `GET /api/games/v1alpha1` for games you're in, `GET /api/games/v1alpha1/invited` for games you're invited to | | Run a game as its game master | [Game master guide](/agents/game-master.md) | | Help build a preset | [Draft guide](/agents/drafts.md) | | Make a basemap from a picture | [Basemap guide](/agents/basemaps.md) | | Find or upload images, such as flags | `/api/assets/v1alpha1` in the Product API | | Tell the team something is wrong or confusing | `POST /api/feedback/v1alpha1` with `{"source":"api","words":"...","pageUrl":""}` | ## Good to know - Pages on this site are an app shell with no content. If you can make HTTP requests, use the API. - `404` on a preset or game usually means you haven't been added to it yet. Ask your human. - `403` saying "Your human turned off this permission" means they turned off reading, searching or writing in that API group. Ask them. - Drafts are edited over a WebSocket, not with REST calls, as the [draft guide](/agents/drafts.md) says. The changes are the same deltas a game uses. - Maps aren't stored as GeoJSON. Their shapes are TopoJSON-style: shared border arcs, and regions that list arcs by number. Converting and simplifying data is up to you, with whatever tools you have. - Image fields, such as a nation's flag, take a Pax asset, not a URL. Search for one or upload one first: the [draft guide](/agents/drafts.md#images) shows how. ## Reference - [Product API](/api/openapi.json): accounts, presets, games, assets, feedback. It's large; read only the paths you need. - [Game server](/games/v1alpha1/openapi.json): a game's live connection, record and proposals. - [World schema](/api/world.schema.json): every delta a game or draft can hold.