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

# Authentication

> How to authenticate your requests and select the workspace

Every API request needs an **API key**.

## Generating your key

Go to [API keys](https://cut.pro/studio/me/api-keys) in your account settings and click **New key**. Store the key somewhere safe, it is not shown again after it is created.

## Sending the key

Send the key in **every** request, in one of two ways:

<CodeGroup>
  ```bash Header X-Api-Key theme={null}
  curl https://api.cut.pro/api/v1/workspace \
    -H "X-Api-Key: YOUR_KEY"
  ```

  ```bash Authorization Bearer theme={null}
  curl https://api.cut.pro/api/v1/workspace \
    -H "Authorization: Bearer YOUR_KEY"
  ```
</CodeGroup>

## Workspaces

An API key is bound to **one or more workspaces** (scoped tokens, Cloudflare style). Credits, submissions, clips, and renders always belong to the workspace the request resolves to.

<Tabs>
  <Tab title="Single-workspace key">
    Every request operates on that workspace automatically. **No extra header is needed.**
  </Tab>

  <Tab title="Multi-workspace key">
    Send the `X-Workspace-Id` header on each request to choose which workspace the call hits:

    ```bash theme={null}
    curl https://api.cut.pro/api/v1/balance \
      -H "X-Api-Key: YOUR_KEY" \
      -H "X-Workspace-Id: WORKSPACE_ID"
    ```

    Without the header, the response is `400 MISSING_WORKSPACE_ID`, including the list of allowed workspaces.
  </Tab>
</Tabs>

<Tip>
  Call `GET /workspace` to inspect which workspace the current request resolved to, along with the plan and your role in it.
</Tip>

## Social connections

Connected social accounts (TikTok, Instagram, YouTube, etc.) are the IDs you pass as `connection_id` when creating a post. The lifecycle of connections **is not exposed by the API**. To connect a new account, go to [cut.pro](https://cut.pro) and use the OAuth flow inside the app.
