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

# API key authentication and key management

> Create and manage Yoshi API keys from your dashboard. Learn how to authenticate requests with Bearer tokens and rotate keys safely.

## Getting an API Key

<Steps>
  <Step title="Go to Settings">
    Open **Settings → API Keys** in your [Yoshi dashboard](https://beta.yoshi.ai).
  </Step>

  <Step title="Create a key">
    Click **Create API Key** and give it a name.
  </Step>

  <Step title="Copy the key">
    Copy the key immediately — it won't be shown again. Keys start with `yoshi_`.
  </Step>
</Steps>

## Using Your Key

Include it as a Bearer token in the `Authorization` header:

<CodeGroup>
  ```bash curl theme={null}
  curl https://api.yoshi.ai/accounts \
    -H "Authorization: Bearer yoshi_3xK9mP..."
  ```

  ```python Python theme={null}
  import httpx

  response = httpx.get(
      "https://api.yoshi.ai/accounts",
      headers={"Authorization": "Bearer yoshi_3xK9mP..."},
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch("https://api.yoshi.ai/accounts", {
    headers: { Authorization: "Bearer yoshi_3xK9mP..." },
  });
  const data = await response.json();
  ```
</CodeGroup>

## Key Management

* You can have **multiple active keys** for zero-downtime rotation
* Revoke a key instantly from the dashboard — it takes effect globally within seconds
* Keys are hashed by our provider and never stored in plaintext

<Warning>
  Never commit API keys to source control. The `yoshi_` prefix enables
  secret scanning in GitHub and GitGuardian.
</Warning>

## Rate Limit Headers

Every response includes rate limit information. See [Rate Limits](/rate-limits) for details.
