Skip to main content
An API key (token) is the credential for every API call. We recommend creating a separate one per app / environment for fine-grained control.

Create a token

  1. After signing in at openp.ai, go to Console → Tokens.
  2. Click Add new token in the top-right corner.
  3. Fill in the token configuration:
  1. Click Submit. The system generates a key like:
The key is shown in full only once, at creation. Copy it immediately into a password manager or environment variable — after you close the page you can’t view it in full again (only the first/last fragments).

Store the key safely

Recommended practices:
  • Local development: write it to a .env file and add that to .gitignore.
  • Production: use a secrets manager like Vault, AWS Secrets Manager or Doppler.
  • CI/CD: inject it as a GitHub Actions / GitLab secret.
  • Never commit it to a Git repo or paste it into chats / issues.
.env

Manage existing tokens

In the token list you can, for each token:
  • Copy: copy the full key again (only available briefly after creation).
  • Edit: change the name, quota, expiry and model scope.
  • Disable / enable: temporarily suspend it without deleting.
  • Delete: permanently void it — requests using the key immediately return 401.
If you suspect a key has leaked, click Disable or Delete immediately, then create a new key to replace it. Unauthorized spend that already occurred can be reviewed via a support ticket.

Verify the key works

If it returns a JSON model list, the key works. If it returns 401, check that the key was copied in full, isn’t disabled, and hasn’t expired.

Next steps

Top up

Add credit to call all paid models.

Send your first request

Make a Chat Completion with the key you just created.