# Decomp — 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.

> Track decompilation projects and monitor progress on decomp.me by viewing recent scratches, diving into project details, exploring user contributions, and checking overall site statistics. Perfect for staying updated on code decompilation work and community activity across the platform.

**Category:** Developer Tools | **Website:** [decomp.me/](https://decomp.me/) | **Docs:** [parse.bot/marketplace/66d7b08f-fc32-45a0-ac72-7cc284db2b9d/decomp-me-api](https://parse.bot/marketplace/66d7b08f-fc32-45a0-ac72-7cc284db2b9d/decomp-me-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/decomp/`
**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

### Get recent scratches

Retrieve the latest decompilation projects and site activity. Returns a paginated list of scratch projects sorted by the specified ordering. Each result is a summary containing slug, owner, name, platform, compiler, score, and timestamps. Paginates via cursor.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cursor` | string | No | Opaque pagination cursor for fetching subsequent pages. |
| `has_owner` | string | No | Filter for scratches with a registered owner. Accepted values: 'true', 'false'. |
| `ordering` | string | No | Sort order for results. |
| `page_size` | string | No | Number of results per page. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/decomp/get-recent-scratches \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"cursor":"<string>","has_owner":"<string>","ordering":"<string>","page_size":"<string>"}'
```

### Get scratch detail

Retrieve full details for a specific scratch project, including source code, context, compiler flags, and version family history. The family array shows all related versions of this scratch. A separate round-trip fetches family data.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `slug` | string | Yes | Unique alphanumeric identifier for the scratch (e.g. 'ypP2f'). Obtainable from get_recent_scratches results[*].slug or get_user_contributions results[*].slug. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/decomp/get-scratch-detail \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"slug":"<string>"}'
```

### Get stats

Retrieve site-wide statistics including total assembly instruction count, scratch count, and registered GitHub user count. No parameters required. Returns a single object with aggregate counts.

**Estimated cost:** Metered

_No parameters required._

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

### Get user contributions

Retrieve all contributions (scratches) for a specific user. Returns a paginated list of the user's scratch projects sorted by the specified ordering. Paginates via cursor.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `cursor` | string | No | Opaque pagination cursor for fetching subsequent pages. |
| `ordering` | string | No | Sort order for results. |
| `page_size` | string | No | Number of results per page. |
| `username` | string | Yes | GitHub/decomp.me username (e.g. 'sonicdcer'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/decomp/get-user-contributions \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"cursor":"<string>","ordering":"<string>","page_size":"<string>","username":"<string>"}'
```

## 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.