Pricing
Pricing calculation endpoints
Gets the price in winc to upload a data item
Path Parameters
The token to use for validating the transaction.
"arweave" | "ethereum" | "solana"The byte count of the data item.
Response Body
curl -X GET "https://turbo.ardrive.io/price/:token/:byteCount"1000000"Invalid byte count"Gets the price in winc to upload a data item
Path Parameters
The token to use for validating the transaction.
"arweave" | "ethereum" | "solana"Response Body
curl -X GET "https://turbo.ardrive.io/price/:token"1000000"Invalid byte count"Gets x402 pricing for a complete signed ANS-104 data item
x402 Pricing for Signed Data Items
Returns exact x402 USDC pricing for uploading a complete signed ANS-104 data item.
Use Case: Client has already created and signed an ANS-104 data item, needs to know exact USDC payment required.
No Overhead Calculation: The data item is already complete (includes signature, owner, tags, headers). Price is calculated for the exact byte count provided.
Pricing Formula:
- Get Winston cost from Arweave gateway for exact byte count
- Convert Winston to USDC using current AR/USD rate
- Apply x402 fee markup (default 15%, configurable via X402_FEE_PERCENT)
Token Format: {currency}-{network}
- usdc-base: USDC on Base mainnet
- usdc-base-mainnet: Alternative name for Base mainnet
- usdc-base-sepolia: Base Sepolia testnet (requires env config)
Future Support: sol-mainnet, ar-mainnet, etc.
Path Parameters
x402 payment token in format {currency}-{network} OR {network}-{currency} (both supported).
Supported Tokens (Enabled by Default):
- usdc-base OR base-usdc: USDC on Base mainnet
- usdc-base-mainnet OR base-mainnet-usdc: Alternative name for Base mainnet
Available (requires env config):
- usdc-base-sepolia OR base-sepolia-usdc: USDC on Base Sepolia testnet (requires X402_BASE_TESTNET_ENABLED=true)
- usdc-ethereum-mainnet OR ethereum-mainnet-usdc: USDC on Ethereum mainnet (requires X402_ETH_ENABLED=true)
- usdc-polygon-mainnet OR polygon-mainnet-usdc: USDC on Polygon mainnet (requires X402_POLYGON_ENABLED=true)
Note: Both token formats are supported for convenience. Use whichever feels more natural.
Future: sol-mainnet, ar-mainnet, etc.
"usdc-base" | "base-usdc" | "usdc-base-mainnet" | "base-mainnet-usdc" | "usdc-base-sepolia" | "base-sepolia-usdc" | "usdc-ethereum-mainnet" | "ethereum-mainnet-usdc" | "usdc-polygon-mainnet" | "polygon-mainnet-usdc"Size of the complete signed data item in bytes
1 <= value <= 4294967296Response Body
curl -X GET "https://turbo.ardrive.io/price/x402/data-item/:token/:byteCount"{
"token": "usdc-base",
"currency": "usdc",
"network": "base",
"byteCount": 2048,
"winstonCost": "674782942",
"usdcAmount": "3642",
"x402Version": 1,
"payment": {
"scheme": "exact",
"network": "base",
"maxAmountRequired": "3642",
"resource": "https://upload.example.com/v1/x402/upload/signed",
"description": "Upload 2048 bytes (signed data item) to Arweave via AR.IO Bundler",
"mimeType": "application/octet-stream",
"payTo": "0xCFd3f996447a541Cbfba5422310EDb417d9f2cE6",
"maxTimeoutSeconds": 3600,
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"extra": {
"name": "USD Coin",
"version": "2"
}
}
}"Invalid token \"sol-mainnet\". Supported tokens: usdc-base, usdc-base-mainnet""Failed to calculate pricing"Gets x402 pricing for raw data (with ANS-104 overhead calculation)
x402 Pricing for Raw Data
Returns x402 USDC pricing for uploading raw data, accounting for ANS-104 overhead.
Use Case: Client has raw data, bundler will create and sign the ANS-104 data item wrapper server-side. Useful for AI agents and applications without ANS-104 signing capabilities.
ANS-104 Overhead Calculation:
- Signature: 512 bytes (Arweave RSA-4096)
- Owner (public key): 512 bytes
- Headers: ~80 bytes
- Tags: ~64 bytes per tag
System Tags (automatically added for x402 uploads):
- Bundler - Service name
- Upload-Type - "raw-data-x402"
- Payer-Address - Ethereum address from payment
- X402-TX-Hash - Blockchain transaction hash
- X402-Payment-ID - UUID payment identifier
- X402-Network - Payment network (e.g., "base")
- Upload-Timestamp - Unix timestamp
Query Parameters:
- tags: Number of user tags (default: 0)
- contentType: MIME type (adds Content-Type tag if provided)
Pricing Formula:
- Calculate total tags (user + system + contentType if provided)
- Estimate final data item size: rawDataSize + signature + owner + headers + (totalTags × 64)
- Get Winston cost from Arweave gateway for estimated size
- Convert Winston to USDC using current AR/USD rate
- Apply x402 fee markup (default 15%, configurable via X402_FEE_PERCENT)
Token Format: {currency}-{network}
- usdc-base: USDC on Base mainnet
- usdc-base-mainnet: Alternative name for Base mainnet
- usdc-base-sepolia: Base Sepolia testnet (requires env config)
Path Parameters
x402 payment token in format {currency}-{network} OR {network}-{currency} (both supported).
Supported Tokens (Enabled by Default):
- usdc-base OR base-usdc: USDC on Base mainnet
- usdc-base-mainnet OR base-mainnet-usdc: Alternative name for Base mainnet
Available (requires env config):
- usdc-base-sepolia OR base-sepolia-usdc: USDC on Base Sepolia testnet (requires X402_BASE_TESTNET_ENABLED=true)
- usdc-ethereum-mainnet OR ethereum-mainnet-usdc: USDC on Ethereum mainnet (requires X402_ETH_ENABLED=true)
- usdc-polygon-mainnet OR polygon-mainnet-usdc: USDC on Polygon mainnet (requires X402_POLYGON_ENABLED=true)
Note: Both token formats are supported for convenience. Use whichever feels more natural.
Future: sol-mainnet, ar-mainnet, etc.
"usdc-base" | "base-usdc" | "usdc-base-mainnet" | "base-mainnet-usdc" | "usdc-base-sepolia" | "base-sepolia-usdc" | "usdc-ethereum-mainnet" | "ethereum-mainnet-usdc" | "usdc-polygon-mainnet" | "polygon-mainnet-usdc"Size of raw data in bytes (before ANS-104 wrapping)
1 <= value <= 4294967296Query Parameters
Number of user tags (default 0)
00 <= value <= 100MIME type (adds Content-Type tag if provided)
Response Body
curl -X GET "https://turbo.ardrive.io/price/x402/data/:token/:byteCount?tags=3&contentType=image%2Fpng"{
"token": "usdc-base",
"currency": "usdc",
"network": "base",
"rawDataSize": 1024,
"userTagCount": 0,
"systemTagCount": 7,
"totalTagCount": 7,
"estimatedDataItemSize": 2576,
"overhead": 1552,
"winstonCost": "674782942",
"usdcAmount": "3642",
"x402Version": 1,
"payment": {
"scheme": "exact",
"network": "base",
"maxAmountRequired": "3642",
"resource": "https://upload.example.com/v1/x402/upload/unsigned",
"description": "Upload 2576 bytes (raw data + ANS-104 overhead) to Arweave via AR.IO Bundler",
"mimeType": "application/octet-stream",
"payTo": "0xCFd3f996447a541Cbfba5422310EDb417d9f2cE6",
"maxTimeoutSeconds": 3600,
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"extra": {
"name": "USD Coin",
"version": "2"
}
}
}"Invalid token \"sol-mainnet\". Supported tokens: usdc-base, usdc-base-mainnet""Failed to calculate pricing"How is this guide?