# Lockcodes — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search for lock key codes, pin charts, and key blank cross-references to find the right locksmith information for your projects. Access cylinder types, combination counters, and comprehensive key blank data with flexible free demo or subscription options.

**Category:** Other | **Website:** [lockcodes.com/](https://lockcodes.com/) | **Docs:** [parse.bot/marketplace/417c3320-d511-4e65-aa1f-15fb0e1c5706/lockcodes-com-api](https://parse.bot/marketplace/417c3320-d511-4e65-aa1f-15fb0e1c5706/lockcodes-com-api)

Pay-per-use API proxy for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/lockcodes/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## Endpoints

### Combination counter

Calculate the number of possible key combinations based on spaces, depths, and MACS (Maximum Adjacent Cut Specification) rules. Also reports pullout count and explanation. MACS must be less than depths for valid results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `depths` | integer | Yes | Number of available depth values. |
| `macs` | integer | Yes | Maximum Adjacent Cut Specification value. Must be less than depths. |
| `spaces` | integer | Yes | Number of key spaces (positions on the key). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/lockcodes/combination-counter \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"depths":"<integer>","macs":"<integer>","spaces":"<integer>"}'
```

### Names listing search

Search the lock name listing for blank cross-references. Performs case-insensitive substring matching against a static cross-reference database. Returns matching lock names with pipe-separated cross-reference details. An empty results array indicates no matches were found for the query.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Lock name to search for (e.g. Abus, Master, Schlage). Case-insensitive substring match. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/lockcodes/names-listing-search \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"query":"<string>"}'
```

### Pinitnow get pin chart

Generate a pinning chart for a specific cylinder type and key cuts. Returns a text representation of the pin chart including top/bottom pin assignments and pin lengths in thousandths. The chart includes standard, OEM, .005, and .003 kit lengths. Accepts change key cuts (required) and optional master/control key cuts.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `change_cuts` | string | Yes | Cuts for the change key as a digit string (e.g. 1234). Length depends on cylinder type. |
| `control_cuts` | string | No | Cuts for the control key as a digit string. When omitted, no control key is included. |
| `cylinder_slug` | string | Yes | Cylinder slug identifying the lock type. Obtain from pinitnow_list_cylinder_types endpoint. |
| `master_cuts` | string | No | Cuts for the master key as a digit string. When omitted, chart is generated for change key only. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/lockcodes/pinitnow-get-pin-chart \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"change_cuts":"<string>","control_cuts":"<string>","cylinder_slug":"<string>","master_cuts":"<string>"}'
```

### Pinitnow list cylinder types

List all available cylinder types for the Pin It Now! pinning calculator. Returns cylinder names, slugs (used as input to pinitnow_get_pin_chart), and template strings. The full catalog is returned in a single response with no pagination.

**Estimated cost:** Metered

_No parameters required._

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/lockcodes/pinitnow-list-cylinder-types \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.