Programmable ERC-20 token deployment for AI agents and autonomous systems. Base URL: https://avagenesis.com
Standard flow (your wallet): POST /api/agents/keys → POST /api/agents/create-token → sign + broadcast tx → POST /api/agents/confirm → done. Same contracts and fee flow as human users. Your agent owns the contract from block one.
The Agent API uses the exact same factory contracts as the human-facing token creator on this site. When your agent calls create-token, it gets back encoded calldata ready to sign. Your agent broadcasts the transaction from its own wallet — gas and the $10 platform fee are paid directly, and the fee flows to the platform treasury on-chain, identical to a human user.
🤖 No wallet? Use POST /api/agents/deploy-token — Sepolia testnet only. Nothing on mainnet is free. Gas costs real money on every chain. Mainnet always requires your agent to sign with its own wallet.
🧪 Free testnet: use "chain": "sepolia" for zero-cost test deployments on Sepolia before going live on mainnet.
All endpoints (except key creation and public discovery endpoints) require a Bearer token:
Authorization: Bearer ava_live_<48-hex-chars>POST /api/agents/keys
{
"name": "My Agent", // optional label
"monthlyLimit": 100 // max deployments/month (default: 100)
}// Response (201)
{
"ok": true,
"key": "ava_live_a1b2c3d4...", // ← SHOWN ONCE — store securely
"id": "uuid",
"prefix": "ava_live_a1b2c3...",
"name": "My Agent",
"monthlyLimit": 100,
"createdAt": "2026-05-14T..."
}⚠ The raw API key is returned exactly once. It is never stored. If lost, create a new key and revoke the old one.
| Scope | Limit | Window |
|---|---|---|
| Per API key | 200 requests | 15 minutes |
| Key creation (per IP) | 5 keys | 1 hour |
| Monthly deployments | 100 (default) | Calendar month |
Rate limit headers are returned on every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Returns live gas prices and deployment cost estimates. Use to choose the cheapest chain. No auth required.
GET /api/agents/gas-prices
// No authentication required{
"ok": true,
"recommendation": "base",
"chains": [
{
"chain": "base",
"name": "Base",
"nativeToken": "ETH",
"gasPriceGwei": "0.0031",
"estimatedDeployCostNative": "0.00000087",
"estimatedDeployCostUsd": "0.0033",
"nativePriceUsd": "3800.00",
"factoryAvailable": true
}
// ... other chains sorted cheapest first
]
}Pre-built token configurations. Pass the template id in create-token to auto-fill features.
| Template ID | Features |
|---|---|
| utility | No features — standard ERC-20 |
| governance | Burnable only |
| reward | Mintable + burnable |
| treasury | Mintable + pausable + blacklist |
| community | Burnable + anti-whale (2%) |
| meme | No features, high supply |
Dry-run: validates your payload and returns encoded calldata + fee without creating an intent or spending gas.
POST /api/agents/simulate-token
Authorization: Bearer ava_live_...
{
"chain": "base",
"name": "Agent Token",
"symbol": "AGT",
"supply": "1000000",
"decimals": 18,
"template": "governance"
}⚠ Sepolia testnet only. Attempting mainnet chains returns HTTP 403. Nothing on mainnet is free — gas costs real money on Ethereum, Base, BNB Chain, and Polygon. If your agent has a wallet, use POST /api/agents/create-token for mainnet — your agent pays gas + fee directly, exactly like a human user.
POST /api/agents/deploy-token
Authorization: Bearer ava_live_...
Content-Type: application/json
X-Idempotency-Key: <unique-uuid> // optional — prevents duplicate deploys on retry
{
"chain": "sepolia", // or: ethereum | base | bnb | polygon
"name": "Agent Token",
"symbol": "AGT",
"supply": "1000000",
"decimals": 18, // optional, default: 18
"ownerAddress": "0xYourWallet", // optional — tokens + ownership sent here
"template": "governance", // optional
"features": { // optional — overrides template
"mintable": false,
"burnable": true
},
"callbackUrl": "https://example.com/webhook" // optional
}// Response (202) — deployment started, polls automatically
{
"ok": true,
"intentId": "3f8a1b2c-...",
"status": "deploying",
"message": "Deployment started. Platform wallet is signing and broadcasting the transaction.",
"status_url": "https://avagenesis.com/api/agents/status/3f8a1b2c-...",
"stream_url": "https://avagenesis.com/api/agents/status-stream/3f8a1b2c-..."
}
// Poll status_url — when deployed you get:
{
"ok": true,
"status": "deployed",
"token": {
"name": "Agent Token",
"symbol": "AGT",
"contractAddress": "0xF904E4ff79Ae18C7a3716106eB694eF4a3520C19"
},
"transactions": {
"txHash": "0xb6344008d18de8...",
"explorerUrl": "https://sepolia.etherscan.io/tx/0xb6344...",
"tokenUrl": "https://sepolia.etherscan.io/token/0xF904..."
}
}If you pass ownerAddress, the platform will transfer all tokens to that address and call transferOwnership(). Because the token uses Ownable2Step, you must then call acceptOwnership() on the contract to finalize. If omitted, tokens and ownership remain with the platform deployer.
// The MCP tool polls automatically and returns the contract address directly:
{
"ok": true,
"status": "deployed",
"contractAddress": "0xF904E4ff...",
"tokenName": "Agent Token",
"tokenSymbol": "AGT",
"chain": "sepolia",
"txHash": "0xb6344008...",
"explorerUrl": "https://sepolia.etherscan.io/tx/0xb634...",
"tokenUrl": "https://sepolia.etherscan.io/token/0xF904..."
}✦ Same flow as human users. Your agent signs the transaction from its own wallet — gas + $10 fee paid directly to the factory, fee forwarded to platform treasury on-chain. Contract ownership is yours from the first block. No platform middleman needed.
Returns encoded calldata ready to sign. Broadcast from your wallet, then confirm with the txHash. Idempotency-safe via X-Idempotency-Key header.
POST /api/agents/create-token
Authorization: Bearer ava_live_...
X-Idempotency-Key: <unique-uuid> // optional — prevents duplicate deploys on retry
{
"chain": "base",
"name": "Agent Genesis Token",
"symbol": "AGT",
"supply": "1000000",
"decimals": 18,
"template": "governance", // optional
"features": { // optional — overrides template
"mintable": false,
"burnable": true,
"pausable": false,
"blacklist": false,
"transferTax": 0,
"antiWhale": false,
"maxWalletPercent": 0
},
"callbackUrl": "https://example.com/webhook" // optional
}// Response (201)
{
"ok": true,
"intentId": "3f8a1b2c-...",
"status": "awaiting_payment",
"next_step": {
"action": "broadcast_transaction",
"to": "0xFactoryAddress...", // factory contract
"value": "2631578947368421", // fee in wei
"data": "0xa1b2c3...", // encoded createToken() calldata
"chainId": 8453,
"gasEstimate": 280000
},
"fee": {
"usd": 10,
"eth": "0.00263158",
"nativeToken": "ETH"
},
"confirm_url": "/api/agents/confirm/3f8a1b2c-...",
"status_url": "/api/agents/status/3f8a1b2c-...",
"stream_url": "/api/agents/status-stream/3f8a1b2c-..."
}| Field | Type | Required | Description |
|---|---|---|---|
| chain | string | required | ethereum | base | bnb | polygon | sepolia |
| name | string | required | Token name (max 64 chars) |
| symbol | string | required | Uppercase alphanumeric (max 16 chars) |
| supply | string | required | Human-readable initial supply (e.g. '1000000') |
| decimals | integer | optional | Token decimals (default: 18, range: 0–18) |
| template | string | optional | Template ID from /api/agents/templates |
| features | object | optional | Feature overrides (see TokenFeatures below) |
| callbackUrl | string | optional | Webhook URL for status change events |
After broadcasting the transaction, submit the txHash. The server monitors on-chain and transitions intent status automatically.
POST /api/agents/confirm/3f8a1b2c-...
Authorization: Bearer ava_live_...
{
"txHash": "0xa1b2c3d4..."
}Poll the current status. Returns contract address and explorer links when deployed.
// Response when deployed
{
"ok": true,
"status": "deployed",
"token": {
"name": "Agent Genesis Token",
"symbol": "AGT",
"contractAddress": "0x..."
},
"transactions": {
"txHash": "0x...",
"explorerUrl": "https://basescan.org/tx/0x...",
"tokenUrl": "https://basescan.org/token/0x..."
}
}Server-Sent Events stream. Emits status updates every 5 seconds until deployed or failed (max 15 min).
const es = new EventSource(
'https://avagenesis.com/api/agents/status-stream/INTENT_ID',
{ headers: { Authorization: 'Bearer ava_live_...' } }
);
es.onmessage = (e) => {
const data = JSON.parse(e.data);
if (data.status === 'deployed') {
console.log('Token deployed at:', data.token.contractAddress);
es.close();
}
};If callbackUrl is provided, events are POSTed to that URL on each status change. Signed with HMAC-SHA256. 4-attempt retry with exponential backoff.
// Webhook payload
{
"event": "agent.deployment.deployed",
"intentId": "3f8a1b2c-...",
"chain": "base",
"tokenName": "Agent Genesis Token",
"tokenSymbol": "AGT",
"contractAddress": "0x...",
"txHash": "0x...",
"status": "deployed",
"timestamp": "2026-05-14T10:00:00.000Z"
}// Verify signature (Node.js)
const crypto = require('crypto');
const sig = req.headers['x-ava-signature'];
const expected = 'sha256=' + crypto
.createHmac('sha256', process.env.AVA_WEBHOOK_SECRET)
.update(req.body)
.digest('hex');
if (sig !== expected) throw new Error('Invalid signature');Events: agent.deployment.awaiting_payment · agent.deployment.paid · agent.deployment.deploying · agent.deployment.deployed · agent.deployment.failed
Ava Genesis exposes a Model Context Protocol server. Compatible with Claude, GPT-4 tool use, and any MCP client.
// MCP server endpoint
https://avagenesis.com/api/mcp
// Add to Claude Desktop config (claude_desktop_config.json)
{
"mcpServers": {
"ava-genesis": {
"url": "https://avagenesis.com/api/mcp"
}
}
}Available MCP tools:
| HTTP | Meaning | Common cause |
|---|---|---|
| 400 | Bad Request | Validation error — check errors[] array in response |
| 401 | Unauthorized | Missing, malformed, or revoked API key |
| 403 | Forbidden | Intent belongs to a different API key |
| 404 | Not Found | Intent or key ID does not exist |
| 409 | Conflict | Intent already in terminal state (failed) |
| 429 | Too Many Requests | Rate limit or monthly deployment cap exceeded |
| 503 | Service Unavailable | Factory not deployed on requested chain |
| 500 | Server Error | Internal error — retry with exponential backoff |