
Open up a http server in Brotato!
Unlock New Possibilities in Brotato with the HTTP Server Mod
Ever imagined your favorite AI assistants interacting directly with the chaotic world of Brotato? Now you can! This innovative mod transforms Brotato by introducing a robust HTTP API, allowing external applications and AI models to communicate with and even control your game in real-time. It’s a groundbreaking way to experience Brotato, offering a unique sandbox for experimentation and automated gameplay.
Seamless Integration with AI
This mod is built from the ground up to be compatible with a wide range of generative AI tools. Whether you’re using Claude Code, GitHub Copilot, Cursor, or other AI coding assistants, you can now feed them live data directly from your Brotato session. This means your AI isn’t just suggesting code; it’s actively playing the game for you. Simply provide the API endpoint documentation to your AI, and watch it generate the bots that will navigate the dangers of each run.
Key Features at Your Fingertips
- Generative AI Native: Works out-of-the-box with popular AI coding and development tools.
- Live Game State Data: Access crucial information like player health, gold, enemy locations, and more, all delivered in a clean JSON format with minimal latency.
- Full Character Control: Direct your character’s movement and attacks via simple HTTP requests. Let an AI make the split-second decisions about your next move.
- Ready-to-Use Examples: Get started quickly with included Python bot examples that you can immediately extend and customize with your AI assistant.
Effortless Setup and Control
Getting started is incredibly straightforward. After subscribing to and enabling the mod, simply launch any Brotato run. The HTTP server will automatically become active and accessible at http://localhost:8082. You can then instruct your AI to write a bot, for example, by telling it to dodge enemies using data from the `/api/enemies` endpoint and directing movement via `/api/move`. It’s that simple to let an AI take the reins.
Essential API Endpoints
The mod provides a comprehensive set of endpoints designed for AI interaction:
/api/stats: Retrieves player vital statistics./api/enemies: Provides detailed information on all active enemies, including their positions and health./api/player_pos: Gives you the exact coordinates of your character./api/wave: Shows current wave progress./api/items: Lists your current inventory./api/move: Allows you to specify directional movement./api/aim: Lets you set the aiming target./api/release: Crucially, this endpoint returns control of the game back to you.
For safety and optimal performance, remember to always call the /api/release endpoint after automation to regain manual control, and ensure your API calls are spaced at least 50ms apart to maintain smooth gameplay. Explore the included documentation within the mod folder for full details on all available endpoints.

