# Build with AI agents

> Give Claude Code, Codex, Cursor or any coding agent the context it needs to integrate HireLayer correctly: llms.txt, Markdown pages, OpenAPI and a ready-made rules file.

Source: https://onlineresumeparser.com/api-docs/ai-agents · Markdown: https://onlineresumeparser.com/api-docs/ai-agents.md

The documentation is published in machine-readable formats generated from the same source as these pages, so agents read exactly what you read.

## Machine-readable documentation

| Resource | Contents |
| --- | --- |
| [`/llms.txt`](https://onlineresumeparser.com/llms.txt) | Index of every page with a one-line summary, following the llms.txt convention. |
| [`/llms-full.txt`](https://onlineresumeparser.com/llms-full.txt) | The whole documentation in one Markdown file. |
| `/api-docs/<page>.md` | Any page as clean Markdown, e.g. [`/api-docs/extract.md`](https://onlineresumeparser.com/api-docs/extract.md). |
| [`/openapi.json`](https://onlineresumeparser.com/openapi.json) · [`/openapi.yaml`](https://onlineresumeparser.com/openapi.yaml) | OpenAPI 3.1 description of every endpoint, schema and error, for code generators, Postman or Insomnia. |
| [`/api-docs/agent-rules.md`](https://onlineresumeparser.com/api-docs/agent-rules.md) | The rules file below, ready to download. |

## Prompt your coding agent

Paste a prompt like this one in Claude Code, Codex or Cursor. The agent fetches the docs it needs.

```text
Read https://onlineresumeparser.com/api-docs/extract.md and https://onlineresumeparser.com/llms.txt, then help me integrate HireLayer CV Extract (resume parsing) into my project. Follow the documented authentication, timeouts, retries and error handling, and do not invent fields or endpoints.
```

Every page also has **Copy page** (its Markdown), **Copy for AI** (the page plus integration rules) and **Open in ChatGPT** or **Claude** actions. Each endpoint has its own **Copy for AI** button.

## Add project rules

Commit these rules to the repository that calls HireLayer, so every agent session follows them: authentication, timeouts, retries, limits and the exact endpoints.

| Agent | File |
| --- | --- |
| Codex, Cursor, and most agents | `AGENTS.md` at the repository root |
| Claude Code | `CLAUDE.md`, or `@AGENTS.md` imported from it |
| Cursor (project rule) | `.cursor/rules/hirelayer.mdc` |
| GitHub Copilot | `.github/copilot-instructions.md` |

```bash
curl -o AGENTS.md https://onlineresumeparser.com/api-docs/agent-rules.md
```

**AGENTS.md**

```markdown
# HireLayer API

This project calls the HireLayer recruiting APIs (resume parsing, job criteria extraction, candidate matching and ranking, skills normalization). Follow these rules when writing or changing that code.

## HireLayer integration rules

- Base URL: `https://onlineresumeparser.com/api`. HTTPS only. There is no official SDK and no MCP server: call the REST API directly (Python `requests`, Node.js 18+ `fetch`).
- Authentication: header `X-API-Key` on every request except `GET /api/v1/health`. Read the key from the `HIRELAYER_API_KEY` environment variable. Never hard-code it, log it, or send it from browser or mobile code. `Authorization: Bearer` is not supported.
- Every call is synchronous; there are no jobs to poll.
- Timeouts: use a client timeout of at least 150 s for `POST /api/v3/parser` and 65 s for `/api/v1/*`.
- Retries: retry 5xx responses and connection failures at most 3 times with exponential backoff and jitter; honour `Retry-After`. Never retry 4xx responses unchanged. There is no idempotency key.
- Errors: every error body has an `error` string. CV Extract errors add a `code` (`INVALID_FILE`, `DOCUMENT_NOT_A_RESUME`, `DOCUMENT_TEXT_EMPTY`, `DOCUMENT_UNREADABLE`, `DOCUMENT_TOO_LARGE`, `PARSER_UNAVAILABLE`). Job Extract, Match, Rank and Skills validation errors are `{"success": false, "error": "…"}` with status 400.
- Credits: each successful call costs 1 credit, whatever the API. `403` means no credit left.
- JSON bodies: Job Extract, Match and Rank reject unknown fields with 400. Text fields are trimmed and limited to 50,000 characters. Skills match takes `skill` or `skills` (≤ 100 items), never both.
- CV Extract: send the file as the multipart field `file` (about 4.5 MB max). On 200, `status` is always `"success"`; `upstream_status: "partial"` means optional steps were skipped. `info_resume.text` can reach 100,000 characters: truncate it to 50,000 before sending it to Match or Rank. Send `do_not_store_data=true` when the resume file must not be stored: HireLayer then does not store it and `info_resume.url` is `null`.
- Generated text (Job Extract labels and rationales, Match summaries and explanations, Rank rationales) is in French.
- Do not invent fields, endpoints or parameters. When unsure, read the OpenAPI document or the Markdown reference.

## Endpoints

- `POST /api/v3/parser` — HireLayer CV Extract: Upload one resume file and receive the structured candidate profile in the same response. (multipart/form-data, client timeout ≥ 150 s). Docs: https://onlineresumeparser.com/api-docs/extract.md
- `POST /api/v1/jobs/extract-criteria` — HireLayer Job Extract: Turn a job description into weighted criteria that can be checked against a resume. (JSON body, client timeout ≥ 65 s). Docs: https://onlineresumeparser.com/api-docs/job-extract.md
- `POST /api/v1/matching/job-candidate` — HireLayer Match: Evaluate one resume against each job criterion and get an explained 0–1 score. (JSON body, client timeout ≥ 65 s). Docs: https://onlineresumeparser.com/api-docs/match.md
- `POST /api/v1/matching/job-candidates/rank` — HireLayer Rank: Order up to 10 candidates for one job description, with a score and a rationale for each. (JSON body, client timeout ≥ 65 s). Docs: https://onlineresumeparser.com/api-docs/rank.md
- `POST /api/v1/skills/match` — HireLayer Skills: Map free-text skills, one or up to 100 at a time, to the closest catalog skills. (JSON body, client timeout ≥ 65 s). Docs: https://onlineresumeparser.com/api-docs/skills.md
- `GET /api/v1/skills` — HireLayer Skills: Download the whole reference catalog used for matching. (no body, client timeout ≥ 65 s). Docs: https://onlineresumeparser.com/api-docs/skills.md
- `GET /api/v1/health` — Platform: Check that the Job Extract, Match, Skills and Rank service is up. No API key needed. (no body, client timeout ≥ 10 s, no API key). Docs: https://onlineresumeparser.com/api-docs/health.md
- `POST /api/v2/parser` — HireLayer CV Extract: Legacy asynchronous contract: the request is accepted with `202` and the result is posted to `webhook_url`. (multipart/form-data, client timeout ≥ 50 s, LEGACY, do not use for new code). Docs: https://onlineresumeparser.com/api-docs/extract-v2.md

## References

- Index for agents: https://onlineresumeparser.com/llms.txt
- Full documentation in one file: https://onlineresumeparser.com/llms-full.txt
- OpenAPI 3.1: https://onlineresumeparser.com/openapi.json

```

## SDKs and MCP

HireLayer has no SDK and no MCP server: the API is plain HTTPS with one header, which agents handle reliably with the docs above. For typed clients, generate one from [`/openapi.json`](https://onlineresumeparser.com/openapi.json).

## Next

- [Quickstart](https://onlineresumeparser.com/api-docs/quickstart.md): Create an API key, check connectivity and parse a resume with cURL, Python or TypeScript in about five minutes.
- [Build a screening pipeline](https://onlineresumeparser.com/api-docs/screening-pipeline.md): Chain HireLayer CV Extract, Job Extract, Rank and Match to parse resumes, score them against a job and explain the result.
