# Onboard with AI

> Onboard with Claude Code, Codex, Cursor or Copilot: connect the docs, paste one prompt, review the diff.

Section: Get started
Source: https://statementbear.com/docs/onboard-with-ai
Product: StatementBear statement parsing API, $0.49 per document, 25 free.

---

Your coding assistant can write the whole integration. Give it the documentation, paste the prompt below, and review what it writes.

## 1. Create a key

Open the [developer console](https://statementbear.com/dashboard/api). Put the live key in `STATEMENTBEAR_KEY` and the test key in `STATEMENTBEAR_TEST_KEY`, in your environment or secret store. Do not paste either key into the chat.

## 2. Give it the documentation

Connect the [MCP server](https://statementbear.com/docs/mcp) so the assistant can search these pages while it works. Without MCP, the prompt points it at [/docs/llms-full.txt](https://statementbear.com/docs/llms-full.txt), which is the whole documentation in one file.

## 3. Paste the prompt

Works in Claude Code, Cursor, Codex, Copilot or any assistant that can read a URL and edit your project.

Prompt:

```text
Integrate the StatementBear bank statement parsing API into this project.

Read the documentation first: https://statementbear.com/docs/llms-full.txt
If the StatementBear MCP server (https://statementbear.com/api/mcp) is connected, use it to look things up instead.

Requirements:
- POST each statement PDF to https://statementbear.com/api/v1/documents as the raw body with Content-Type: application/pdf.
- Read the API key from the STATEMENTBEAR_KEY environment variable. Never hardcode or commit a key.
- Send an Idempotency-Key header with every request: one unique value per document, reused on every retry of that document.
- Set a client timeout of at least 180 seconds.
- Retry 429 and 5xx responses with exponential backoff. Do not retry any other error.
- Only count credits as income on accounts with type "bank".
- When verification.reconciled is false, send the document to manual review instead of using its totals.
- Write tests that call the API with a test key from STATEMENTBEAR_TEST_KEY, using the X-Test-Scenario header to cover credit_card, multi_account, unreconciled and the error scenarios. Test calls are free.

Follow this project's existing conventions for HTTP clients, configuration and tests. When you are done, list what you changed and what I need to configure.
```

## 4. Review the result

- **No key in the code.** Search the diff for `sb_live_` and `sb_test_`.
- **Income only from bank accounts.** Credits on a `credit_card` account are repayments and refunds. See [Amounts and directions](https://statementbear.com/docs/amounts-and-directions).
- **A review path for unreconciled documents.** Run the tests with the `unreconciled` scenario and check where the document ends up. See [Verification](https://statementbear.com/docs/verification).
- **One idempotency key per document.** A new key on every retry means a timeout can be charged twice. See [Idempotency and retries](https://statementbear.com/docs/idempotency).

> **The tests cost nothing**
>
> Calls with a test key return fixture documents and are never billed. See [Test mode](https://statementbear.com/docs/test-mode).

Then work through [Going live](https://statementbear.com/docs/going-live) before real customers' statements reach it.

---

All documentation: https://statementbear.com/docs/llms.txt
Questions: api@statementbear.com
