> ## Documentation Index
> Fetch the complete documentation index at: https://rankahead.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# LLM API Keys: Connect Your Own AI Providers

> Add your OpenAI, Anthropic, Google, and Perplexity API keys to Rankahead so prompts run against each LLM provider using your own accounts.

Rankahead measures your brand's AI visibility by running your tracking prompts against multiple large language models simultaneously. To do this, it needs API access to each provider. You supply your own API keys so that requests are made on your behalf, your usage is billed directly to your provider accounts, and Rankahead never proxies your traffic through a shared pool.

Navigate to **Settings > API Keys** to add and manage your keys.

## Supported providers

<CardGroup cols={2}>
  <Card title="OpenAI" icon="bot">
    Run prompts against GPT-4o and other OpenAI models. Required to track visibility in ChatGPT-style answers.
  </Card>

  <Card title="Anthropic" icon="cpu">
    Run prompts against Claude models. Required to track visibility in Anthropic's AI responses.
  </Card>

  <Card title="Google" icon="search">
    Run prompts against Gemini models. Required to track visibility in Google AI Overviews and Gemini-powered answers.
  </Card>

  <Card title="Perplexity" icon="zap">
    Run prompts against Perplexity's models. Required to track visibility in Perplexity search answers and citations.
  </Card>
</CardGroup>

You do not need to add keys for all four providers. Rankahead only runs prompts against providers where you have a valid key configured. Adding more providers gives you a broader view of your AI visibility across the ecosystem.

## Add an API key

<Steps>
  <Step title="Open Settings > API Keys">
    Click **Settings** in the left sidebar, then select **API Keys**.
  </Step>

  <Step title="Select a provider">
    Choose the provider tab — **OpenAI**, **Anthropic**, **Google**, or **Perplexity** — for the key you want to add.
  </Step>

  <Step title="Paste your API key">
    Enter your API key in the key field. Keys are validated on save; Rankahead will alert you if the key format is invalid.
  </Step>

  <Step title="Select a preferred model">
    Choose the model you want Rankahead to use for that provider. This model is used for all prompt executions and content generation tasks tied to that provider.
  </Step>

  <Step title="Save">
    Click **Save**. The key is encrypted and stored securely. The field immediately masks the value — you will only see the last few characters going forward.
  </Step>
</Steps>

## Preferred models

In addition to the API key, you configure a preferred model for each provider. This determines which model Rankahead uses when it runs your tracking prompts and generates content.

Select a model that balances capability and cost for your use case. If you track a high volume of prompts, a faster or less expensive model may be preferable. If content quality is the priority, choose the most capable available model.

<Note>
  Model availability depends on your plan with each provider. If you select a model your API key does not have access to, prompt execution for that provider will fail with an authorization error.
</Note>

## Security

<AccordionGroup>
  <Accordion title="Are raw keys ever exposed?">
    No. Once you save an API key, the raw value is never displayed again. The interface shows only a masked version. If you need to rotate a key, paste the new value into the field and save — it replaces the previous key.
  </Accordion>

  <Accordion title="How are keys stored?">
    Keys are encrypted at rest using industry-standard encryption. They are decrypted only at the moment Rankahead needs to make an API call on your behalf.
  </Accordion>

  <Accordion title="Who can see or edit API keys?">
    Only members with the **Admin** role can view the API Keys settings page and modify keys. Members with the Member role do not have access to this section.
  </Accordion>

  <Accordion title="Can I use a restricted API key?">
    Yes. If your provider supports scoped or restricted API keys, you can use one. Rankahead only needs permission to create chat completions. It does not require access to billing, fine-tuning, or other provider features.
  </Accordion>
</AccordionGroup>

## Remove or rotate a key

To replace a key, paste the new value into the key field for that provider and click **Save**. The new key immediately replaces the old one.

To remove a key entirely, click **Remove** next to the provider. Rankahead will stop running prompts against that provider until you add a new key.

<Warning>
  Removing a key stops all prompt tracking for that provider. Historical data is retained, but no new visibility data is collected until you add a replacement key.
</Warning>

## Troubleshooting

If prompt runs fail for a specific provider, check the following:

* Confirm the API key is still valid in your provider's dashboard. Keys can be revoked or expire.
* Verify the selected model is available on your provider plan.
* Check that your provider account has sufficient credits or an active billing method.
* Re-save the key in Rankahead to trigger a fresh validation check.

<CardGroup cols={2}>
  <Card title="Prompts" icon="search" href="/dashboard/prompts">
    Configure the tracking prompts Rankahead runs against each LLM provider.
  </Card>

  <Card title="Team settings" icon="users" href="/settings/team">
    Control who on your team can access and manage API keys.
  </Card>
</CardGroup>
