## Get a workspace spending limit

`admin.workspaces.retrieve_spending_limit(strworkspace_id)  -> WorkspaceRetrieveSpendingLimitResponse`

**get** `/compute/v1/admin/workspaces/{workspace_id}/spending-limit`

Get a workspace spending limit

### Parameters

- `workspace_id: str`

### Returns

- `class WorkspaceRetrieveSpendingLimitResponse: …`

  Configured lifetime workspace spending limit, or null if unset. Unset workspaces have no workspace-level cap and continue to use organization-level billing.

  - `limit: Limit`

    - `amount: int`

      Workspace spending limit amount in milli-USD. Tracking starts when the limit is configured; prior or already-committed unreserved work is not counted in this workspace cap ledger.

    - `currency: Literal["MILLI_USD"]`

      Workspace spending limits currently support milli-USD only.

      - `"MILLI_USD"`

  - `type: Literal["lifetime"]`

    - `"lifetime"`

### Example

```python
import os
from boltz_api import Boltz

client = Boltz(
    api_key=os.environ.get("BOLTZ_API_KEY"),  # This is the default and can be omitted
)
response = client.admin.workspaces.retrieve_spending_limit(
    "workspace_id",
)
print(response.limit)
```

#### Response

```json
{
  "limit": {
    "amount": 5000,
    "currency": "MILLI_USD"
  },
  "type": "lifetime"
}
```
