> ## 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.

# API Usage

> To monitor your account's API usage, including rate limits, monthly total credits, remaining credits, and more

export const PlanExclusivity = ({tier}) => {
  if (tier === "enterprise") {
    return <Callout icon="crown" color="#FFC107" iconType="regular">
        <strong>Enterprise Only</strong><br />This endpoint is exclusively available to <strong>Enterprise</strong> plan.<br /><a href="https://www.coingecko.com/en/api/enterprise">→ Contact sales</a>
      </Callout>;
  }
  if (tier === "analyst_above") {
    return <Callout icon="briefcase" color="#FFC107" iconType="regular">
        <strong>Analyst Plan and Above</strong><br />This endpoint is only available to <strong>Analyst, Lite, Pro, and Enterprise</strong> plan.<br /><a href="https://www.coingecko.com/en/api/pricing">→ View pricing</a>
      </Callout>;
  }
  if (tier === "basic_above") {
    return <Callout icon="briefcase" color="#FFC107" iconType="regular">
        <strong>Basic Plan and Above</strong><br />This endpoint is only available to <strong>Basic, Analyst, Lite, Pro, and Enterprise</strong> plan.<br /><a href="https://www.coingecko.com/en/api/pricing">→ View pricing</a>
      </Callout>;
  }
  throw new Error(`PlanExclusivity: invalid tier "${tier}". Use "basic_above", "analyst_above", or "enterprise".`);
};

<Tip>
  For a more comprehensive overview of your API usage, visit the [Developer Dashboard](https://www.coingecko.com/en/developers/dashboard).
</Tip>

<PlanExclusivity tier="basic_above" />

#### SDK Examples

<CodeGroup>
  ```typescript TypeScript theme={null}
  const response = await client.key.get();

  console.log(JSON.stringify(response, null, 2));
  ```

  ```python Python theme={null}
  response = client.key.get()

  print(response.model_dump_json(indent=2))
  ```
</CodeGroup>


## OpenAPI

````yaml openapi-specs/pro-api.json get /key
openapi: 3.0.0
info:
  title: CoinGecko Pro API
  version: 3.0.0
servers:
  - url: https://pro-api.coingecko.com/api/v3
security:
  - headerAuth: []
  - queryAuth: []
paths:
  /key:
    get:
      summary: API Usage
      description: >-
        To monitor your account's API usage, including rate limits, monthly
        total credits, remaining credits, and more
      operationId: api-usage
      responses:
        '200':
          description: API usage
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiUsage'
              example:
                plan: Other
                rate_limit_request_per_minute: 1000
                monthly_call_credit: 1000000
                current_total_monthly_calls: 32
                current_remaining_monthly_calls: 999968
                api_key_rate_limit_request_per_minute: 1000
                api_key_monthly_call_credit: 1000000
                api_key_current_total_monthly_calls: 8
components:
  schemas:
    ApiUsage:
      type: object
      required:
        - plan
        - rate_limit_request_per_minute
        - monthly_call_credit
        - current_total_monthly_calls
        - current_remaining_monthly_calls
        - api_key_rate_limit_request_per_minute
        - api_key_monthly_call_credit
        - api_key_current_total_monthly_calls
      properties:
        plan:
          type: string
          description: Current subscription plan
        rate_limit_request_per_minute:
          type: integer
          description: Rate limit per minute for the plan
        monthly_call_credit:
          type: integer
          description: Total monthly API call credits for the plan
        current_total_monthly_calls:
          type: integer
          description: Total API calls made this month
        current_remaining_monthly_calls:
          type: integer
          description: Remaining API call credits this month
        api_key_rate_limit_request_per_minute:
          type: integer
          description: Rate limit per minute configured for this API key
        api_key_monthly_call_credit:
          type: integer
          description: Monthly call credit limit configured for this API key
        api_key_current_total_monthly_calls:
          type: integer
          description: Total API calls made this month by this API key
  securitySchemes:
    headerAuth:
      type: apiKey
      in: header
      name: x-cg-pro-api-key
      description: >-
        Learn how to [set up your API
        key](https://docs.coingecko.com/docs/setting-up-your-api-key)
    queryAuth:
      type: apiKey
      in: query
      name: x_cg_pro_api_key
      description: >-
        Learn how to [set up your API
        key](https://docs.coingecko.com/docs/setting-up-your-api-key)

````