# React Bits — Wrapped API

> **You are on:** `https://api.beta.paywithlocus.com/api` | [llms.txt](https://beta.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.

> Browse and search React component libraries from React Bits, then instantly retrieve component source code, installation commands, and prop definitions. Get organized access to all available components and their categories to speed up your development workflow.

**Category:** Developer Tools | **Website:** [reactbits.dev/](https://reactbits.dev/) | **Docs:** [parse.bot/marketplace/6b437a90-3d15-4e89-9297-dbca483bcae9/reactbits-dev-api](https://parse.bot/marketplace/6b437a90-3d15-4e89-9297-dbca483bcae9/reactbits-dev-api)

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

## Access

**Base URL:** `https://api.beta.paywithlocus.com/api/wrapped/credits/react-bits/`
**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 all categories

List all component categories used to organize the reactbits.dev navigation. Returns the four main groupings: Text Animations, Animations, Components, and Backgrounds.

**Estimated cost:** Metered

_No parameters required._

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

### Get component

Get full details for a specific component including source code files, npm dependencies, and extracted TypeScript/JSX interface props. Accepts either the display name (e.g. 'Shuffle') or the full registry name with variant suffix (e.g. 'Shuffle-TS-CSS'). When only a display name is given, defaults to the TS-CSS variant.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Component display name (e.g. 'Shuffle') or full registry name with variant suffix (e.g. 'Shuffle-TS-CSS'). Accepted variant suffixes: -TS-CSS, -TS-TW, -JS-CSS, -JS-TW. |

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

### Get component install command

Get the npx shadcn CLI installation command and npm dependencies for a component. The command uses the shadcn registry URL format.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Component display name (e.g. 'Shuffle') or full registry name with variant suffix (e.g. 'Shuffle-TS-CSS'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/react-bits/get-component-install-command \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>"}'
```

### Get component props

Get only the extracted TypeScript/JSX interface properties (props) for a component, parsed from its source code. Each prop includes the property name, TypeScript type annotation, whether it is optional, and any inline comment description.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Component display name (e.g. 'Shuffle') or full registry name with variant suffix (e.g. 'Shuffle-TS-CSS'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/react-bits/get-component-props \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>"}'
```

### Get component source code

Get only the source code files for a component including CSS and TSX/JSX files with their full content. Each file object includes a type label, relative path, and the complete file source.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | Yes | Component display name (e.g. 'Shuffle') or full registry name with variant suffix (e.g. 'Shuffle-TS-CSS'). |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/react-bits/get-component-source-code \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>"}'
```

### List all components

List all available UI components from the reactbits registry. Returns deduplicated components grouped by display name with their available variants (JS/TS, CSS/TW). Each entry carries just enough metadata for discovery; call get_component for full source and props.

**Estimated cost:** Metered

_No parameters required._

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

### Search components

Search for components by matching the query string against component display names, registry names, and descriptions. Returns matching components with summary metadata. The match is case-insensitive substring search.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search query string to match against component names, registry names, and descriptions. |

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

## Next steps

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