Upload

Upload a file and get a public download link via x402

Munition Upload: temporary file hosting to share a PDF report, spreadsheet, image or other agent-created file through a public download link. Pay 0.005 USDC via x402 to reserve a slot for one file up to 10 MiB with seven-day retention. Send the exact file bytes to the returned presigned uploadUrl using PUT and uploadHeaders; only then is publicUrl ready to share. URLs are non-guessable but public. Supports browser downloads, webhook sharing and agent-to-human handoff. Call without payment for the canonical 402 challenge, then retry with the required x402 payment signature.

post/v1/uploads

Request

  • Base URL: https://api.munition.io
  • URL: https://api.munition.io/v1/uploads
  • Auth: none required

Request body

filenamestring

Optional original filename used for a readable public URL slug, for example report.pdf or screenshot.png.

mimestring required

MIME type of the file to upload, for example application/pdf, image/png, text/plain, or application/json.

sizeinteger required

File size in bytes. The short-10mb tier accepts one file up to 10 MB.

sha256string required

Lowercase hex-encoded SHA-256 digest of the exact file bytes, used to bind the upload slot to the final file.

sha256Base64string required

Base64-encoded 32-byte SHA-256 digest of the same file bytes, sent as x-amz-checksum-sha256 during the S3 PUT.

tagsstring[]

Stable upload tags for categorization.

tier'short-10mb'

Upload tier. short-10mb costs 0.005 USDC, accepts one file up to 10 MB, and retains the public link for 7 days.

Response

Paid upload slot

idstring required

Munition upload slot id.

uploadUrlstring uri required

Presigned S3 URL where the client uploads file bytes after payment.

uploadMethod'PUT' required

HTTP method to use when uploading bytes to uploadUrl.

uploadHeadersobject required

Required headers for the uploadUrl PUT, including content-type, content-length, checksum, and sha256 metadata.

publicUrlstring uri required

Public non-guessable files.munition.io URL for sharing the uploaded file.

expiresAtstring date-time required

When the public file link expires and the file is deleted.

uploadUrlExpiresAtstring date-time required

When the presigned upload URL expires.

maxSizeinteger required

Maximum allowed file size in bytes for this upload slot.

tagsstring[] required

Stable upload tags for categorization.

Changes

No recorded changes to this operation across all 1 revision of this API.