Step 1: Set up an OpenRouter key
GrillMyCode uses OpenRouter to reach AI models. You need an OpenRouter account, some credit, and an API key: a password that lets GrillMyCode use your account.
You only do this once. Every assignment in your classroom shares the same key.
Create an account and add credit
- Go to openrouter.ai and sign up with Google, GitHub or an email address.
- Open the credits page and add a prepaid balance. $5 is plenty to start with.
You're charged only for what GrillMyCode uses. With a prepaid balance and automatic top-up turned off, spending can never go beyond what you've added.
Create the key
- Go to openrouter.ai/keys and create a new key. Give it a name you'll recognize later, such as
GrillMyCode – Fall 2026. - Copy the key straight away. OpenRouter shows it only once.
If you like, you can also give the key its own spending limit on the same page.
Save the key in your GitHub organization
GitHub keeps passwords for workflows as secrets. Once a secret is saved, nobody can view it again, but workflows can still use it. If you save it in your classroom's organization, every student repository gets it automatically.
- On GitHub, open your classroom's organization and go to Settings → Secrets and variables → Actions.
- Select New organization secret.
- For Name, enter
OPENROUTER_API_KEY. Spell it exactly like this, because the workflow looks for this name. - For Value, paste the key you copied.
- Under Repository access, choose All repositories, or Private repositories if all your student repositories are private.
- Select Add secret.
Next
Go deeper: OpenRouter · Tokens, secrets and permissions