Skip to navigation

Use your own API key with Agent Mode

View as Markdown

Using your own API key is available on Postman Solo and Team plans. For more information, see the pricing page.

Add your own OpenAI or Anthropic API key so Postman Agent Mode runs on your provider account instead of using Postman AI credits.

Using your own API key is different from BYOK Encryption, which encrypts your team’s data in Postman with a key you manage.

Prerequisites

To use your own API key, you need the following:

  • A Postman account on a Solo or Team plan. If you’re on the free plan, the BYOK for AI features section in your AI settings shows an upgrade prompt. Click the upgrade button to go to the upgrade page. To learn more, see Change your plan.
  • AI turned on in your AI settings. For more information, see Enable AI features.
  • An API key from OpenAI or Anthropic. Create the key in your provider account.

Add an API key

To add an API key, do the following:

  1. Click Setting icon Settings in the header and select App settings > AI.
  2. In BYOK for AI features, find the provider you want to use.
  3. Paste your API key in the provider’s field.
  4. Click Save.

The model dropdown in Agent Mode updates right away. Postman shows only a key hint, which is the first four and last four characters of the key, so you can tell your keys apart. Nobody can view the full key after you save it.

Use your key in Agent Mode

After you save a key, Agent Mode runs requests for that provider’s models on your key. In the model dropdown, a key icon marks the models for each provider you’ve added a key for.

The dropdown also lists the models from the other supported providers, but they’re unavailable until you add a key for that provider. To add one, click the model to open your AI settings. To update your keys from the dropdown, click Manage Provider API Keys.

Requests that run on your key don’t use Postman AI credits. Your provider bills you for them. Spend on your key doesn’t appear on the credit usage page in Postman, so check your provider’s usage dashboard to see it. To learn more about credits, see Manage your Postman AI credits.

Control your costs

Postman doesn’t cap spend on your key. To control your costs, do the following:

  • Configure an enforced spend limit in your provider’s console where available. OpenAI budget alerts don’t stop API requests; enable a hard spend limit to enforce the limit. For Anthropic, use workspace spend limits.
  • Use a dedicated OpenAI project or Anthropic workspace for Postman so you can track its usage separately.

Replace or remove an API key

To replace or delete an API key, do the following:

  1. Click Setting icon Settings in the header and select App settings > AI.
  2. In BYOK for AI features, find the provider whose key you want to change.
  3. Enter a new key and click Save, or delete the key.

When you delete a key, the model dropdown updates right away. Agent Mode goes back to the models Postman provides, and Auto is selected.

Removing a key in Postman doesn’t revoke it at your provider. If a key is exposed, revoke it in your provider’s console too.

To keep your key secure, use a restricted or scoped key where your provider supports it, and rotate it regularly. A replaced key takes effect on the next request.

Plan changes

Using your own API key requires a Solo or Team plan. If you move to the free plan, you can still view the key hint and remove the key in your AI settings, but Agent Mode doesn’t use it. Your AI settings also show an upgrade prompt.

Data handling

Postman encrypts your API key at rest.

Model requests run on your provider account under its terms. Postman still stores your Agent Mode conversation history under Postman’s terms.