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

# How-to: Generate a StableFX API key

> Create a StableFX API key in the Hub to authenticate API requests.

A StableFX API key authenticates your requests to the StableFX API and controls
what operations your integration can perform. You need one before making any API
calls.

## Prerequisites

Before you begin, ensure that you've:

* Created a Hub account. Contact your Circle representative if you don't have
  one.
* Been assigned the Admin role in your organization.

## Steps

<Steps>
  <Step title="Sign in to the Hub">
    Go to the Hub and sign in with your Circle account credentials:

    * **Sandbox**: [hub-sandbox.circle.com](https://hub-sandbox.circle.com)
    * **Production**: [hub.circle.com](https://hub.circle.com)
  </Step>

  <Step title="Open the Developers tab">
    In the left navigation, click **Developers**.
  </Step>

  <Step title="Create a key">
    Under **API Keys**, click **Create a key**.
  </Step>

  <Step title="Name the key and set permissions">
    Enter a name for the key. Under the StableFX permissions, check **Read and
    write**.

    <Note>
      Select **Read only** if the key is for monitoring or reporting only and
      shouldn't be able to create or execute trades. For details on what each key
      type can and can't do, see [API key
      permissions](/stablefx/references/console-roles-permissions#api-key-permissions).
    </Note>
  </Step>

  <Step title="Copy the key">
    Click **Create**. The Hub displays the key once. Copy it immediately and store
    it securely. You can't retrieve it again after closing this dialog.

    <Warning>
      Never share your API key or include it in client-side code or public
      repositories. Losing control of your API key can result in financial loss.
    </Warning>
  </Step>
</Steps>
