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

# Quickstart

> Make your first Brickken call on whichever surface you picked.

Five first calls, one per surface. All of them run against **sandbox** — nothing here moves real value.

> [tab] REST — with an API key
>
> Start with a read that needs no key at all, to confirm you can reach the API:
>
> ```bash theme={null}
> curl 'https://api.sandbox.brickken.com/get-network-info?chainId=11155111'
> ```
>
> Then a read that does need one:
>
> ```bash theme={null}
> curl 'https://api.sandbox.brickken.com/get-token-info?tokenSymbol=EXMPL' \
>   --header 'x-api-key: YOUR_BRICKKEN_API_KEY'
> ```
>
> Now prepare a write. This returns unsigned transactions and a `txId` — nothing is on-chain yet:
>
> ```bash theme={null}
> curl --request POST 'https://api.sandbox.brickken.com/prepare-transactions' \
>   --header 'Content-Type: application/json' \
>   --header 'x-api-key: YOUR_BRICKKEN_API_KEY' \
>   --data '{
>     "chainId": "11155111",
>     "method": "newTokenization",
>     "tokenizerEmail": "issuer@example.com",
>     "signerAddress": "0xYourWhitelistedWallet",
>     "name": "Example Asset",
>     "tokenSymbol": "EXMPL",
>     "tokenType": "RWA_TOKEN",
>     "supplyCap": "1000000",
>     "url": "https://example.com/token-docs"
>   }'
> ```
>
> Sign each returned transaction with the wallet matching `signerAddress`, then send:
>
> ```bash theme={null}
> curl --request POST 'https://api.sandbox.brickken.com/send-transactions' \
>   --header 'Content-Type: application/json' \
>   --header 'x-api-key: YOUR_BRICKKEN_API_KEY' \
>   --data '{
>     "txId": "0xPreparedTransactionId",
>     "signedTransactions": ["0xSignedRawTransaction"]
>   }'
> ```
>
> Poll `GET /get-transaction-status` until it confirms.
>
> > [!NOTE]
> >
> > `signerAddress` must be whitelisted by Brickken first. Ask for it when you [request your key](https://docs.brickken.com/get-started/request-api-key).

> [tab] Agentic API — with a wallet
>
> The x402 facade prepares a relayed operation without a credential. Try it right now:
>
> ```bash theme={null}
> curl --request POST 'https://api.sandbox.brickken.com/x402/agent/register' \
>   --header 'Content-Type: application/json' \
>   --data '{
>     "chainId": "84532",
>     "executionMode": "brickken-relayed",
>     "name": "Research Agent",
>     "description": "Autonomous research agent",
>     "image": "https://example.com/agent.png",
>     "services": [
>       {
>         "name": "A2A",
>         "endpoint": "https://agent.example/.well-known/agent-card.json",
>         "version": "0.3.0"
>       }
>     ],
>     "aiModelName": "Research Model",
>     "aiModelProvider": "OpenAI",
>     "x402Support": true,
>     "active": true
>   }'
> ```
>
> The response carries `txId`, one prepared `transactions` entry, and an `x402Requirements` preview of what the send will cost.
>
> Send it. The first attempt is meant to fail:
>
> ```bash theme={null}
> curl -i --request POST 'https://api.sandbox.brickken.com/send-transactions' \
>   --header 'Content-Type: application/json' \
>   --data '{ "txId": "0xPreparedTransactionId", "transactions": [ { "to": "0xRegistry", "data": "0x...", "value": "0x0" } ] }'
> ```
>
> You get `402 Payment Required` with a `PAYMENT-REQUIRED` header. Sign that payment locally with your funded wallet and retry with `X-PAYMENT`. Brickken's relayer then signs, pays the gas, and broadcasts.
>
> Fund the wallet with Base Sepolia USDC first — the exact asset and amount are in the header.

> [tab] SDK
>
> ```bash theme={null}
> npm install brickken-sdk
> ```
>
> A Dapp read with an API key:
>
> ```ts theme={null}
> import { Brickken } from 'brickken-sdk'
>
> const bkn = new Brickken({ env: 'sandbox', apiKey: process.env.BRICKKEN_API_KEY })
>
> const token = await bkn.tokenization.info({ tokenSymbol: 'EXMPL' })
> const offerings = await bkn.sto.list({ tokenSymbol: 'EXMPL' })
> ```
>
> Or an agentic write with a wallet and no API key. Preparing is free in relayed mode; `execute: true` also pays and sends:
>
> ```ts theme={null}
> import { Brickken } from 'brickken-sdk'
> import { fromPrivateKey } from 'brickken-sdk/adapters/private-key'
>
> const bkn = new Brickken({
>   env: 'sandbox',
>   signer: fromPrivateKey(process.env.BRICKKEN_PRIVATE_KEY!),
>   payment: { maxAmountBaseUnits: '50000' },
> })
>
> const agent = await bkn.agent.register(
>   {
>     chainId: '84532',
>     name: 'Research Agent',
>     image: 'https://example.com/agent.png',
>     serviceName: 'A2A',
>     serviceEndpoint: 'https://agent.example/.well-known/agent-card.json',
>   },
>   { execute: true },
> )
>
> console.log(agent.info?.agentUuid)
> ```
>
> > [!NOTE]
> >
> > The SDK is the only typed client that reaches the Dapp API from your own code. See the [SDK quickstart](https://docs.brickken.com/sdk/quickstart.md).

> [tab] CLI
>
> ```bash theme={null}
> npm install -g brickken-cli
> ```
>
> ```bash theme={null}
> export BRICKKEN_PRIVATE_KEY=0x...
> export BRICKKEN_RPC_URL="https://sepolia.base.org"
> ```
>
> Prepare only — free in relayed mode, nothing sent:
>
> ```bash theme={null}
> brickken create-token --chain 84532 --execution-mode brickken-relayed --name "Research Agent Token" --symbol RAGT
> ```
>
> Add `--execute` to prepare, pay the x402 charge, and broadcast in one step:
>
> ```bash theme={null}
> brickken create-token --chain 84532 --execution-mode brickken-relayed --name "Research Agent Token" --symbol RAGT --execute --json
> ```
>
> > [!NOTE]
> >
> > The CLI provides Dapp API, Agentic API, RAMS, KYC, and Sandbox/Forge BKN faucet workflows. Use `brickken tx prepare --method <method>` for Dapp tokenization/STO transactions and `brickken dapp get` for Dapp reads.

> [tab] MCP
>
> Add the hosted server to your MCP client:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "brickken": {
>       "url": "https://mcp.brickken.com/mcp"
>     }
>   }
> }
> ```
>
> Configure the session with the `configure` tool. With an API key you get the full Dapp API:
>
> ```json theme={null}
> {
>   "env": "sandbox",
>   "apiKey": "YOUR_BRICKKEN_API_KEY"
> }
> ```
>
> Then ask the agent to call `get_stos`, `get_token_info`, or `create_tokenization`.
>
> For x402 agentic workflows instead, clear the key and set a private key:
>
> ```json theme={null}
> {
>   "env": "sandbox",
>   "privateKey": "0xYOUR_PRIVATE_KEY",
>   "apiKey": ""
> }
> ```
>
> Verify with `get_config` — it reports `hasApiKey` and `hasPrivateKey` as booleans, never the values.

## Where next

> [card] [What you can do](https://docs.brickken.com/get-started/what-you-can-do.md)
>
> Every capability, and which client reaches it.

> [card] [Authentication](https://docs.brickken.com/get-started/authentication)
>
> Credentials, the 402 handshake, plans, limits, and errors.

> [card] [Dapp API reference](https://docs.brickken.com/api-reference/introduction.md)
>
> Every tokenization, STO, and read endpoint.

> [card] [Postman collection](https://docs.brickken.com/api-reference/postman.md)
>
> Ready-to-run requests for every endpoint.

> [card] [API Challenge Hello World](https://docs.brickken.com/get-started/build-programme/api-hello-world.md)
>
> Create and verify a sandbox tokenized asset with direct HTTP requests.

> [card] [Agentic Challenge Hello World](https://docs.brickken.com/get-started/build-programme/agentic-hello-world.md)
>
> Register an ERC-8004 agent and deploy its token with the CLI.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.