Skip to main content
POST
Generate an NFT image

Node.js SDK

🔗 SDK Method: generateImage 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
prompt
string
required

Text prompt describing the image to generate

Minimum string length: 1
format
enum<string>
default:png

Output image format (default: png)

Available options:
png,
jpeg,
webp
height
integer
default:1024

Output image height in pixels (default: 1024)

Required range: 1 <= x <= 4096
high_fidelity
boolean
default:false

Use the high-fidelity model (slower but more detailed). Default: false.

source_image_urls
string<uri>[]

Optional array of source image URLs to edit or use as reference (max 5)

Maximum array length: 5
width
integer
default:1024

Output image width in pixels (default: 1024)

Required range: 1 <= x <= 4096

Response

Success

image_url
string<uri>
required