楽AI Now Available — Describe Any Game. Play It Instantly. | Try RakuAI Now →

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

cURL curl -X POST https://api.rakuai.com/api/v1/generate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{"prompt": "A platformer where you jump between clouds"}'
Python import httpx

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"])
JavaScript const resp = await fetch("https://api.rakuai.com/api/v1/generate", {
  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).

Authorization: Bearer <your_token_or_api_key>

POST /api/v1/generate

POST /api/v1/generate

Generate a game configuration from a natural language prompt.

ParameterTypeRequiredDescription
promptstringrequiredGame description (1-500 chars)

Response: Returns game_id, raku_config, genre, and generation metadata.

POST /api/v1/iterate

POST /api/v1/iterate

Refine an existing game configuration with a follow-up instruction.

ParameterTypeRequiredDescription
game_idstringrequiredID of the game to refine
messagestringrequiredRefinement instruction (1-1000 chars)
current_configobjectrequiredCurrent .raku config to modify

Games

GET /api/v1/games

List your saved games with pagination.

GET /api/v1/games/{id}

Get a specific game's full configuration.

DELETE /api/v1/games/{id}

Delete a saved game permanently.

GET /api/v1/usage

GET /api/v1/usage

Get your generation and iteration counts, tier info, and remaining quota.

API Key Management

POST /api/v1/developer/keys

Create a new API key with specified scopes.

GET /api/v1/developer/keys

List all your API keys (active and revoked).

DELETE /api/v1/developer/keys/{key_id}

Revoke an API key. Cannot be undone.

Rate Limits

API requests are rate-limited per user tier:

TierGenerations/dayIterations/dayConcurrent
Anonymous301
Free10301
Pro1005003
EnterpriseUnlimitedUnlimited10

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 →