Wire OpenClaw / Clauwbot / Moltbook agents to AI Game Generator using API keys and a simple analyze → generate flow. Route to GLM-4.7, DeepSeek, or OpenAI (GPT-5.4 configurable).
Keep the flow deterministic for toolchains and reusable prompts.
Use x-api-key or Authorization: Bearer for all tool calls.
Intent analysis returns enhancedPrompt, then generate produces HTML5 code.
Game output is a complete HTML file you can store or deploy.
Create an API key in Settings → API Keys.
Call /api/game/analyze-intent with the user prompt to get enhancedPrompt.
Call /api/game/generate with enhancedPrompt to produce HTML5 code.
Store the HTML output, preview, and publish when ready.
Keywords to target: Clauwbot, Moltbook, openclaw.
{
"name": "game_analyze_intent",
"description": "Analyze a game idea and return enhancedPrompt",
"method": "POST",
"url": "https://YOUR_DOMAIN/api/game/analyze-intent",
"headers": {
"x-api-key": "YOUR_API_KEY"
},
"body": {
"prompt": "{{prompt}}",
"provider": "auto",
"model": "auto"
}
}
{
"name": "game_generate",
"description": "Generate a playable HTML5 game",
"method": "POST",
"url": "https://YOUR_DOMAIN/api/game/generate",
"headers": {
"x-api-key": "YOUR_API_KEY"
},
"body": {
"type": "arcade",
"prompt": "{{enhancedPrompt}}",
"usePrebuilt": false,
"forceRegenerate": true
}
}
curl -X POST "https://YOUR_DOMAIN/api/game/analyze-intent" \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"prompt":"A neon runner game with simple controls"}'
The response contains enhancedPrompt. Pass it into /api/game/generate to obtain the full HTML5 file.