---
title: API keys for platforms: Lorg Check docs
description: How a platform calls Lorg Check with an API key: the header, live and test keys, limits, safe retries, caching, and reading its own usage.
url: https://lorglabs.com/docs-api-keys.html
---

# API keys for platforms

For a platform that checks for many users or agents: one HTTPS call before each trade, with a key. No payment per call. Free during a [pilot](https://lorglabs.com/platforms.md), then a monthly plan agreed together.

## Sending the key

```
POST https://api.lorglabs.com/v1/check/token
Authorization: Bearer lorg_live_…
Content-Type: application/json

{ "chain": "base", "address": "0x…", "context": "swap", "amount_usd": 500 }
```

- **Header**: `Authorization: Bearer lorg_…`, or `X-API-Key: lorg_…`.
- **Live and test**: `lorg_live_…` keys work on `api.lorglabs.com`; `lorg_test_…` keys on the sandbox, `staging.lorglabs.com`. A key sent to the wrong one is refused with a message that says so.
- **Never charged twice**: A call with a key is never charged over x402. Usage is counted for the monthly invoice, and only answers count (allow, caution, block).
- **Keep it on a server**: A key belongs in your backend, not in a web page or an app a user can open.
- **Getting one**: Write to [info@lorglabs.com](mailto:info@lorglabs.com), or [start a pilot](https://lorglabs.com/platforms.md). Tell us at once if a key may have leaked, and we replace it.

## Limits

A key starts at **60 checks a minute and 5,000 a day**, raised on request. Over either, the reply is `429 RATE_LIMITED` with `Retry-After`, and is not counted. Checks refused by the minute's limit don't use up the day's.

## Retrying safely

Send an `Idempotency-Key` header (any 1 to 255 printable characters, for example a UUID) with each request. A retry with the same key within 24 hours returns the original signed answer, with `Idempotent-Replayed: true`, and is counted once.

- **Same key, other request**: `422 IDEMPOTENCY_KEY_REUSED`: a different address or trade size needs a new key.
- **First still running**: `409 IDEMPOTENCY_IN_PROGRESS` with `Retry-After`.

## How fresh an answer is

An answer may come from a short cache: `cached` is `true` and `as_of` says when it was computed. At most 30 seconds for most tokens, 60 seconds for wallets, 5 minutes for well-known tokens, and 10 minutes for blocks that don't lift (sanctioned, a known scam, a sale that fails). Answers with a failed check are never cached. Send `Cache-Control: no-cache` for a fresh check.

## Your usage

`GET /v1/usage` with your key shows what it has been used for: checks by day, by endpoint and by answer, what they would cost at list price, and where the key stands against its limits. Add `?month=2026-10` for a whole month, or `?days=7` for the last days (1 to 92); the default is the current month so far. Reading it is free and uses none of your limits.

```
curl https://api.lorglabs.com/v1/usage -H "Authorization: Bearer lorg_live_…"
```

## The same key in MCP

The key also works for the [MCP tools](https://lorglabs.com/docs-mcp.md), at `https://api.lorglabs.com/mcp`, counted the same way.
