Skip to main content
Every request needs a bearer token in the Authorization header. Gainflow accepts two kinds.

API keys

Create and revoke keys in the dashboard. A key is shown once, when you create it. We keep only its hash, so a lost key cannot be recovered: revoke it and create a new one. Revoking a key takes effect at once.
Treat keys like passwords. Keep them in environment variables or a secret manager, never in client-side code or a public repo.

OAuth for AI apps

The MCP server at https://mcp.gainflow.ai/mcp supports OAuth 2.1. When you add Gainflow as a connector, the app opens a Gainflow sign-in window and receives a token for your account. See Connect AI apps. Managing API keys and billing (/v1/account/api-keys, /v1/billing/*) needs a signed-in OAuth session. An API key cannot create or revoke other keys.