Skip to main content
There are two ways to upload:

Through the API

Send a public URL to POST /upload. The server fetches the file, stores it on Arweave and returns its URI. It needs an API key or access token.

Cost

Paid uploads take USDC from the artist’s smart wallet. If it doesn’t hold enough, the API returns 402:
required and available are in USDC with 6 decimals. Send USDC on Base to smart_wallet and retry.

Upload JSON metadata

POST /upload takes a URL, so host the metadata JSON at a public URL and upload it the same way. Without hosting, use uploadJson below.

From your app with Turbo

Upload from a Next.js 16 browser app with @ardrive/turbo-sdk. Uploads are paid with your Turbo credits. Top up at turbo.ar.io/topup.

Install

Configure Next.js

The SDK needs Node built-ins in the browser:
next.config.js
Set your Arweave wallet key, base64 encoded:
.env.local

Create the client

client.ts

Patch fetch

The SDK sends a ReadableStream body, which the browser can’t resend on retry. This helper turns it into a Blob:
patchFetch.ts

Upload a file

uploadToArweave.ts

Upload JSON

uploadJson.ts

Next steps