---
title: "Get credit balance"
method: GET
path: "/v1/credits"
tags: ["Credits"]
---

# Get credit balance

`GET /v1/credits`

## Request

- Base URL: `https://api.squirrelscan.com`
- URL: `https://api.squirrelscan.com/v1/credits`
- Auth: HTTP bearer

Current credit balance for the active organization, plus the plan and the credit pricing table. Pass `?orgId=` to target a specific organization the caller is a member of.

## Query parameters

- `orgId` string

## Response `200`

Balance, plan, and pricing.

- CreditsResponse
  - `balance` integer, required: Available credits for the organization.
  - `plan` object, required: The organization's plan definition.
  - `pricing` object, required: Credit cost table keyed by feature.
  - `pricingVersion` integer, required: Monotonic version of the pricing table.

## Other responses

- `401`: Missing or invalid credentials (including the shared auth middleware: no/invalid bearer token). Typed envelope with code `UNAUTHORIZED`. Branch on the `401` status, not the message.
- `403`: Authenticated but not permitted (e.g. not a member of the requested organization). Typed envelope; code `FORBIDDEN`, or `NO_ORG` when no active organization is resolved on credit/org-scoped routes. Branch on the `403` status.
- `429`: Too many requests. Retry after the window resets. (Rate limiting is planned — issue #69 — these headers document the intended contract.)

---

[API](https://skmtc.dev/squirrelscan/apis/squirrelscan-public-api.md) · [All operations](https://skmtc.dev/squirrelscan/apis/squirrelscan-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/squirrelscan/apis/squirrelscan-public-api/revisions/82c8183fe8bc?raw)
