Overview
The Anvil API is a hosted service that lets software developers add Cardano payments, token minting and staking to their apps with ordinary web requests. An API (application programming interface) is a set of web addresses one program calls to ask another to do a job: the app describes what should happen, and Anvil sends back a transaction ready for the user to sign1,2. Teams skip running their own Cardano servers, and the Anvil site sums it up as "No Haskell required"1.
The API comes from Anvil, a Cardano development agency that also offers a minting platform for brands and built the Wayup marketplace1,3. The Cardano Developer Portal lists it among its API providers as a hosted REST API "focused on building, signing, and submitting Cardano transactions and minting assets"4. REST is the common style of web API that most programming languages already speak.
Key Features
- Build transactions without the low-level work. The API assembles transactions with several recipients, balances them, sets the network fee, and supports multi-signature transactions, where more than one person must approve before funds move2.
- Mint and manage tokens and NFTs. Endpoints mint, edit and burn tokens under CIP-25 and CIP-68, two Cardano standards for storing a token's name, image and other details2,5.
- Staking and governance inside your app. Apps can let users delegate ADA to a stake pool or to a DRep, a representative who votes on Cardano governance decisions, and withdraw their staking rewards2,6.
- Smart contracts through blueprints. Developers upload a compiled smart contract (a program that runs on the blockchain and enforces its own rules) as a CIP-57 blueprint, a standard description file, then call it in transactions7.
- Test before spending real ADA. Separate web addresses serve the main network and two test networks, Preprod and Preview, which use test ADA with no value. The API works the same on each, and an app moving to the main network changes only its base web address and API key8,9.
What to Expect
Developers start in Anvil's self-serve portal, which issues two keys: one for the test networks and one for the main network. Requests carry the key in a header, and the documentation asks teams to keep it on their own server rather than in browser code10,7. For connecting a user's wallet and asking it to sign, the docs point to Weld, Anvil's wallet connection library7. When building a transaction on the main network, apps must supply UTXOs (unspent transaction outputs) themselves; on the test networks Anvil can select them automatically7.
Requests and replies use JSON, a plain text data format, so any language that can make web requests works. The API also offers tRPC, an alternative interface that checks data types as you code7. An interactive reference lists the endpoints and lets developers try calls in the browser11, and a public GitHub repository holds sample projects such as airdrops, NFT mint pages and smart contract demos12.
The Builder plan costs nothing per month and includes full API access, minting and smart contract blueprints1. Anvil instead charges the end user a fee for each action: 0.15 ADA per transaction or smart contract interaction, and 1 ADA per mint, deducted automatically. The docs ask apps to tell users that this charge comes from an address that isn't the app's own13. Larger teams can ask about an Enterprise plan, a private server cluster or higher request limits1,8,7.
The standard API focuses on building and submitting transactions rather than looking up chain data. For balances and history, the docs point developers to a separate data provider such as Blockfrost, and Anvil offers querying and indexing to enterprise customers on request7. Anvil names Chadswap, an over-the-counter trading marketplace, Tournament Builder and the token vesting platform Cardavest among the projects built on the API3.
