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

# Account & Billing

> Usage-based pricing, prepaid token credits, and API keys

These endpoints are available on the platform API (`api.aws.cognee.ai`) and manage account-level resources.

## Pricing

Cognee Cloud is usage-based — you start for free and pay only for what you use. There are no fixed plan tiers. Pricing has two parts:

* **Token usage** — **\$2.50 per 1M tokens** processed.
* **Workspaces** — your first workspace is free; each additional workspace is **\$5 / month**.

Your free workspace includes **unlimited users** and **unlimited API calls**, and supports the agentic integrations (Claude Code, Codex, MCP). It is created automatically when you sign up — no Stripe checkout required. You only start paying when you process tokens beyond your prepaid balance or create additional workspaces. The per-workspace charge keeps the free general workspace open to unlimited users while gating the creation of extra workspaces.

### Credit codes

If you have a credit code, you can redeem it for prepaid token credits on the **Billing** page — see [Redeem a credit code](#redeem-a-credit-code) below.

## Billing model

The **Billing** page (`/billing`) is where you manage prepaid token credits. It is owner-only — non-owners see *"Only the owner of this workspace can manage billing and buy credits."*

<Steps>
  <Step title="Buy prepaid token credits">
    Purchase credits through a Stripe Checkout session. Use the quick-pick amounts (**$10**, **$25**, **$50**, **$100**) or enter a custom amount (minimum **\$0.50**). The estimated number of tokens the amount buys is shown before you check out.
  </Step>

  <Step title="Track your balance">
    The page shows your **Remaining balance**, a spend meter, and a per-workspace breakdown of usage. A status line under the meter reports whether [auto recharge](#auto-recharge) is on, off, or failing.
  </Step>

  <Step title="Turn on auto recharge">
    Let Cognee top the workspace up automatically with your saved card when the balance runs low — see [Auto recharge](#auto-recharge) below.
  </Step>

  <Step title="Redeem a credit code">
    Click the **Have a code?** link below the top-up options to reveal the code field and add prepaid credits to the workspace — see [Redeem a credit code](#redeem-a-credit-code) below.
  </Step>

  <Step title="Review purchases">
    Your purchase history lists every credit purchase made on the workspace, including automatic recharges. Rows backed by a Stripe invoice carry a **View invoice** link that opens the hosted invoice in a new tab.
  </Step>
</Steps>

### Redeem a credit code

A credit code adds a fixed amount of prepaid token credits to a workspace. Codes are redeemed on the **Billing** page, in the **Have a code?** field below the top-up options:

<Steps>
  <Step title="Select the workspace">
    Credits are added to the workspace you are currently viewing, so switch to the right workspace first. If no workspace is selected, redemption fails with *"No workspace selected."*
  </Step>

  <Step title="Enter the code">
    Click **Have a code?** to reveal the field, then type your code into it (placeholder **Enter code**). The input is automatically uppercased as you type. Press **Enter** or click **Redeem** to continue.
  </Step>

  <Step title="Confirm in Stripe">
    Redeeming opens a Stripe page to confirm the credit. When it is done, you are returned to the Billing page with the message *"Code redeemed. Your credits are added once Stripe confirms — this can take a few seconds."* If you cancel, you see *"Redemption cancelled — no credits were added."* and nothing is charged or credited.
  </Step>
</Steps>

<Note>
  Each code can be redeemed once per user — a code you have already redeemed is blocked. An invalid or unredeemable code shows *"Could not redeem code."* Credits appear in your **Remaining balance** a few seconds after Stripe confirms.
</Note>

## Auto recharge

Auto recharge keeps a workspace topped up automatically: when the balance drops to a threshold you choose, Cognee charges your saved card for a fixed amount so work in flight is not interrupted by a `402`. It is configured in the **Auto recharge** panel on the **Billing** page and is **off** until you turn it on.

| Setting                            | Meaning                                                                                                            | Default   |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------ | --------- |
| **When balance drops to**          | The balance that triggers a recharge.                                                                              | `$5`      |
| **Recharge amount**                | How much is charged each time. Minimum **\$5**.                                                                    | `$20`     |
| **Monthly recharge limit**         | Auto-recharging pauses for the rest of the month once this total is reached. Must be at least the recharge amount. | `$200`    |
| **Notify me when balance reaches** | Optional balance at which you want to be notified. Leave empty to skip.                                            | *(empty)* |

<Steps>
  <Step title="Set your amounts">
    Fill in the fields above. If the recharge amount is under \**$5**, or the monthly limit is below the recharge amount, the panel shows *"Recharge amount must be at least $5.00 and the monthly limit must be at least the recharge amount."* and refuses to save.
  </Step>

  <Step title="Turn the switch on">
    The **Auto recharge** switch takes effect immediately — you do not have to press **Save** first. Turning it on records your authorization for off-session charges: *"By turning on auto recharge, you authorize Cognee to automatically charge your saved card `{amount}` whenever your balance drops to `{threshold}`, up to `{monthly limit}` per month. You can turn this off at any time."* You can turn it off again whenever you want.
  </Step>

  <Step title="Save edits separately">
    **Save** works independently of the switch, so you can adjust thresholds while auto recharge is off — or edit them later without re-triggering a charge. **Save** is only enabled while the form differs from what is stored, and a green **Saved** confirms the write.
  </Step>
</Steps>

Once configured, the panel collapses to a one-line summary — *"On · charges $20.00 when balance drops to $5.00 · $40.00 of $200.00 this month"*, *"Off"*, or *"Not set up yet"* — with a chevron and a **Manage** link to reopen it. While auto recharge is on, the expanded panel shows a progress bar of how much of the monthly limit has already been used.

### Where its state shows up

* **Balance card** — a status line next to the spend meter reads **Auto recharge: on · $X of $Y this month**, **Auto recharge: off**, or **Auto recharge: charge failed — see above**.
* **Failed-charge banner** — if the last automatic charge failed, a red banner appears at the top of the Billing page with the reason: *"Your last automatic recharge failed: `{reason}` Buy credits below to update your card — auto recharge resumes after the next successful charge."*
* **Announcement** — the first time it is available to you, a **Never run out of credits again** dialog introduces the feature with a **Set up auto recharge** button that takes you to Billing. **Maybe later** (or the ✕) dismisses it for good.

<Note>
  Auto recharge needs a saved card and a backend that supports it. On an environment that predates the feature, saving returns *"Auto recharge isn't available on this environment yet."*
</Note>

## When credits run out

Every operation that spends credits — uploading files (`remember`), graph processing (`cognify` / `improve`), and search or recall — is checked against your workspace balance before it runs. When the balance is too low, the request is rejected with **HTTP 402** and the UI tells you which operation failed, instead of the request failing silently.

### Insufficient-credits dialog

A **Not enough credits to run *{operation}*** dialog (for example, *"Not enough credits to run upload"*) appears wherever you are in the app — the check is wired into the shared workspace API client, so uploads, processing, search, and recall all surface it. It shows your **Current balance** and offers **Dismiss** or **Go to billing**.

Its explanation depends on the workspace's [auto recharge](#auto-recharge) state:

| State                     | Message                                                                                                                                    |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| Off (or never configured) | *"Your workspace doesn't have enough credits left. Add credits on the billing page to continue."*                                          |
| On                        | *"Auto recharge is on — a top-up may take a couple of minutes. Retry shortly, or add credits on the billing page to continue right away."* |
| On, last charge failed    | *"Auto recharge is on but the last automatic charge failed: `{reason}` Add credits manually or update your card on the billing page."*     |
| Still being looked up     | *"Checking your workspace's credit balance…"* — the dialog never claims auto recharge is on or off before it knows.                        |

Because the dialog already explains the failure, pages no longer add their own error text for it: on the [Search](/cognee-cloud/ui/search) page the pending answer bubble is removed rather than replaced with a duplicate inline error.

### Persistent notice

If you never saw the dialog — the tab was closed or reloaded before the response arrived — a red bar appears under the top bar on your next visit: **Your last *{operation}* failed — your workspace balance is too low.** with a **Top up credits →** link and a dismiss button.

* The notice is recorded against the workspace that actually failed, so switching workspaces while a request is in flight still attributes it correctly.
* It is dropped automatically after **24 hours**, and dismissing the live dialog also clears it.

### Pre-flight warning on upload

Before an upload is sent, Cognee estimates its cost from the selected files and compares it with the workspace balance. If the estimate reaches or exceeds your balance, a **This upload might use more credits than you have** dialog shows **Could cost** (an *"Up to \~\$X.XX"* ceiling) next to your **Current balance**, with **Cancel** and **Top up first**. There is no *upload anyway* path — the dialog reads *"Top up to continue with this upload."* and both exits abandon the upload, so top up (or turn on [auto recharge](#auto-recharge)) and try again.

The figure is deliberately a ceiling rather than a prediction, and the real cost is usually lower. For PDF and DOCX files the text is extracted and tokenized in the browser first, so a short *"Estimating cost — Analyzing files before upload… (n/m)"* notification can appear while a large batch is analyzed. When a selection contains a format with no cost model, no warning is shown.

### Failures during processing

A run that starts successfully and exhausts the balance part-way through never produces a client-visible 402. Instead the brain reports it as **Failed — insufficient credits** in its status dot, status pill, and a dedicated banner — see [Brains](/cognee-cloud/ui/datasets#status-dots). Your uploaded files are kept; top up before retrying, since a retry on an empty balance fails the same way.

After you top up, retrying the build starts a new run that skips documents already processed before the failure — you don't pay again for the work that completed. Only the unprocessed remainder (including the document that was mid-processing when the balance ran out) is run and charged.

This dedicated treatment exists for brain builds only. An automatic [improve](/cognee-cloud/functionality/session-distillation) run that runs out of credits mid-run is reported on the [Sessions page](/cognee-cloud/ui/sessions) as a regular failed **Improve** entry with its failure reason shown on the entry — there is no credit-specific label there.

## Workspaces

Your first workspace is the **Personal Workspace** — it is free, cannot be deleted, and supports unlimited users.

Each additional workspace you own costs **\$5 / month**:

* Creating an extra workspace charges immediately, with proration applied (`proration_behavior: always_invoice`).
* Removing a workspace is scheduled for the end of the current billing period; you keep it until then, and a scheduled removal can be cancelled before it takes effect.

## Payment method

Your free workspace can be created without adding a payment method. A payment method is required for additional workspaces and for billable usage beyond your prepaid balance. When a customer who already has a default payment method on file is charged for a workspace, the subscription is created directly against that card; Stripe Checkout is used as a fallback when card verification (such as 3D Secure) is required.

## Delete your account

Account deletion is self-service, from **Settings → Danger zone**. The **Delete account** action there *"Permanently deletes your account: every workspace you own, all their data, your subscription, and your login."*

<Steps>
  <Step title="Open the danger zone">
    Go to **Settings** (`/settings`) and scroll to the **Danger zone** card — *"Irreversible account actions"*. Click **Delete account**.
  </Step>

  <Step title="Confirm with your email address">
    Type your own email address into the confirmation field. **Permanently delete my account** stays disabled until it matches (case-insensitively); **Cancel** backs out without deleting anything.
  </Step>

  <Step title="You are signed out">
    Cognee deletes the account server-side (`DELETE /users/me`) — its workspaces, Stripe customer, and login — then routes you through the normal sign-out flow so cookies, local storage, and your Auth0 session are all cleared. If the request fails, the reason is shown inline and you stay signed in.
  </Step>
</Steps>

<Warning>
  This cannot be undone. Data in the workspaces you own is destroyed along with the account — see [Deletion & erasure](/cognee-cloud/functionality/data-and-security#6-data-protection--gdpr). Deleting a single workspace instead of the whole account is done from **Settings → Security**.
</Warning>

## API keys

| Endpoint                          | Description                                                |
| --------------------------------- | ---------------------------------------------------------- |
| `GET /api/v1/api-keys`            | List all API keys for the authenticated user               |
| `POST /api/v1/api-keys`           | Generate a new API key                                     |
| `DELETE /api/v1/api-keys`         | Delete an API key                                          |
| `POST /api/v1/api-keys/check`     | Validate whether an API key is active                      |
| `GET /api/v1/api-keys/my-user-id` | Get the user ID associated with the current authentication |

API keys are also managed through the [API Keys UI](/cognee-cloud/ui/api-keys).

## Health

**`GET /health`** — Basic availability probe for the Cognee Cloud service.

Returns an empty `200 OK` response when the service is running.
