# Help Perforce — 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.

> Access detailed documentation and reference materials for Perforce Helix Core commands, including command syntax, client configuration options, form fields, and system configurables. Search through the complete P4 command reference to find specific commands, view their parameters, and understand client submission and line ending options.

**Category:** Developer Tools | **Website:** [help.perforce.com/](https://help.perforce.com/) | **Docs:** [parse.bot/marketplace/c2ec7d39-4890-4306-b9a4-301307e00285/help-perforce-com-api](https://parse.bot/marketplace/c2ec7d39-4890-4306-b9a4-301307e00285/help-perforce-com-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/help-perforce/`
**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 client form fields

Extracts all form field definitions from the p4 client spec documentation. Each field includes a type hint inferred from the description text.

**Estimated cost:** Metered

_No parameters required._

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

### Get client line end options

Extracts all LineEnd field values from the p4 client documentation. These control how line endings are handled for files in the workspace.

**Estimated cost:** Metered

_No parameters required._

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

### Get client options field

Returns all valid values for the Options field of a p4 client spec, including both affirmative and negated ([no]-prefixed) variants, along with their descriptions and defaults.

**Estimated cost:** Metered

_No parameters required._

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

### Get client page

Fetches the full p4 client command reference page including syntax, description, form fields, options, and examples. Returns comprehensive data about the client workspace specification.

**Estimated cost:** Metered

_No parameters required._

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

### Get client submit options

Extracts all SubmitOptions field values from the p4 client documentation. These control what happens to unchanged files during a submit operation.

**Estimated cost:** Metered

_No parameters required._

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

### Get command page

Fetches the documentation page for a specific p4 command. Returns syntax, description, options, usage notes, and examples. The command_name is normalized to a file path internally.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `command_name` | string | Yes | Command name such as 'p4 sync', 'p4 add', 'p4 client'. Can also be specified without the 'p4' prefix (e.g. 'sync'). |

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

### Get command reference index

Fetches the alphabetical command reference index page. Returns all p4 commands with their documentation URLs. The full index is returned in a single response with no pagination.

**Estimated cost:** Metered

_No parameters required._

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

### Get configurables reference

Fetches the Configurables reference section of the P4 CLI documentation. Returns all server/client/proxy configurables with their defaults and descriptions.

**Estimated cost:** Metered

_No parameters required._

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

### Search documentation

Searches the P4 CLI documentation using the client-side search index. Performs a token-based match where all space-separated words in the query must appear in the title or abstract of a topic. Searches the first 3 index chunks; results may not cover all documentation pages.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | Search keyword or phrase. All space-separated tokens must appear in a topics title or abstract to match. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/help-perforce/search-documentation \
  -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.