> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorage.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Call a paid API

> Your agent calls an API that charges per request, and pays for that one request from its budget.

Your agent calls an API that charges per request, and pays for that one request from its budget.

## How it works

The API answers with a price, and Anchorage pays it from the agent's budget. An API that also needs its own key gets it from the headers the agent sends. For the full flow and what the agent gets back, see [Crypto payments](https://docs.anchorage.com/agentic-banking/concepts/payments.md).

## What the agent provides

* The API endpoint to call.
* An idempotency key, unique per intent.
* The budget to draw on (`budget_id`).
* Optional: HTTP method, headers, body. Defaults to `GET` with no body.

## Check the price first

The agent can check what a call will cost without paying. For a metered merchant, the price is the per-request maximum, and the charge can be lower.

## When a payment fails

See [Errors and retries](https://docs.anchorage.com/agentic-banking/reference/errors-and-retries.md) for which failures to retry, and with which idempotency key.


## Related topics

- [Quickstart](https://docs.anchorage.com/agentic-banking/quickstart.md)
- [Introduction](https://docs.anchorage.com/knowledge-base/porto/api-reference/introduction.md)
- [Paid inference](https://docs.anchorage.com/agentic-banking/concepts/inference.md)
- [Call a text model](https://docs.anchorage.com/agentic-banking/guides/call-a-text-model.md)
