TokenAnvil DevelopersGet API access

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.

FieldTypeRequiredDescription
namestringyesToken name, up to 32 characters.
symbolstringyesUp to 10 characters, no spaces.
descriptionstringnoUp to 1,000 characters.
imageUrlstringone ofPublic https URL of a PNG, JPEG or WebP image up to 1 MB.
imageBase64stringone ofBase64 image data (a data: URL prefix is accepted).
websitestringnohttps URL.
twitterstringnox.com or twitter.com URL.
telegramstringnot.me URL.
discordstringnodiscord.gg or discord.com URL.
attributesarraynoUp 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.

FieldTypeRequiredDescription
payerstringyesBase58 address of the wallet that will sign. Pays all costs.
namestringyesUp to 32 bytes.
symbolstringyesUp to 10 bytes, no spaces.
metadataUristringyeshttps URL of the metadata JSON (from POST /v1/metadata or your own), up to 200 bytes.
supplystringone ofWhole tokens, e.g. "1000000". Multiplied by 10^decimals.
supplyRawstringone ofBase units. Use instead of supply for exact control.
decimalsintegerno0 to 9. Default 9.
recipientstringnoWallet that receives the supply. Default payer.
revokeMintbooleannoPermanently remove mint authority (fixed supply). Default false.
revokeFreezebooleannoCreate the token with no freeze authority. Default true.
immutableMetadatabooleannoMake 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.

FieldTypeRequiredDescription
transactionstringyesBase64 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 codeMeaning
400 invalid_requestA field is missing or invalid. error.fields names each one.
400 insufficient_fundsThe payer wallet cannot cover the fee plus Solana costs.
400 simulation_failedSolana says the transaction would fail. Nothing was built.
401 unauthorizedMissing, wrong, revoked or banned key.
404 not_foundUnknown endpoint, token or transaction.
413 payload_too_largeRequest body is too large.
429 rate_limited / daily_limitPer-hour request limit or daily token or metadata limit reached.
503 price_unavailableThe SOL price feed is temporarily unavailable. Retry.
500 server_errorOur side. Retry; contact us if it persists.