Frequently Asked Questions

Everything you need to know about Multiplayer API.

What is Multiplayer API?

Multiplayer API is a cross-platform backend for multiplayer games. It provides player accounts, game rooms, matchmaking, leaderboards and realtime updates through a REST API and official SDKs for Unity, Java, .NET and C++.

Is Multiplayer API free to use?

There are three tiers: Free (US$0), Paid (US$100/month or US$960/year prepaid, saving 20%), and Enterprise (contact support@michitai.com). Paid covers one managed deployment in one region, not a physical-server lease. Free uses shared resources in one available region. Allocations and usage limits are confirmed before activation; extra deployments or regions are separately ordered or covered by an Enterprise agreement. See /terms.php. SDK integration is permitted under /SDK-LICENSE; service fees and limits remain separate.

What license is the project released under?

The backend remains proprietary under /LICENSE. Official SDKs use the Michitai Service SDK License at /SDK-LICENSE: you may integrate, modify and bundle them in applications using our service, including commercial games, without separate permission or SDK royalties. Standalone SDK resale, relicensing, competing-service use and harmful modifications are prohibited. Service fees and limits still apply. Third-party licenses and rights validly granted for earlier releases remain unchanged.

Which platforms and languages are supported?

Official SDKs exist for Unity (JsonUtility), Java (Jackson), .NET (System.Text.Json), Python (dataclasses + asyncio), C++ (nlohmann::json) and JavaScript/TypeScript (zero-dependency ESM for browsers and Node.js). Any other platform can integrate directly through the language-agnostic REST API.

What features does the API provide?

Player registration and authentication, sessions and heartbeats, game data storage, game rooms with realtime actions, matchmaking lobbies with join requests and passwords, leaderboards, server time sync, and player moderation (timed and permanent bans).

Do I need to host my own server?

No. You can use the hosted service at api.michitai.com with a free developer account. Self-hosting the proprietary software requires prior written permission from Nichita Levandovici, except as required by applicable law.

Can AI coding assistants and agents work with this API?

Yes — the API is fully machine-readable. There is an OpenAPI 3.0 spec at /openapi.json, a doc index at /llms.txt, the complete reference in one file at /llms-full.txt, and a read-only MCP (Model Context Protocol) endpoint at /mcp with tools to browse endpoints and search the docs. Point your assistant at any of them and it can generate correct integration code against the real endpoints.

How do I get started?

Create a free account, generate an API token from your cabinet, then follow the getting-started tutorial: register a player, create a room, read the response. Pick an SDK (Unity, Java, .NET, Python, C++ or JavaScript/TypeScript) or call the REST API directly — the docs include copy-paste examples for every endpoint.

Where is my data stored?

The primary hosting region is confirmed for your service access or managed deployment before activation. A deployment may combine managed web hosting and a realtime VPS. Payment, email, Steam authentication, support and backup processing are not necessarily confined to that region. Contact support@michitai.com for data-residency requirements and see /privacy.php for details.

Is there a JavaScript or Node.js SDK?

Yes — michitai-multiplayer is a zero-dependency ESM package covering the whole REST API plus the realtime channel. It runs in browsers (fetch + WebSocket, CORS is enabled on every endpoint) and Node.js 22+, where it also gets the UDP fast lane. TypeScript declarations ship in the package.

Does the API work in WebGL or plain browser games?

Yes. Every REST endpoint answers browser CORS preflights and the realtime service accepts WebSocket connections with a query-string token (browsers cannot set WS headers — this is a supported path). The one platform limit is that web pages cannot send UDP, so unreliable traffic falls back to the WebSocket lane automatically.

Do you support WebTransport?

Not yet. WebTransport became Baseline-available in browsers in March 2026, but it requires an HTTP/3 server endpoint the realtime relay does not run today. The current transports — WebSocket for reliable traffic plus a UDP datagram lane for unreliable traffic — cover the same reliable/unreliable split; WebTransport is tracked on the roadmap with explicit adoption criteria.

How do I report a bug or request a feature?

Contact support@michitai.com.

Troubleshooting Common Integration Errors

401 "API token is required" / "Invalid API token"

The header name must be exactly X-Api-Token — a typo, wrong casing in an HTTP client that doesn't normalize, or the token going in a query parameter all produce 401. Tokens in URLs are rejected by design. Also verify you're calling /api/… paths on api.michitai.com, not a docs page URL.

401/403 with a player token that worked before

Player tokens are per-game — a token from game A 403s on game B. Tokens also rotate: if you called rotate, the old credential is dead; use the private_key the rotate call returned. A 401 (not 403) means the token itself isn't recognized — wrong value or a stale stored credential.

429 rate limited

Honor Retry-After and back off exponentially; don't retry in a tight loop. Usual cause: heartbeat or polling loops faster than intended, or re-minting realtime tokens every frame (limit: 10/min/player — mint once per session).

Realtime socket closes or won't authenticate

Close codes: 1008 = token missing/invalid/invalidated (mint a fresh one — tokens are single-connection and short-lived), 1011 = server error (retry with a new token). Sockets also close after ~60s idle — the SDKs heartbeat every 20s; if you rolled your own client, send {"type":"heartbeat"}. A second connection with the same player drops the first.

"Only the room host can send messages to other players"

The realtime ACL is intentional: non-host clients may only send with target: "host". Broadcasting, game state and moderation flow through the host client. If your host migrated, wait a beat — room membership/host flag is re-checked against the DB with a short cache.

Timeouts or non-JSON responses

A TransportError (JS SDK) or transport exception elsewhere means no valid API response arrived — check the URL base (https://api.michitai.com/api), corporate proxies blocking custom headers, and whether an HTML error page came back (a captive portal or wrong host returns HTML, not JSON). GETs retry once automatically; POSTs never retry — check current state before re-issuing a write.

Still have questions?

Reach out and we'll get back to you.

About • Terms of Service • Privacy Policy