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

# Workspace and credits

> How the workspace, plan, and credit balance work in the API

Every API call happens inside a **workspace**, and it is that workspace's credit balance that is consumed when you create submissions.

## The request's workspace

The API key resolves to a workspace on each request (see [Authentication](/docs/en/api-reference/autenticacao) about single and multi-workspace keys). To inspect which workspace was resolved, with plan, role, and member count:

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

## How credits are consumed

<Steps>
  <Step title="Credits belong to the workspace">
    The balance belongs to the workspace the request resolves to, not to the key itself. A multi-workspace key consumes from the workspace chosen by the `X-Workspace-Id` header.
  </Step>

  <Step title="Charging happens on submission">
    Credits are debited the moment you call `POST /clips`. Analyzing with `POST /clips/info` **costs nothing** and shows the `credits_cost` before you commit.
  </Step>

  <Step title="1 credit = 1 minute processed">
    The cost is proportional to the segment of the video you send for processing (the `timeframe`). Restricting the segment reduces the cost.
  </Step>
</Steps>

## Checking the balance

Current workspace balance:

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

Statement of movements (credits added and consumed):

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

<Tip>
  Want to predict the cost before submitting? Call `POST /clips/info` with the video URL: the response includes `credits_cost`, `discount_percent`, and `current_balance`. Details of the credit model in [How credits work](/docs/en/billing/how-credits-work).
</Tip>
