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

# How to Set Up the API in a Local Instance

To test the API in your local instance, you have the following pre-requisites:

<Steps>
  <Step title="Clone the cal.com repository">
    Please clone the cal.com repository. You can do it by following the instructions provided in [Installation](/developing/local-development)
  </Step>

  <Step title="Add license key in .env">
    Add a staging license key that goes in as value for `CALCOM_LICENSE_KEY` in your root `.env` file.

    You can use the following as staging license key

    ```
    cal_live_QiMeiCoFjEczVQmY6EJTeiJV
    ```
  </Step>

  <Step title="Start development server and create API key">
    Start the cal.com server using `yarn dev` on localhost and create the test API keys by visiting `/settings/developer/api-keys`
  </Step>

  <Step title="Copy .env.example file">
    Copy the `.env.example` file to `.env` file by running `cp apps/api/v2/.env.example apps/api/v2/.env` from the root folder
  </Step>

  <Step title="Start API server and test API">
    Start the API v2 server by running `yarn workspace @calcom/api-v2 dev` and start testing your API locally
  </Step>
</Steps>

<Info>By default, the app server runs on port 3000 and the API server runs on port 3003</Info>
