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

> Search and explore Gitee repositories by category, view repository metadata and contents, and discover projects from specific users. Access commit history, file structures, and repository details all in one place.

**Category:** Developer Tools | **Website:** [gitee.com/](https://gitee.com/) | **Docs:** [parse.bot/marketplace/468fc2fc-26f3-4868-ae86-fbb6ad94860f/gitee-com-api](https://parse.bot/marketplace/468fc2fc-26f3-4868-ae86-fbb6ad94860f/gitee-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/gitee/`
**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 repository

Fetch full details of a single repository by owner and repo name. Returns comprehensive metadata including stars, forks, language, project labels, namespace information, license, and timestamps. The response includes the full owner/assigner user objects and project membership details.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner (user or organization) path. |
| `repo` | string | Yes | Repository name path. |

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

### Get repository type

Retrieve classification fields for a repository, including its category labels, GVP (Gitee Most Valuable Project) status, and recommendation status. The project_labels array may be empty for repositories without configured labels.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner (user or organization) path. |
| `repo` | string | Yes | Repository name path. |

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

### Get user

Get public profile information for a Gitee user including follower counts, bio, public repository count, and contact information. Returns 404 for non-existent usernames.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `username` | string | Yes | Gitee username. |

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

### List repo commits

List commits for a repository with pagination. Returns array of commit objects including SHA, author, committer, and message. Ordered by date descending (newest first).

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner. |
| `page` | integer | No | Page number. |
| `repo` | string | Yes | Repository name. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/gitee/list-repo-commits \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","page":"<integer>","repo":"<string>"}'
```

### List repo contents

List files and directories in a repository path. Returns array of content objects with type (dir or file), name, path, SHA, and URLs. Omitting path returns the root directory contents.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `owner` | string | Yes | Repository owner. |
| `path` | string | No | Directory path within the repository. Omitting returns the root directory contents. |
| `repo` | string | Yes | Repository name. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/gitee/list-repo-contents \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"owner":"<string>","path":"<string>","repo":"<string>"}'
```

### List user repos

List public repositories for a specific user. Returns paginated array of repository objects with full metadata including stars, forks, language, and timestamps.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `page` | integer | No | Page number. |
| `per_page` | integer | No | Results per page (max 100). |
| `username` | string | Yes | Gitee username. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/gitee/list-user-repos \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"page":"<integer>","per_page":"<integer>","username":"<string>"}'
```

### Search repositories

Search for repositories by keyword using Gitee's search service. Returns paginated results with metadata including star counts, languages, and descriptions. At least one of 'query' or 'name' must be provided.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `name` | string | No | Filter by repository name. When provided alongside query, both terms are combined. When provided alone, searches specifically for repositories matching that name (e.g. "agent"). |
| `page` | integer | No | Page number. |
| `per_page` | integer | No | Results per page. |
| `query` | string | No | General search keyword matching repository title, description, and content. |

```bash
curl -X POST https://api.beta.paywithlocus.com/api/wrapped/credits/gitee/search-repositories \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"<string>","page":"<integer>","per_page":"<integer>","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.