Deploy Programmatically through API

Deploy ERC-20, ERC-721, and ERC-1155 tokens programmatically using the thirdweb API.

Deploying tokens programmatically is useful for:

  • Doing high-volume or dynamic token creation for users or creators
  • Creator coins who need their own token or NFT upon signup or specific actions
  • Creating your own token creation marketplace or platform

and more!

Deploy ERC-20 Token

Request

fetch("https://api.thirdweb.com/v1/tokens", {
method: "POST",
headers: {
"x-secret-key": "<your-project-secret-key>",
},
body: {
chainId: 42161,
name: "MyToken",
symbol: "MT",
description: "My very own token",
imageUrl: "https://picsum.photos/200",
from: "0xEfc38EF8C09535b25e364b6d1a7C406D3972f2A9",
maxSupply: 1000000000,
sale: {
type: "pool",
startingPrice: "100000",
amount: 1000000,
developerFeeBps: 10,
currency: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
},
},
});

Response

{
"transactionId": "string",
"address": "string"
}