Skip to main content
POST
/
v2
/
farcaster
/
nft
/
deploy
/
erc721
/
Deploy ERC-721 collection
curl --request POST \
  --url https://api.neynar.com/v2/farcaster/nft/deploy/erc721/ \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-wallet-id: <x-wallet-id>' \
  --data '
{
  "name": "<string>",
  "symbol": "<string>",
  "description": "<string>",
  "external_link": "<string>",
  "image": "<string>",
  "max_supply": 0,
  "mint_config": {
    "end_timestamp": 140737488355327,
    "max_per_tx": 0,
    "max_per_wallet": 0,
    "price_per_token": "0",
    "start_timestamp": 140737488355327
  },
  "royalty_bps": 0,
  "royalty_recipient": "0x5a927ac639636e534b678e81768ca19e2c6280b7"
}
'
import requests

url = "https://api.neynar.com/v2/farcaster/nft/deploy/erc721/"

payload = {
"name": "<string>",
"symbol": "<string>",
"description": "<string>",
"external_link": "<string>",
"image": "<string>",
"max_supply": 0,
"mint_config": {
"end_timestamp": 140737488355327,
"max_per_tx": 0,
"max_per_wallet": 0,
"price_per_token": "0",
"start_timestamp": 140737488355327
},
"royalty_bps": 0,
"royalty_recipient": "0x5a927ac639636e534b678e81768ca19e2c6280b7"
}
headers = {
"x-wallet-id": "<x-wallet-id>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {
'x-wallet-id': '<x-wallet-id>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: '<string>',
symbol: '<string>',
description: '<string>',
external_link: '<string>',
image: '<string>',
max_supply: 0,
mint_config: {
end_timestamp: 140737488355327,
max_per_tx: 0,
max_per_wallet: 0,
price_per_token: '0',
start_timestamp: 140737488355327
},
royalty_bps: 0,
royalty_recipient: '0x5a927ac639636e534b678e81768ca19e2c6280b7'
})
};

fetch('https://api.neynar.com/v2/farcaster/nft/deploy/erc721/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.neynar.com/v2/farcaster/nft/deploy/erc721/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'symbol' => '<string>',
'description' => '<string>',
'external_link' => '<string>',
'image' => '<string>',
'max_supply' => 0,
'mint_config' => [
'end_timestamp' => 140737488355327,
'max_per_tx' => 0,
'max_per_wallet' => 0,
'price_per_token' => '0',
'start_timestamp' => 140737488355327
],
'royalty_bps' => 0,
'royalty_recipient' => '0x5a927ac639636e534b678e81768ca19e2c6280b7'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>",
"x-wallet-id: <x-wallet-id>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.neynar.com/v2/farcaster/nft/deploy/erc721/"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"symbol\": \"<string>\",\n \"description\": \"<string>\",\n \"external_link\": \"<string>\",\n \"image\": \"<string>\",\n \"max_supply\": 0,\n \"mint_config\": {\n \"end_timestamp\": 140737488355327,\n \"max_per_tx\": 0,\n \"max_per_wallet\": 0,\n \"price_per_token\": \"0\",\n \"start_timestamp\": 140737488355327\n },\n \"royalty_bps\": 0,\n \"royalty_recipient\": \"0x5a927ac639636e534b678e81768ca19e2c6280b7\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("x-wallet-id", "<x-wallet-id>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.neynar.com/v2/farcaster/nft/deploy/erc721/")
.header("x-wallet-id", "<x-wallet-id>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"symbol\": \"<string>\",\n \"description\": \"<string>\",\n \"external_link\": \"<string>\",\n \"image\": \"<string>\",\n \"max_supply\": 0,\n \"mint_config\": {\n \"end_timestamp\": 140737488355327,\n \"max_per_tx\": 0,\n \"max_per_wallet\": 0,\n \"price_per_token\": \"0\",\n \"start_timestamp\": 140737488355327\n },\n \"royalty_bps\": 0,\n \"royalty_recipient\": \"0x5a927ac639636e534b678e81768ca19e2c6280b7\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.neynar.com/v2/farcaster/nft/deploy/erc721/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-wallet-id"] = '<x-wallet-id>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"symbol\": \"<string>\",\n \"description\": \"<string>\",\n \"external_link\": \"<string>\",\n \"image\": \"<string>\",\n \"max_supply\": 0,\n \"mint_config\": {\n \"end_timestamp\": 140737488355327,\n \"max_per_tx\": 0,\n \"max_per_wallet\": 0,\n \"price_per_token\": \"0\",\n \"start_timestamp\": 140737488355327\n },\n \"royalty_bps\": 0,\n \"royalty_recipient\": \"0x5a927ac639636e534b678e81768ca19e2c6280b7\"\n}"

response = http.request(request)
puts response.read_body
{
  "collection": {
    "address": "0x5a927ac639636e534b678e81768ca19e2c6280b7",
    "name": "<string>",
    "symbol": "<string>",
    "transaction_hash": "<string>",
    "type": "ERC721"
  },
  "object": "nft_collection"
}
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}
{
"message": "<string>",
"code": "<string>",
"property": "<string>",
"status": 123
}

Node.js SDK

๐Ÿ”— SDK Method: deployErc721 Use this API endpoint with the Neynar Node.js SDK for typed responses and better developer experience.

Authorizations

x-api-key
string
header
default:NEYNAR_API_DOCS
required

API key to authorize requests

Headers

x-wallet-id
string
required

Wallet ID to use for transactions

Body

application/json
name
string
required
Required string length: 1 - 255
network
enum<string>
required
Available options:
base,
optimism,
base-sepolia
symbol
string
required
Required string length: 1 - 32
description
string
image
string
max_supply
integer
default:0

Max supply (0 = unlimited)

Required range: 0 <= x <= 281474976710655
mint_config
object
royalty_bps
integer
default:0

Royalty in basis points (500 = 5%, max 2500 = 25%)

Required range: 0 <= x <= 2500
royalty_recipient
string

Defaults to creator wallet

Pattern: ^0x[a-fA-F0-9]{40}$
Example:

"0x5a927ac639636e534b678e81768ca19e2c6280b7"

Response

201

collection
object
required
object
enum<string>
required
Available options:
nft_collection