tokenId, both wallet addresses, and the on-chain transaction hash.
This endpoint requires a merchant Bearer token. You can generate one in the FlareHQ dashboard under Settings → API Keys.
Request
POST https://flarehq.xyz/api/agent/deploy
Headers
Body Parameters
All body parameters are optional. The endpoint will deploy a functional agent with sensible defaults if you send an empty body ({}).
string
default:"FlareHQ Autonomous Agent"
A human-readable display name for the agent. Stored in the FlareHQ agent registry and shown in the dashboard. Maximum 120 characters.
string
IPFS (
ipfs://baf...) or HTTPS URI pointing to a JSON document that describes the agent’s capabilities, supported APIs, and pricing. This URI is written directly into the ERC-8004 Identity Registry on-chain.string
Ethereum address of the operator who controls this agent. Stored in the ERC-8004 Identity Registry. Defaults to a FlareHQ-managed address if omitted — override this in production with your own address.
Response
200 — Success
boolean
true when both wallets were provisioned and the on-chain registration confirmed.object
The full agent record as persisted to the FlareHQ registry database.
string
Arc testnet transaction hash for the ERC-8004
register() call. Confirms the agent’s identity is now live on-chain.string
Direct ArcScan link to the registration transaction (
https://testnet.arcscan.app/tx/{txHash}).object
Both wallet addresses created during provisioning.
500 — Server Error
Returned when agent provisioning fails due to a server-side error or when on-chain registration is rejected.408 — Timeout
Returned when the on-chain registration transaction does not confirm within the expected window.Examples
Success Response
Next Steps After Deployment
Once deployment succeeds, follow these steps before making your first x402 payment: 1. Fund the agent’s SCA wallet with test USDC Visit faucet.circle.com, select ARC-TESTNET, and send test USDC to thescaAddress returned in the response. You need a Gateway deposit as well — run:
X-Agent-ID header on every /api/x402/pay call.
3. Verify registration on-chain
Open the explorerUrl from the response on ArcScan to confirm the registration transaction succeeded.

