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

# Authentication (Pro API)

> How to authenticate requests to the CoinGecko Pro API

**1. Get your API key**

[Sign up](https://www.coingecko.com/en/api/pricing) and grab your key from the [Developer Dashboard](https://www.coingecko.com/en/developers/dashboard#api-keys).

**2. Choose an auth method**

| Method | Key | Example |
| - | - | - |
| **Header** (recommended) | `x-cg-pro-api-key` | `-H "x-cg-pro-api-key: YOUR_API_KEY"` |
| **Query string** | `x_cg_pro_api_key` | `?x_cg_pro_api_key=YOUR_API_KEY` |

**3. Make a request**

All requests use the Pro API root URL: `https://pro-api.coingecko.com/api/v3/`

```bash Header (recommended) theme={null}
curl "https://pro-api.coingecko.com/api/v3/ping" \
  -H "x-cg-pro-api-key: YOUR_API_KEY"
```

```bash Query string theme={null}
curl "https://pro-api.coingecko.com/api/v3/ping?x_cg_pro_api_key=YOUR_API_KEY"
```

> Replace `YOUR_API_KEY` with your key from the [Developer Dashboard](https://www.coingecko.com/en/developers/dashboard#api-keys).

> [!TIP]
>
> Onchain endpoints use the same authentication — just include `/onchain` in the path.
>
> e.g. `https://pro-api.coingecko.com/api/v3/onchain/simple/networks/...`

> [!NOTE]
>
> Store your API key in your backend and use a proxy to inject it into requests.
>
> Avoid query string parameters in production — they risk exposing your key in logs and browser history.

> [card] [Done setting up your key?](https://docs.coingecko.com/ai-integration.md)
>
> Connect it to AI agents via MCP, SDK prompts, and coding agent integrations.

### Usage Credits

* Each successful request (HTTP 200) deducts 1 credit from your monthly quota.
* Failed requests (4xx, 5xx) do **not** consume credits, but still count toward your per-minute rate limit.
* Monthly credits and rate limits depend on your [plan](https://www.coingecko.com/en/api/pricing).
* Check usage in the [Developer Dashboard](https://www.coingecko.com/en/developers/dashboard#usage-reports).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.