> For the complete documentation index, see [llms.txt](https://cityweft.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cityweft.gitbook.io/docs/plugins/getting-your-api-key.md).

# Getting your API key

**What is an API key?**

An API key is your token used to validate requests to our platform from third-party applications, such as Cityweft plugins. Your API key is unique to your account and is directly linked to your billing and usage. It should therefore be protected to ensure that only authorized systems can access your data and use Cityweft services on your behalf. Never share your key publicly.

1. **Go to the Cityweft web platform**

   Open your browser and go to: [**app.cityweft.com**](http://app.cityweft.com) and log in to your account.

   If you do not already have an account, simply sign up using your Google, LinkedIn, or Email.<br>

   <figure><img src="/files/fAqWz6mJXXpcIRRMprsZ" alt=""><figcaption></figcaption></figure>
2. **Open the “API & Plugin Keys” page**

   In the left-hand menu, go to **“API & Plugin Keys”**.<br>

   <figure><img src="/files/WajUDRWayAb0t9nLn28l" alt=""><figcaption></figcaption></figure>
3. **API / Plugin Keys Page**

   * On the **API & Plugin Keys** page you can view, manage, and issue your API Keys
   * The first time you open the page, you will automatically be issued 1 km2 of free export<br>

   <figure><img src="/files/vyklbcsWIEzECjSJOBzY" alt=""><figcaption></figcaption></figure>

   **Retrieve your API Token**

   * To retrieve your API token, simply press the ‘View Token’ button<br>

     <figure><img src="/files/Ex67d6VpRI0NmRHcgNHI" alt=""><figcaption></figcaption></figure>
   * Here you can view and copy your unique token. If your token has been exposed or leaked, you can always re-issue the token using the ‘refresh’ button on the right.
   * Reissuing a token will deactivate your previous token permanently.<br>

     <figure><img src="/files/6X12IbgAgZvA4UYXt5yP" alt=""><figcaption></figcaption></figure>

   **Monitor your usage**

   * The numbers and charts on the page show all recorded usage of your API key, including:
     * Total requests made
     * Total area requested (km2)
     * Average area per request (km2)
     * Chart overview of usage

   **Adding balance to your account**

   * If you have no balance left on your account, you will not be able to use the API key to request additional models and data.
   * To purchase credits, visit the **Plan & Billing** page to purchase a subscription or bundle

**5. Check that you have an active subscription or bundle**

* Click on **“Plan & Billing”** in the menu.
* To get an API token, you must have an active **subscription** or **bundle**.

> You need an active plan in order to generate and use API/plugin keys.

* If you do not have an existing subscription or bundle, simply choose any bundle or subscription that matches your needs.<br>

  <figure><img src="/files/bvtWTpmNrxWiznxnG58d" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cityweft.gitbook.io/docs/plugins/getting-your-api-key.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
