> 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

How to retrieve your Cityweft API key for plugins

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

   ![](https://2449447963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ahel6HN9zgEzJ1vY9kr%2Fuploads%2FkWuJVjZh7PR6PHvyhA63%2Fimage.png?alt=media\&token=291fc1d7-b758-4955-8e29-52cdae0fe7e7)
2. **Open the “API / Plugin Keys” page**

   In the left-hand menu, go to **“API / Plugin Keys”**.

   ![](https://2449447963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ahel6HN9zgEzJ1vY9kr%2Fuploads%2F6ahQta81VbwDFpa2oTsR%2Fimage.png?alt=media\&token=4c2f6227-b4bb-41f4-9e4e-962eab6c1548)
3. **API / Plugin Keys page**

   On this page you can create and manage your API keys, see your plan's allowance, set usage limits and follow your usage.

   * The first time you open the page, you will automatically be issued 1 km² of free export.

   **Create a key**

   * Click **New token**, choose the environment (prod or dev) and give the key a name, for example the plugin or project it's for.

   **Copy or reveal your API key**

   * Each key shows its last characters, like `cw_…7c21`. Click the copy icon next to it to copy the full key.
   * To see a key, open the **⋯** menu next to it and choose **Reveal token**. Click the eye icon to show it, or **Copy** to copy it.

   **Re-issue a key**

   * If a key has been exposed or leaked, open the **⋯** menu and choose **Re-issue…**.
   * Re-issuing deactivates the previous key permanently, so update every integration and plugin that uses it.

   **Monitor your usage**

   * The **Usage** section shows your requests, the total area requested and the average area per request, split by environment, with a daily chart.
   * Switch between the last 7 days, the last 30 days, this month and last month. Days are counted in UTC.

   **Set a usage limit**

   * Cap how much area a key can request each billing period, and get an email before it reaches the cap. See [Usage limits](/docs/basics/usage-limits.md).

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

**4. 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.

  ![](https://2449447963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2ahel6HN9zgEzJ1vY9kr%2Fuploads%2FsyWnrcWdkw0tEnxSXLeD%2Fimage.png?alt=media\&token=7c4c7d19-b1e8-4b28-85e7-5b8f1e12497a)
