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

> Search and browse programming problems from pbinfo.ro, a Romanian informatics learning platform, with detailed information including problem statements, constraints, and metadata. Discover problems by keyword search or explore them by category with easy pagination through organized collections.

**Category:** Education | **Website:** [www.pbinfo.ro/articole/16/subiecte-de-la-examene](https://www.pbinfo.ro/articole/16/subiecte-de-la-examene) | **Docs:** [parse.bot/marketplace/f1f4de09-9248-4c1d-9bcb-b7e6076b8ed9/pbinfo-ro-api](https://parse.bot/marketplace/f1f4de09-9248-4c1d-9bcb-b7e6076b8ed9/pbinfo-ro-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/pbinfo/`
**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 problem

Get detailed information about a specific programming problem by its numeric ID. Returns the full problem statement, metadata (class level, difficulty, time/memory limits, author), category breadcrumbs, tags, and count of submitted solutions. The problem_id can be obtained from search_problems or list_problems results.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `problem_id` | string | Yes | Numeric problem ID (e.g. '255' for Fibonacci, '4906' for numere_p10). Can be obtained from search_problems or list_problems results. |

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

### List problems

List programming problems within a specific category. Returns paginated results with 10 problems per page. Use the start parameter (offset) to paginate through results. Each problem includes id, name, URL, summary text, and difficulty level.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category_id` | string | Yes | Numeric category ID from the site (e.g. '7' for Structuri repetitive, '5' for Cifrele unui numar, '18' for Divizibilitate). Corresponds to the tag ID in the site URL. |
| `start` | string | No | Zero-based offset for pagination. Each page shows 10 problems, so use 0, 10, 20, etc. |

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

### Search problems

Full-text search over the problem catalog via autocomplete. Returns matching problem names and IDs ranked by relevance. Server returns up to ~30 top matches; no pagination. Each result carries the numeric problem ID usable with get_problem.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `term` | string | Yes | Search term to find problems by name (e.g. 'fibonacci', 'matrice', 'sortare'). |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/credits/pbinfo/search-problems \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"term":"<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.