Yearly Pay yearly and get 2 months free on every paid plan. See plans
Sign in Start free

Developer keys

Last updated 11 Nov 2026

Who can create a key

A developer key belongs to your ToRun account. To create one, your account needs:

  • a confirmed e-mail address,
  • a paid plan or a purchased balance, because the free allowance never pays for API calls.

Create a key

  1. Open the Developers page of your ToRun account.
  2. Press Create key and fill in the form:
    • Name: something that tells you where the key is used, such as "opencode on my laptop".
    • Monthly spending limit (Runs): the most this key may spend in a month.
    • Ask before a single generation above (Runs): a generation that would cost more than this asks you first.
    • When my plan allowance is used up, let this key spend from my wallet: leave it off if the key should use only your plan's allowance.
  3. Pass the security check and create the key.
  4. Copy the key. It is shown only once.

Keep the key out of your files

Save the key in an environment variable named TORUN_API_KEY, and point your tool's configuration at the variable instead of pasting the key into it.

macOS and Linux, in your shell's profile (for example ~/.zshrc or ~/.bashrc):

export TORUN_API_KEY="trn_live_..."

Windows, in PowerShell (then open a new terminal):

setx TORUN_API_KEY "trn_live_..."

Never commit a key to a repository or put it in a configuration file you share.

Watch and revoke

The Developers page lists your keys with how much each has spent this month against its limit, when it was last used and whether it is live. Last used is updated every few minutes, so a key you do not recognise in use shows up there.

Revoke stops a key at once: a tool that uses it is refused on its next call. If a key may have leaked, revoke it and create a new one.

There is a limit on how many live keys an account can hold and how many keys it can create in a day.

Next

Stuck? The forum usually answers within hours; support within 24 hours. Ask the forum Contact support