# Build with an AI Agent

Everything an AI coding agent needs to integrate Aurea: where the machine-readable docs are, the rules every call follows, and the order of the calls for each service.

## Sources to Give the Agent

- **OpenAPI 3.0:** `https://api.aureahub.com/v1/docs/json` — every public route with its parameters, bodies, answers and status codes. It is the reference when a page and the spec disagree.
- **The docs as Markdown:** `https://docs.aureahub.com/llms.txt` (index), `https://docs.aureahub.com/llms-full.txt` (every page in one file), and `https://docs.aureahub.com/docs/<page>.md` for one page.

## Rules Every Call Follows

- **Base URL** `https://api.aureahub.com`; JSON in and out.
- **Two ways to authenticate.** User calls send `Authorization: Bearer <access token>`. Calls from the tenant's server are signed with the tenant's API key and secret (three headers, see [Authentication](https://docs.aureahub.com/docs/authentication.md)). The API secret stays on the server.
- **Environments.** `isTestnet: true` (in the body, or the query of a GET) selects the sandbox; omitted means production.
- **Errors** answer `{ statusCode, error, message, details }`. Branch on `details.code`, never on `message` (see [Error Handling](https://docs.aureahub.com/docs/errors.md)).
- **Idempotency.** Routes that create money movements accept `Idempotency-Key`; retry with the same key and the same body (see [Idempotency](https://docs.aureahub.com/docs/idempotency.md)).
- **Amounts** are decimal strings, never floats (see [Amount Units](https://docs.aureahub.com/docs/amounts.md)).
- **Statuses only move forward**; treat an unknown status as not final.
- **Events** reach the tenant's server as signed `POST`s; verify the signature before trusting one (see [Events to Your Server](https://docs.aureahub.com/docs/guide-events.md)).

## Recipes

- **Users and wallets:** [User Onboarding](https://docs.aureahub.com/docs/guide-user-onboarding.md), then [Sending a Transaction](https://docs.aureahub.com/docs/guide-send-transaction.md).
- **Bank ramp** (a virtual account in the user's name, deposits to crypto, crypto to a bank account): [Bank Pay-In](https://docs.aureahub.com/docs/guide-fiat-payin.md) and [Bank Payout](https://docs.aureahub.com/docs/guide-fiat-payout.md).
- **Card onramp for your app's users:** [Card to Crypto](https://docs.aureahub.com/docs/guide-card-onramp.md).
- **Card onramp for wallets you already hold:** [For Your Own Wallets](https://docs.aureahub.com/docs/guide-card-onramp-wallets.md) — three server calls, no user account.

## A Prompt to Start From

Give the agent the two sources above and a brief like this one, adapted to your stack:

```
Integrate the Aurea card onramp for wallets we already hold.
Read https://docs.aureahub.com/llms-full.txt and the OpenAPI spec at
https://api.aureahub.com/v1/docs/json. Sign server calls as the
Authentication page describes, keep the API secret in server config,
send the end user's IP as customerIp, use our order id as the
Idempotency-Key, branch on details.code, verify event signatures,
and test everything with isTestnet: true first.
```

---

Web version: https://docs.aureahub.com/#build-with-ai
