Getting Your API Key
Your API key is what tells our servers "this Minecraft server is allowed to use CraftyAI." Every server gets its own key, and keys are free.
Method 1: Let the plugin do it (recommended)
When you start your server for the first time, the plugin generates a key and prints it to the console. You'll see a line that looks like this:
[CraftyAI] Your new API key: cai_NKAOAH6DZHSEK6ROVAIHUCMDZDQ2A2KZ3GRRURKQ6FOOTEPP
Copy it. Then:
- Plugin: Paste it into
plugins/CraftyAI/config.ymlunderserver.secret - Mod: Press
Kto open the settings screen, paste it in the API Key field, and click Save
The key shows in the console only once. If you lose it, run /crafty apikey in-game and a new one will be printed.
Method 2: Discord bot
If you'd rather get the key through Discord:
- Join our Discord
- Find the CraftyAI bot in
#craftyand click "Get API Key" - It will ask for your Session ID, which is printed in your server console when CraftyAI starts
- The bot DMs you the new key
What the key does
The key authenticates your server with our backend. CraftyAI rate-limits by key, so each server gets its own quota. Keys are tied to your session and can be rotated any time.
If you think your key leaked, run /crafty apikey in-game. It generates a fresh one and invalidates the old.
Where do I find my Session ID?
If you used Method 1 (auto-mint), you don't need it, your session was created with the same startup that printed the key.
If you used Method 2 or need it for Discord, start your server. The Session ID prints to the console on startup. It looks like srv-a1b2c3d4.