API Documentation
Complete reference for the RakuAI API. All endpoints are versioned under /api/v1/.
Quick Start
Generate your first game in three steps:
1. Get an API Key
Accept the developer NDA and create an API key from the dashboard.
2. Make Your First API Call
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"prompt": "A platformer where you jump between clouds"}'
resp = httpx.post(
"https://api.rakuai.com/api/v1/generate",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"prompt": "A platformer where you jump between clouds"},
)
game = resp.json()
print(game["raku_config"]["game"]["title"])
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_KEY",
},
body: JSON.stringify({ prompt: "A platformer where you jump between clouds" }),
});
const game = await resp.json();
console.log(game.raku_config.game.title);
3. Use the .raku Config
The response includes a raku_config object — a complete game configuration that the Raku runtime can load and play.
Authentication
All API requests require a Bearer token in the Authorization header. You can use either a JWT access token (from login/register) or an API key (from the developer dashboard).
POST /api/v1/generate
Generate a game configuration from a natural language prompt.
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | required | Game description (1-500 chars) |
Response: Returns game_id, raku_config, genre, and generation metadata.
POST /api/v1/iterate
Refine an existing game configuration with a follow-up instruction.
| Parameter | Type | Required | Description |
|---|---|---|---|
game_id | string | required | ID of the game to refine |
message | string | required | Refinement instruction (1-1000 chars) |
current_config | object | required | Current .raku config to modify |
Games
List your saved games with pagination.
Get a specific game's full configuration.
Delete a saved game permanently.
GET /api/v1/usage
Get your generation and iteration counts, tier info, and remaining quota.
API Key Management
Create a new API key with specified scopes.
List all your API keys (active and revoked).
Revoke an API key. Cannot be undone.
Rate Limits
API requests are rate-limited per user tier:
| Tier | Generations/day | Iterations/day | Concurrent |
|---|---|---|---|
| Anonymous | 3 | 0 | 1 |
| Free | 10 | 30 | 1 |
| Pro | 100 | 500 | 3 |
| Enterprise | Unlimited | Unlimited | 10 |
Exceeded limits return 429 Too Many Requests with a Retry-After header.
Interactive API Explorer
Explore the full API interactively using the auto-generated documentation:
Swagger UI → Redoc →