Api reference
Control API
Endpoints used by game backends for project, key, and token flows.
Control API
Base URL (local): http://localhost:3000
Use the control API from your backend services, not directly from game clients.
Projects
POST /projectsGET /projects
Keys
POST /projects/:id/keysGET /projects/:id/keysPOST /projects/:id/keys/:keyId/revokePOST /projects/:id/keys/:keyId/rotate
Tokens
POST /tokens
Use from your backend to issue short-lived client tokens.
Ops endpoints
GET /metricsGET /internal/key-status(data-plane internal checks)
Token payload fields
Nexis client tokens include:
project_idissued_atexpires_at- optional
key_id - optional
aud
Keep token TTL short for gameplay sessions.
Example: mint token
curl -X POST http://localhost:3000/tokens \
-H "content-type: application/json" \
-d '{"project_id":"<project-id>","key_id":"<key-id>","ttl_seconds":900}'Typed Control API Call
async function (: string, : ): <> {
const = await (`${}/tokens`, {
: 'POST',
: { 'content-type': 'application/json' },
: .(),
});
return (await .()) as ;
}