ar.io Logoar.io Documentation
TurboUpload Service

Pricing

Pricing calculation endpoints

Gets the price in winc to upload a data item

GET
/price/:token/:byteCount

Path Parameters

tokenstring

The token to use for validating the transaction.

Value in"arweave" | "ethereum" | "solana"
byteCountinteger

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

GET
/price/:token

Path Parameters

tokenstring

The token to use for validating the transaction.

Value in"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:

  1. Get Winston cost from Arweave gateway for exact byte count
  2. Convert Winston to USDC using current AR/USD rate
  3. 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.

GET
/price/x402/data-item/:token/:byteCount

Path Parameters

tokenstring

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.

Value in"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"
byteCountinteger

Size of the complete signed data item in bytes

Range1 <= value <= 4294967296

Response 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):

  1. Bundler - Service name
  2. Upload-Type - "raw-data-x402"
  3. Payer-Address - Ethereum address from payment
  4. X402-TX-Hash - Blockchain transaction hash
  5. X402-Payment-ID - UUID payment identifier
  6. X402-Network - Payment network (e.g., "base")
  7. Upload-Timestamp - Unix timestamp

Query Parameters:

  • tags: Number of user tags (default: 0)
  • contentType: MIME type (adds Content-Type tag if provided)

Pricing Formula:

  1. Calculate total tags (user + system + contentType if provided)
  2. Estimate final data item size: rawDataSize + signature + owner + headers + (totalTags × 64)
  3. Get Winston cost from Arweave gateway for estimated size
  4. Convert Winston to USDC using current AR/USD rate
  5. 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)
GET
/price/x402/data/:token/:byteCount

Path Parameters

tokenstring

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.

Value in"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"
byteCountinteger

Size of raw data in bytes (before ANS-104 wrapping)

Range1 <= value <= 4294967296

Query Parameters

tags?integer

Number of user tags (default 0)

Default0
Range0 <= value <= 100
contentType?string

MIME 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?