We're building a native Python SDK for Multiplayer API.
Until it's ready, everything works today through the universal
REST API with JSON — perfect for
requests,
httpx and
aiohttp.
The Python SDK will wrap the full REST API with idiomatic Python — type hints, dataclasses and async support.
A proper package with type hints, dataclass responses and full coverage of players, rooms, matchmaking and leaderboards.
Native asyncio + websockets client for the realtime relay at wss://realtime.michitai.com.
Works with Pygame, Godot-Python, Panda3D and any backend or tool that can make HTTP requests.
Every SDK feature is a plain JSON endpoint. No SDK required.
import requests
API = "https://api.michitai.com/api"
API_TOKEN = "YOUR_API_TOKEN"
response = requests.post(
f"{API}/game_players.php/register",
params={"api_token": API_TOKEN},
json={
"player_name": "PlayerOne",
"player_data": {"level": 1, "class": "mage"},
},
)
data = response.json()
player_token = data["private_key"]
print(data)
# Create a room
room = requests.post(
f"{API}/game_room.php/create",
params={"api_token": API_TOKEN, "player_token": player_token},
json={"room_name": "Lobby 1", "max_players": 4},
).json()
# Send a heartbeat to stay connected
requests.post(
f"{API}/game_room.php/heartbeat",
params={"api_token": API_TOKEN, "player_token": player_token},
)
leaderboard = requests.post(
f"{API}/leaderboard.php",
params={"api_token": API_TOKEN},
json={
"sort_by": ["level", "score"],
"limit": 10,
},
).json()
for entry in leaderboard["leaderboard"]:
print(f"#{entry['rank']} - {entry['player_name']}")
Create a free developer account, grab an API token and start making JSON calls from Python today. Check the full REST API reference for every endpoint, request body and response schema.