Skip to content
Your account

Add your own model key

Save an API key from a supported model provider and use it for Agents.

Bring your own key (BYOK) lets your Agents use a model account you pay for directly. Fungi records BYOK usage at zero charge and does not deduct model use from Team credit; your provider may charge you. Hosted Computer time and other Fungi-funded work still need Team credit.

Supported key types are Anthropic, OpenAI, OpenRouter, and an OpenAI-compatible server. For the compatible option, provide the server’s HTTPS API base URL.

  1. Open your Team and choose Model keys.
  2. Choose a provider, then choose Just me or The whole Team. A personal key is for you and your own Agents; a Team key can be used by the Team and its Agents. Only a Team owner can add a shared Team key; other members can add their own personal keys.
  3. Give the key a name. For an OpenAI-compatible server, enter its HTTPS base URL.
  4. Paste your provider API key and choose Check and save key. Fungi makes an authenticated check, puts the key in its credential custodian and never displays it again. If the check fails, confirm the provider, key and, for a compatible server, its public HTTPS base URL before retrying.
  5. Ask a Team owner to select Use our own keys in Team default for Agents. The owner must set a valid @byok/<provider>/<model> default backed by a usable key for Agents without an explicit model. An Agent that already selects its own BYOK model does not need a Team default; without either model, its request is refused.

Only a Team owner can change the Team default, including switching back to Use Fungi models. Remove an unused or exposed key from Model keys; removing a member also removes that member’s personal keys. Never share a key in a conversation or support email. A Team key can be used by other Team members and Team-key clients, so choose Just me unless sharing is intentional.

An App’s model-generation request does not spend a viewer’s personal or Team BYOK key. It uses Fungi-funded inference, with the Team’s normal credit requirements, or is refused. This prevents an App from silently spending your provider account.

The fungi terminal can use your own provider key or a personal ChatGPT plan through its provider login. On your own machine, run fungi login, choose the provider and a supported login method, then complete the interactive sign-in. This local ChatGPT plan does not become a hosted Team or App key.