API reference
Base URL https://developers.tokenanvil.store/v1. Machine-readable spec: openapi.json.
GET/v1/pricing
Current fees and limits. Public. Returns the access fee, the per-token fee (also in lamports at the current SOL price) and the limits.
No key needed.
Response 200:
{
"network": "mainnet",
"access": {
"usd": 10
},
"token": {
"usd": 2.99,
"lamports": "27000000",
"solUsd": 110.8
},
"limits": {
"requestsPerHour": 600,
"tokensPerDay": 25,
"metadataPerDay": 100,
"imageBytes": 1048576,
"hostedItemsPerKey": 5000
}
}GET/v1/me
Your key, wallet and usage today. Returns the key id, the wallet that bought it, today's usage and your limits.
Requires an API key.
Response 200:
{
"keyId": "a1b2c3d4",
"wallet": "YourWallet...",
"usageToday": {
"requests": 12,
"tokens": 2,
"metadata": 3
},
"limits": {
"tokensPerDay": 25,
"metadataPerDay": 100,
"requestsPerHour": 600
}
}POST/v1/metadata
Host token metadata and its image. Validates your fields, stores the image and a Metaplex-standard JSON on our servers, and returns stable URLs. Use metadataUri when you build the token. Provide the image as imageUrl (public https) or imageBase64 (PNG, JPEG or WebP, up to 1 MB).
Requires an API key.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | Token name, up to 32 characters. |
symbol | string | yes | Up to 10 characters, no spaces. |
description | string | no | Up to 1,000 characters. |
imageUrl | string | one of | Public https URL of a PNG, JPEG or WebP image up to 1 MB. |
imageBase64 | string | one of | Base64 image data (a data: URL prefix is accepted). |
website | string | no | https URL. |
twitter | string | no | x.com or twitter.com URL. |
telegram | string | no | t.me URL. |
discord | string | no | discord.gg or discord.com URL. |
attributes | array | no | Up to 10 {trait_type, value} items. |
Response 201:
{
"metadataUri": "https://developers.tokenanvil.store/m/0123456789abcdef01234567.json",
"imageUri": "https://developers.tokenanvil.store/i/89abcdef0123456789abcdef.png",
"id": "0123456789abcdef01234567"
}POST/v1/tokens
Build an unsigned token-creation transaction. Returns a base64 legacy transaction that creates the mint, the recipient token account, the full supply, the Metaplex metadata and (optionally) revokes authorities, and pays the TokenAnvil fee, all in one transaction signed only by payer. Nothing is sent to Solana by this call. Sign within about 60 seconds.
Requires an API key.
| Field | Type | Required | Description |
|---|---|---|---|
payer | string | yes | Base58 address of the wallet that will sign. Pays all costs. |
name | string | yes | Up to 32 bytes. |
symbol | string | yes | Up to 10 bytes, no spaces. |
metadataUri | string | yes | https URL of the metadata JSON (from POST /v1/metadata or your own), up to 200 bytes. |
supply | string | one of | Whole tokens, e.g. "1000000". Multiplied by 10^decimals. |
supplyRaw | string | one of | Base units. Use instead of supply for exact control. |
decimals | integer | no | 0 to 9. Default 9. |
recipient | string | no | Wallet that receives the supply. Default payer. |
revokeMint | boolean | no | Permanently remove mint authority (fixed supply). Default false. |
revokeFreeze | boolean | no | Create the token with no freeze authority. Default true. |
immutableMetadata | boolean | no | Make the on-chain metadata immutable. Default false. |
Response 201:
{
"buildId": 1,
"mint": "Mint address...",
"metadataAccount": "...",
"recipientTokenAccount": "...",
"transaction": "base64...",
"transactionEncoding": "base64",
"format": "legacy-unsigned",
"requiredSigner": "PayerWallet...",
"recentBlockhash": "...",
"lastValidBlockHeight": 123456789,
"expiresInSeconds": 60,
"fee": {
"usd": 2.99,
"lamports": "27000000",
"treasury": "5gqrZsmG95XYx1faddSXQ7poWyJu1L8fRkYgQdSsR5c7"
}
}POST/v1/transactions
Submit a signed transaction (optional). Convenience relay. Only transactions built for your key in the last hour are accepted. You can also submit with your own RPC connection instead.
Requires an API key.
| Field | Type | Required | Description |
|---|---|---|---|
transaction | string | yes | Base64 of the signed transaction. |
Response 202:
{
"signature": "5Qk...",
"mint": "Mint address...",
"status": "submitted"
}GET/v1/transactions/{signature}
Verify a creation on-chain. Reads the confirmed transaction from Solana and checks that the mint, the full supply and the TokenAnvil fee are really there. status is pending, confirmed, failed or unverified.
Requires an API key.
Response 200:
{
"signature": "5Qk...",
"status": "confirmed",
"mint": "Mint address...",
"supplyRaw": "1000000000000000",
"decimals": 9,
"recipient": "Wallet...",
"feeVerified": true,
"fee": {
"amount": "27000000",
"currency": "SOL"
}
}GET/v1/tokens/{mint}
Look up a token you built. Returns the build record for a mint created by this key.
Requires an API key.
Response 200:
{
"mint": "Mint address...",
"name": "My Token",
"symbol": "MYT",
"status": "confirmed",
"signature": "5Qk...",
"feeVerified": true,
"createdAt": 1790000000,
"confirmedAt": 1790000030
}Errors
| Status and code | Meaning |
|---|---|
400 invalid_request | A field is missing or invalid. error.fields names each one. |
400 insufficient_funds | The payer wallet cannot cover the fee plus Solana costs. |
400 simulation_failed | Solana says the transaction would fail. Nothing was built. |
401 unauthorized | Missing, wrong, revoked or banned key. |
404 not_found | Unknown endpoint, token or transaction. |
413 payload_too_large | Request body is too large. |
429 rate_limited / daily_limit | Per-hour request limit or daily token or metadata limit reached. |
503 price_unavailable | The SOL price feed is temporarily unavailable. Retry. |
500 server_error | Our side. Retry; contact us if it persists. |