Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Upload content

POST /v1/upload

Upload any content to Arweave via Irys. Returns a permanent ar:// hash.

Free — the Arweave storage cost is covered by the $2 USDC paid in pushVersion.

Request body (application/json):

{
  "data":        "<base64-encoded content>",
  "contentType": "application/json",
  "filename":    "manifest.json"
}
FieldTypeRequiredDescription
datastringBase64-encoded file content
contentTypestringMIME type
filenamestringOptional filename tag on Arweave

Max size: 50 MB

Response:
{
  "hash":  "ar://QmAbc123...",
  "txId":  "QmAbc123...",
  "url":   "https://arweave.net/QmAbc123...",
  "bytes": 1024,
  "cost": {
    "usdc": "1844",
    "usd":  "$0.0018"
  }
}

Example

import { readFileSync } from "fs";
 
const data = readFileSync("./dist/agent.js");
 
const res = await fetch("https://api.inkdprotocol.com/v1/upload", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    data:        data.toString("base64"),
    contentType: "application/javascript",
    filename:    "agent.js",
  }),
});
 
const { hash, url } = await res.json();
console.log(hash); // ar://QmAbc123...

Estimate upload cost

GET /v1/upload/price?bytes=4096

Returns the Arweave cost estimate for a given upload size.

Query params:
ParamTypeDescription
bytesnumberUpload size in bytes
Response:
{
  "bytes": 4096,
  "costUsdc": "1844",
  "costUsd": "$0.0018"
}

costUsdc is in USDC with 6 decimals. Divide by 1e6 for USD.