# Luhn Check & Card Brand Detector

> Luhn Check & Card Brand Detector is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Validates a number against the Luhn checksum algorithm and identifies the payment card brand (Visa, Mastercard, Amex, etc.).

## Facts

- Endpoint: POST https://api.24klabs.ai/api/v1/luhn-check
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/luhn-check-card-brand-detector-22f5edd7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Dg8p35dwAr5FDUy_qa--_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability luhn-check-card-brand-detector-22f5edd7 -d '<json body>'
```

Example prompt: Check if the card number 4532015112830366 is valid and tell me what brand it is — run a Luhn checksum on it.

## When to prefer this

Use this endpoint when you need a fast, lightweight structural validation of a payment card number — confirming it's not a random or mistyped string via Luhn checksum — and simultaneously want to identify the card brand without calling a full payment processor. Ideal for form validation, fraud screening, or routing logic before any actual payment transaction.

## Known failure modes

- Invalid or missing card number in request body returns an error
- Non-numeric characters in the card number may cause a parse error
- Very short or empty strings may fail validation with an error response
- Unknown card prefixes may return null or unknown for brand even if Luhn passes

## How this service works

Validate a number by the Luhn checksum and detect the card brand.

## Output

Returns whether the card number passes the Luhn checksum (true/false) and the detected card brand (e.g. Visa, Mastercard, American Express, Discover, etc.).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "number": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "brand": "Visa",
  "valid": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/luhn-check-card-brand-detector-22f5edd7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
