# API keys

> Store provider API keys with Pullfrog or in GitHub Actions secrets, and fix a run that finds no key.

Pullfrog runs on your own API key for every [supported provider](https://pullfrog.com/docs/providers#supported-providers). You keep your provider relationship, rate limits and billing, and pay the provider directly at its prices.

## Key storage

| Where | Set it in | Scope |
| --- | --- | --- |
| [Pullfrog secrets](https://pullfrog.com/docs/api-keys#pullfrog-secrets) (recommended) | The Pullfrog console | The account, or one repository |
| [GitHub Actions secrets](https://pullfrog.com/docs/api-keys#github-actions-secrets) | GitHub, then the workflow `env:` block | The workflow |

You can mix the two per provider. If a key is set in both, the workflow value wins, so a workflow can override a stored key.

### Pullfrog secrets

Pullfrog encrypts stored keys at rest, injects them into each run, and never writes them to your repository or workflow files. No workflow edits are needed.

1. Open `pullfrog.com/console/<account>` and find the **Providers** section of the **Billing** card.
2. Select the **BYOK** tab.
3. Click **Set up** on the provider's card and follow its credential instructions.

The **Add secret** modal scopes a secret to the whole account or to one repository.

- Every repository inherits the account's secrets. A repository secret with the same name overrides the account one for that repository only.
- On an organization, only owners can open the **Billing** card. Repository admins manage keys for their repository on the **Providers** card of the repository console, where inherited account secrets appear read-only.
- A provider key added on the repository's **Providers** card shows on its provider's tile, which can also remove it. Every other secret stays in the **Secrets** list.

The [CLI](https://pullfrog.com/docs/cli#secrets) manages the same store:

```bash
pullfrog secret set ANTHROPIC_API_KEY --org acme
```

### GitHub Actions secrets

Keep keys in GitHub when you already rotate secrets there. Pullfrog reads them from the workflow `env:` block.

1. Add the secret in GitHub, at the organization (`github.com/organizations/<org>/settings/secrets/actions`, **New organization secret**) or the repository (`github.com/<org>/<repo>/settings/secrets/actions`, **New repository secret**).
2. Map it into `pullfrog.yml`:

    `.github/workflows/pullfrog.yml`:

    ```diff
     jobs:
       pullfrog:
         runs-on: ubuntu-latest
         steps:
           - name: Run agent
             uses: pullfrog/pullfrog@v0
             with:
               prompt: ${{ inputs.prompt }}
    +        env:
    +          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
    ```

Any variable in `env:` reaches the agent, so a [provider with no console card](https://pullfrog.com/docs/providers#custom-providers) runs from a GitHub Actions secret too.

## Cloud providers and custom endpoints

These routes are BYOK only and have their own setup pages:

| Route | Use it for |
| --- | --- |
| [Amazon Bedrock](https://pullfrog.com/docs/bedrock) | Inference through your AWS account, with pinned model IDs |
| [Google Vertex AI](https://pullfrog.com/docs/vertex) | Inference through your Google Cloud project, with pinned model IDs |
| [Azure OpenAI](https://pullfrog.com/docs/azure) | Your Azure deployments, billed to your Azure subscription |
| [OpenAI-compatible endpoints](https://pullfrog.com/docs/openai-compatible) | A LiteLLM proxy, a self-hosted vLLM server, or any gateway that speaks chat completions |

## Troubleshooting

Both of these mean no credential covers the model a run is set to.

### "Missing API key" error in GitHub Actions

The agent found no valid key at runtime. Check, in order:

1. The selected model's env var is set in Pullfrog secrets or in a workflow `env:` mapping.
2. The secret name matches the provider's env var exactly: `ANTHROPIC_API_KEY`, not `CLAUDE_API_KEY`.
3. A GitHub secret is mapped in the `env:` block of `pullfrog.yml`. GitHub Actions injects only what the workflow lists.
4. If you connected an [OpenAI-compatible endpoint](https://pullfrog.com/docs/openai-compatible), the model is set to it. Connecting one doesn't change the default model: pick the endpoint under **Manual › Custom**.

### "No key is stored" note on the Model card

No stored credential covers the provider of the selected model, or of the Smart ladder, so a run fails with the error above. On a repository's console the note also checks the repository's GitHub Actions secrets, so there the key is in neither place.

- Connect the provider under **Providers**.
- Add its key as a GitHub Actions secret.
- Switch to a model whose key you already have.
