Catalog
UtilitiesPOSTlive

File upload slot

Buy a one-shot upload slot: get a presigned URL to upload a single file and the public URL it will be served from.

$0.005-$2.00
per call
Success
p50 latency
p95 latency
Calls (30d)
0

Provider contract

Call path
/routes/stableupload/utilities/upload-slot
Method
POST
Selected provider
stableuploaddefault
Provider price
Dynamic $0.005-$2.00; quote required
Settlement
Base USDC · x402 · 5% h402 fee

Quickstart

Both commands call the selected provider directly.

cURL
curl -X POST '/routes/stableupload/utilities/upload-slot' \
  -H 'content-type: application/json' \
  -d '{"filename":"example.txt","contentType":"text/plain","tier":"short-10mb"}'
CLI
h402 call 'utilities/upload-slot' --provider 'stableupload' --method POST --json '{"filename":"example.txt","contentType":"text/plain","tier":"short-10mb"}'

Parameters & live test

pays real USDC

Fill the request fields, quote the exact per-call total, then choose x402 or eligible bonus credit explicitly before sending. Only the selected provider's listed parameters are accepted.

filenamestringrequired1–512 chars

Name of the file you intend to upload.

e.g.
contentTypestringrequired1–255 chars

MIME type of the file you intend to upload, such as image/png or video/mp4.

e.g.
tierstringrequired

Storage tier. The size suffix is the maximum file size; short-* tiers retain the file for about 7 days (use them for transient workflow outputs), the others for about 6 months (reusable links, not permanent). Price scales with the tier.

One of
policyTtlSecondsintegeroptional60–86400

How long the upload authorization stays valid, in seconds. Use a longer TTL only when reserving the slot for a downstream service.

POST/routes/stableupload/utilities/upload-slot
Request body
{
  "filename": "example.txt",
  "contentType": "text/plain",
  "tier": "short-10mb"
}

ResponseExample response
{
  "data": {
    "uploadId": "r6f9ah86kk",
    "uploadUrl": "https://x402-upload-prod.s3.us-east-1.amazonaws.com/",
    "uploadMethod": "post",
    "uploadUrlExpiresAt": "2026-07-22T16:05:00.870Z",
    "postUrl": "https://x402-upload-prod.s3.us-east-1.amazonaws.com/",
    "postFields": "[redacted from committed sample]",
    "publicUrl": "https://f.stableupload.dev/r6f9ah86kk/example.txt",
    "expiresAt": "2026-07-29T15:50:00.122Z",
    "maxSize": 10485760,
    "curlExample": "[redacted from committed sample]"
  },
  "h402": {
    "routeId": "utilities/upload-slot",
    "provider": "stableupload",
    "selectedCandidateId": "utilities/upload-slot/stableupload",
    "routing": "manual",
    "paidBy": "x402-exact"
  }
}

Providers

Choose a provider for this task. The catalog recommends the current default from quality, reliability, and price; your selected provider stays pinned. Listed prices are provider prices; settlement adds a 5% h402 fee.

stableupload
x402
Success
p50
Calls
Dynamic $0.005-$2.00; quote required
Last successful call: Never· Aggregated by h402 — not the source provider