# Git Scm — 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.

> Access comprehensive Git documentation, browse command references across different versions, and explore chapters from the Pro Git book. Search Git documentation and glossary terms to quickly find answers about Git commands and concepts.

**Category:** Developer Tools | **Website:** [git-scm.com/](https://git-scm.com/) | **Docs:** [parse.bot/marketplace/09febc24-0c88-43a1-9e14-d4c8b693d105/git-scm-com-api](https://parse.bot/marketplace/09febc24-0c88-43a1-9e14-d4c8b693d105/git-scm-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/git-scm/`
**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 commands list

Get a flat list of all Git commands with their categories and documentation URLs. Returns the total count and an array of command objects. Useful for discovering available commands before fetching their full documentation.

**Estimated cost:** Metered

_No parameters required._

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

### Get book chapter

Get full content of a Pro Git book chapter section as plain text. The chapter_slug identifies the specific section within a chapter. Returns the section title and full text content.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `chapter_slug` | string | Yes | The slug of the chapter/section (e.g. Getting-Started-About-Version-Control, Git-Basics-Getting-a-Git-Repository). Obtain slugs from the get_book_toc endpoint by extracting the last path segment from section URLs. |

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

### Get book toc

Get the table of contents for the Pro Git book, organized by chapters and sections. Each chapter contains a title and an array of sections with their titles and URL paths. Use section URLs to derive slugs for the get_book_chapter endpoint.

**Estimated cost:** Metered

_No parameters required._

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

### Get command doc

Get full documentation for a specific Git command. Returns the command name, page title, and all documentation sections as a mapping of section name to content text. Section names typically include NAME, SYNOPSIS, DESCRIPTION, OPTIONS, EXAMPLES, etc.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `command` | string | Yes | The Git command name in its hyphenated form (e.g. git-commit, git-merge, git-log, git-push, git-pull, git-clone, git-add, git-status) |

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

### Get command doc by version

Get documentation for a specific version of a Git command. If the exact version does not exist for that command, the site may redirect to the nearest available version. Returns command name, version, title, and documentation sections.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `command` | string | Yes | The Git command name in its hyphenated form (e.g. git-commit, git-merge, git-log) |
| `version` | string | Yes | The Git version string (e.g. 2.40.0, 2.45.0, 2.53.0). The site may redirect to the nearest available version if the exact version does not exist for the command. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/git-scm/get-command-doc-by-version \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"command":"<string>","version":"<string>"}'
```

### Get glossary

Get the full Git glossary. Returns a mapping of term names to their HTML description strings, along with a total count of terms. Covers all official Git terminology.

**Estimated cost:** Metered

_No parameters required._

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

### Get homepage

Get the Git homepage content including navigation links, content blocks, and the latest released Git version number. Returns a single Homepage object with the current state of the git-scm.com front page.

**Estimated cost:** Metered

_No parameters required._

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

### Get reference index

Get the reference index of all Git commands organized by category. Each category contains a name and an array of commands with their names and documentation URLs. Useful for browsing the full command taxonomy.

**Estimated cost:** Metered

_No parameters required._

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

### Search docs

Search for commands and glossary terms by keyword. Performs a case-insensitive search across the Git glossary term names and descriptions, and the command reference index. Results include a type field indicating whether the match is a glossary term or a command.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `query` | string | Yes | The search keyword (case-insensitive). Matches against glossary term names, glossary descriptions, and command names. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/git-scm/search-docs \
  -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://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.