# API reference

> Reference for every public object of ai-economy-sdk, x402-algorand and x402-avm-js, generated from the source.

- [ai-economy-sdk](https://x402-avm.github.io/reference/python/ai-economy-sdk/index.md)
`PaymentGate`, `AIEconomySDK`, `paid_mcp_session`, identity, network helpers. Python.
- [x402-algorand](https://x402-avm.github.io/reference/python/x402-algorand/index.md)
Registration helpers, scheme classes, signer protocols, utilities, constants. Python.
- [x402-avm-js](https://x402-avm.github.io/reference/js/index.md)
Payments, spend controls, identity, networks, types and errors. TypeScript.

## How the reference is generated

| Package | Source | Generator |
|---|---|---|
| `ai-economy-sdk` 0.5.1 | numpy-style docstrings | `scripts/gen_python_reference.py` (griffe, static analysis) |
| `x402-algorand` 0.3.0 | Google-style docstrings | `scripts/gen_python_reference.py` |
| `x402-avm-js` 0.4.1 | TSDoc in `src/index.ts` and `src/errors.ts` | `scripts/gen_js_reference.py` |

Signatures, types and defaults come from the code; descriptions, return values, exceptions and examples come from the documentation comments. Each page links to the source line it was generated from. To regenerate, see the [site's README](https://github.com/x402-avm/x402-avm.github.io#regenerate-the-api-reference).

## Official x402 SDK

`x402-algorand` plugs into the official [`x402`](https://github.com/x402-foundation/x402) Python SDK. The classes you use from it are summarized under **x402 core (upstream)**: [core classes](https://x402-avm.github.io/reference/x402/core), [schemas](https://x402-avm.github.io/reference/x402/schemas) and [HTTP integration](https://x402-avm.github.io/reference/x402/http). The upstream project is the authoritative reference for them.

## Protocol and packages

- [Packages and versions](https://x402-avm.github.io/reference/packages): install commands, compatibility and upgrade notes.
- [AVM exact scheme](https://x402-avm.github.io/reference/protocol/avm-exact-scheme): wire format, verification steps and settlement.
- [HTTP 402 reference](https://x402-avm.github.io/reference/protocol/http-402): the three headers of a real payment, decoded.
- [Errors and error codes](https://x402-avm.github.io/reference/errors): every failure reason and exception class.

Source: https://x402-avm.github.io/reference/index
