Cortex · AI for your Roblox game · guides · compare
You can run AI in a Roblox game for free — chain a handful of free API keys (Groq, Gemini, NVIDIA, Cerebras, Cloudflare) behind a router and call them from HttpService. For a prototype that's genuinely the right move. The question is what happens at ~100 concurrent players, because that's where the free path quietly gets expensive in ways that aren't a dollar figure.
Most free tiers cap around 15–30 requests per minute. A hundred players sending even one or two AI calls a minute is hundreds of RPM at peak — well past any single free key. When you blow the cap the provider returns 429, and in your game that's an NPC that just… doesn't answer. So you chain 5–8 keys and a router that fails over on 429. Now you're maintaining infrastructure.
| Free multi-key router | Cortex | |
|---|---|---|
| Rate limits | Juggle 5–8 keys to dodge 429 | Pooled — no single-provider RPM wall |
| Key upkeep | Keys change limits / die without notice | One key, you manage nothing |
| Caching | You build it yourself | Repeated replies cached free |
| Plumbing | HttpService glue per provider + router + fallback | One function, one request |
| Privacy | Free tiers often train on your data | Server-side, key never on client |
| Models | Mostly small open models on free tiers | Frontier-class, flat rate |
| Payment | Free, but needs a paid fallback for peaks | Robux, no card |
DIY free keys — great for a prototype, a hobby game, or if you genuinely enjoy running the plumbing and your traffic is low. Cortex — when you're shipping to real players and you'd rather spend that time on your game than on a rate-limit router. It bills output tokens only (the prompt, memory and history you resend every call are free), caches repeats for free, and runs at 25 units per Robux (a unit = 1,000 output tokens) across every model — so the repetitive NPC lines that dominate a live game cost close to nothing, and you never touch a key rotation.
local Cortex = require(game.ServerStorage.Cortex)
local ai = Cortex.new("YOUR_KEY")
print(ai:ask(
"You are a gruff dwarven blacksmith. One short in-character line.",
"Can you forge me a sword?"
))
No router, no keys to rotate, no HttpService glue per provider. Pay in Robux when you're ready.
Guides: compare · ai npc · ai chatbot · chat moderation · ai quests · ai companion · ai shopkeeper · dynamic dialogue · ai dungeon master · ai lore generator · smart enemies · ai tutorial npc · ai story generator · faq