# Credit balance

> Your credit balance and daily top-up. Free.

- **Request:** `GET https://api.lurkapi.com/v1/account/credit-balance`
- **Auth:** `x-api-key` header ([get a free key](https://lurkapi.com/login?next=/dashboard))
- **Cost:** free
- **MCP tool:** `account_credit_balance` on `https://api.lurkapi.com/mcp`
- **Platform:** [Account](https://lurkapi.com/docs/account.md) (lurkapi.com)
- **Web page:** https://lurkapi.com/docs/account/credit-balance

## When to use this

Use it to check your balance before a batch of calls. It's free; every other response also carries `credits_remaining`.

Once a UTC day, a balance below 25 credits is topped up to 25 on your first call. With a playground token instead of a key, `credits_remaining` is the free tries left today.

## Parameters

All parameters go in the query string.

| Name | Type | Required | Default | Allowed values | Description | Example |
| --- | --- | --- | --- | --- | --- | --- |

## Example request

Replace `YOUR_API_KEY` with your key, or set `LURKAPI_KEY` for the code. [Get a free key](https://lurkapi.com/login?next=/dashboard).

curl:

```bash
curl "https://api.lurkapi.com/v1/account/credit-balance" \
  -H "x-api-key: YOUR_API_KEY"
```

JavaScript:

```js
const params = new URLSearchParams({

});
const res = await fetch(`https://api.lurkapi.com/v1/account/credit-balance?${params}`, {
  headers: { "x-api-key": process.env.LURKAPI_KEY },
});
const data = await res.json();
if (!data.success) throw new Error(`${data.code}: ${data.error}`);
console.log(data);
```

Python:

```python
import os
import requests

res = requests.get(
    "https://api.lurkapi.com/v1/account/credit-balance",
    params={

    },
    headers={"x-api-key": os.environ["LURKAPI_KEY"]},
    timeout=60,
)
data = res.json()
if not data["success"]:
    raise RuntimeError(f"{data['code']}: {data['error']}")
print(data)
```

## Example response

A real response from this endpoint, captured from the live API and trimmed to a couple of items. Strings over 96 characters (mostly signed media URLs) are cut short and end in `…`.

200 OK (application/json):

```json
{
  "success": true,
  "credits_remaining": 4985,
  "credits_charged": 0,
  "daily_top_up": 25,
  "next_top_up_at": "2026-10-01T00:00:00.000Z"
}
```

## Response fields

Every field of a successful response. `[]` marks a list: `a[].b` is the `b` of each item in `a`. **nullable** fields can be `null`; **optional** fields can be missing.

| Field | Type | Description |
| --- | --- | --- |
| `success` | `true` | Always true here; errors have `success: false`. |
| `credits_remaining` | `number` | Your balance after this call. On anonymous playground calls: free tries left today. |
| `credits_charged` | `number` | Credits this call cost; 0 on free endpoints. On anonymous playground calls: tries used (1). |
| `daily_top_up` | `number` | Once a UTC day, a balance below this is topped up to it on your first call. |
| `next_top_up_at` | `string` | When the next daily top-up can apply: the coming 00:00 UTC, ISO 8601. |

## Caching and freshness

Not cached: every call is answered fresh.

## Errors

Errors return `{ success: false, error, code, docs }` with the HTTP status below. Validation errors, `401`/`402`/`429` rejections and `5xx` failures are free; `not_found` is charged ([how charging works](https://lurkapi.com/docs.md#credits)). [All error codes](https://lurkapi.com/docs.md#errors).

| Status | Code | Meaning |
| --- | --- | --- |
| 401 | `missing_api_key` | No API key. Send it in the `x-api-key` header. |
| 401 | `invalid_api_key` | The key is unknown or was revoked. |
| 402 | `insufficient_credits` | Not enough credits for this call. Buy a pack or wait for tomorrow's top-up. |
| 405 | `method_not_allowed` | Endpoints take GET with query params. |
| 429 | `rate_limited` | Too many calls at once. Wait for the `retry-after` seconds, then retry. |
| 500 | `internal_error` | Something broke on our side. Retry; 5xx errors are free. |
| 502 | `upstream_error` | The platform didn't give a usable answer. Retry; 5xx errors are free. |
| 503 | `upstream_busy` | All our connections to the platform are busy. Retry in a few seconds; 5xx errors are free. |
| 504 | `upstream_timeout` | The platform took over 30 seconds to answer. Retry; timeouts are free. |

## Use it in Claude

Once LurkAPI is [connected to Claude](https://lurkapi.com/docs.md#claude), this endpoint is the `account_credit_balance` tool. Ask in plain English, for example:

Ask Claude:

```text
Use LurkAPI's account_credit_balance with  and summarize what you find.
```

Claude calls `account_credit_balance` with arguments like these:

Tool arguments:

```json
{}
```

Tool results skip nulls and empty lists to save tokens.

---

Previous: [Linktree page](https://lurkapi.com/docs/linkinbio/linktree.md)
