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

# Configuration

> Configure Astrolabe Cloud through workspace keys, billing, stack assignment, and custom stack policy.

Astrolabe Cloud configuration lives in the Cloud app and request metadata.

Most teams configure defaults in the dashboard, then use request metadata only when a workflow needs a different stack or temporary routing preference.

## Workspace setup

Each workspace has:

* status: active or suspended
* prepaid credit balance
* low-balance threshold
* API keys
* usage ledger
* routing stacks
* stack assignments
* route traces

Requests require an active workspace and enough available prepaid balance.

## API keys

Create keys in the Cloud app.

Keys can be:

* active
* revoked
* assigned to a specific routing stack
* used to separate environments, apps, customers, or workflows

Use key assignment when a service should always route through a specific stack.

## Billing

Billing uses prepaid credits.

Available packs:

* `$10`
* `$25`
* `$50`
* `$100`
* `$250`
* `$500`

The gateway reserves balance before provider execution and finalizes the exact debit after usage is known.

## Stack assignment

Use assignment to choose defaults:

* Workspace assignment applies to every key unless the key has its own assignment.
* API-key assignment applies to requests made with that key.
* Request metadata can select a stack for one call.

Resolution order is:

1. `metadata.astrolabe.stack`
2. API-key assignment
3. Workspace assignment
4. Managed default

## Stack policy

Custom stacks can configure:

* allowed and blocked providers
* allowed and blocked models
* required capabilities
* data and retention policy labels
* quality target
* cost mode
* latency SLO
* reliability target
* maximum expected cost
* fallback policy
* verification policy
* budget limits
* memory behavior
* observability behavior

See [Customize Stacks](/routing-stacks/customization).

## Request-level overrides

Use request metadata for one-off changes:

```json theme={null}
{
  "metadata": {
    "astrolabe": {
      "stack": "customer-data",
      "quality": "high",
      "cost_mode": "balanced",
      "verification": "strong",
      "fallback": true
    }
  }
}
```

Supported fields are documented in [Request Stack Selection](/routing-stacks/request-selection).

## Operational verification

After changing configuration:

1. Send one request through the relevant API key.
2. Confirm `x-astrolabe-stack-name` and `x-astrolabe-stack-version`.
3. Confirm `x-astrolabe-policy-status` is `passed`.
4. Open the route trace for `x-astrolabe-cloud-request-id`.
5. Check selected and rejected candidates.
6. Check the usage ledger entry after billing finalizes.
