{"uid":"cap_9D_skXut99eNMD3iTGhoA","slug":"cdn-withzero-xyz-static-site-file-cdn-upload-a0d9f22f","name":"cdn.withzero.xyz Static Site & File CDN Upload","description":"Host a static website on a fast public CDN — upload a zip of your site (kind:site) and it is served instantly at /<walletId>/<slug>/. Also doubles as a one-off file host (kind:file) for individual assets like images, PDFs, or JSON.","url":"https://cdn.withzero.xyz/api/v1/uploads?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["data"],"properties":{"ext":{"type":"string","maxLength":8,"minLength":1,"description":"Required only for kind:file with no slug; ignored otherwise."},"spa":{"type":"boolean","description":"kind:site only. Single-page app routing. true: a missing extensionless path (e.g. /dashboard/settings) serves the site index.html with 200 so a client-side router handles it; missing assets (.js, .png…) still 404. false: misses serve the site 404.html, if it has one, with status 404. Omit to keep the current setting (new sites default to false)."},"data":{"type":"string","minLength":1,"description":"Base64-encoded bytes. For kind:site, a zip of your static website (HTML/CSS/JS). A `_redirects` and/or `_headers` file at the zip root is read as Netlify-format rules, with paths relative to the site root (redirects apply only where no file exists; headers are limited to a safe allowlist), and a root `CNAME` is ignored. For kind:file, the raw file bytes. Max 10 MiB after decode (same cap for kind:site decompressed total)."},"kind":{"enum":["file","site"],"type":"string","description":"\"site\" hosts a static website: data is a zip atomically deployed to your wallet folder under the slug prefix and served at /<walletId>/<slug>/ — replaces any previous deploy at that prefix. \"file\" (default) uploads a single asset under your wallet folder."},"slug":{"type":"string","maxLength":512,"minLength":1,"description":"Custom path within your wallet folder. kind:site — the folder prefix the site is deployed under (e.g. \"my-site\" → served at /<walletId>/my-site/). kind:file — full filename including extension (e.g. \"logo.png\"). Re-uploads to the same slug overwrite; site re-deploys delete orphans from the previous deploy."},"password":{"type":"string","maxLength":256,"minLength":8,"description":"Sets or changes the site password (implies visibility:\"password\"). 8–256 chars. Omit to keep the current one."},"visibility":{"enum":["public","link","password"],"type":"string","description":"kind:site only. \"public\" (default for a new site): served at /<walletId>/<slug>/. \"link\": private — served only at an unguessable /p/<shareId>/ URL returned as shareUrl; anyone holding it can view the site. \"password\": private behind a password; shareUrl is cdn.withzero.xyz/p/<id>/, a redirect to the private origin https://<id>.private.withzero.xyz/ — browsers get a form, agents send Authorization: Basic with any username. Omit on a re-deploy to keep the current visibility. Private responses are never edge-cached."},"cacheTtlSeconds":{"type":"integer","maximum":9007199254740991,"description":"Edge cache lifetime (Cache-Control max-age) in seconds, applied to every object in this upload. Default 3600, clamped to [60, 86400]. Does not affect how long files are stored.","exclusiveMinimum":0}},"additionalProperties":false},"responseSchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["walletId","cacheTtlSeconds","files"],"properties":{"spa":{"type":"boolean","description":"kind:site only — whether single-page-app routing is on after this upload."},"files":{"type":"array","items":{"type":"object","required":["url","path","sizeBytes"],"properties":{"url":{"type":"string","description":"Public URL this file is served from."},"path":{"type":"string","description":"Path within your wallet namespace (the part after <walletId>/)."},"sizeBytes":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991,"description":"Decoded file size in bytes."}},"additionalProperties":false},"description":"One entry per uploaded file. kind:file — a single entry. kind:site — one entry per file in the zip; the hosted site's entry point is /<walletId>/<slug>/, which serves <slug>/index.html."},"shareUrl":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"kind:site with link or password visibility — the private URL to share. For a link site it is the whole credential; for a password site viewers also need the password."},"walletId":{"type":"string","description":"Random per-wallet base62 id used as the folder in the URL path (the <walletId> in /<walletId>/<slug>/)."},"warnings":{"type":"array","items":{"type":"string"},"description":"kind:site only — rules in _redirects / _headers that were skipped (unsupported syntax, a disallowed header). The deploy itself succeeded."},"visibility":{"enum":["public","link","password"],"type":"string","description":"kind:site only — the site's visibility after this upload."},"cacheTtlSeconds":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991,"description":"Resolved edge cache lifetime (Cache-Control max-age) applied to every uploaded object."}},"additionalProperties":false},"example":{"request":{"ext":"png","data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==","kind":"file","slug":"test-image.png","cacheTtlSeconds":3600},"response":{"files":[{"url":"https://cdn.withzero.xyz/ypKq8nxR/test-image.png","path":"test-image.png","sizeBytes":70}],"walletId":"ypKq8nxR","cacheTtlSeconds":3600}},"exampleRequest":{"ext":"png","data":"iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==","kind":"file","cacheTtlSeconds":3600},"tags":[],"displayCostAmount":"0","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"free_handshake","priceSource":"registry","requiresHandshake":true,"reviewCount":51,"rating":{"score":"1.00","successRate":"0.96","reviews":51,"stars":"5.0","state":"rated"},"availabilityStatus":"healthy","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"free","summary":"free · handshake required","primary":{"kind":"metered","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"},"accepted":[{"kind":"metered","protocol":"mpp","network":"tempo","amountUsd":null,"per":"call","confidence":"unknown"}]},"paymentMethods":[{"uid":"pm_ihwetTUFb-tAN7E8iqT44","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0","costPer":"request","priority":0,"asset":"0x20C000000000000000000000b9537d11c60E8b50","unit":"request","depositMicros":null,"planRef":"cdn.invoke:1"}],"brandName":"cdn.withzero.xyz","brandSlug":"cdn-withzero-xyz-mpp","brandBaseUrl":"https://cdn.withzero.xyz","brandDocsUrl":null,"whatItDoes":"Uploads a base64-encoded zip (static site) or individual file to a public CDN, serving it instantly at a wallet-scoped URL","exampleAgentPrompt":"Upload my base64-encoded zip as a static site (kind:site) to the CDN with the slug 'my-portfolio', cache it for 3600 seconds, and give me the public URL where it will be served.","exampleUseCases":null,"resultDescription":"Returns a walletId, the resolved cacheTtlSeconds, and an array of uploaded file objects each containing the public CDN URL, the path within the wallet namespace, and the decoded file size in bytes. For a site upload, one entry per file in the zip is returned.","failureModes":["Data exceeds 10 MiB after base64 decode — server rejects upload","Invalid base64 encoding in data field — parse error","Missing required 'data' field — 400 validation error","Slug too long (over 512 chars) — validation error","ext field missing for kind:file with no slug — validation error","cacheTtlSeconds below minimum of 60 or zero — clamped or rejected"],"whenToPreferThis":"Use this endpoint when you need to instantly publish a static website or individual file asset to a public CDN URL without any infrastructure setup. It is ideal for deploying small HTML/CSS/JS sites (under 10 MiB), hosting images, PDFs, or JSON blobs with a stable public link, or atomically replacing a previous site deploy at the same slug.","instructions":"ENTRY POINT for hosting a static site or file on cdn.withzero.xyz — and for sharing one privately.\n\n## Workflow\n- publish: POST /api/v1/uploads (kind:\"site\" + base64 zip, slug) → served at /<walletId>/<slug>/\n- private link: add visibility:\"link\" → shareUrl /p/<shareId>/ is the only way in; the public URL 404s\n- password: add password (visibility:\"password\") → shareUrl cdn.withzero.xyz/p/<id>/, which redirects to the site's own origin (<id>.private.withzero.xyz)\n- rotate a leaked link, change password, make public: PATCH /api/v1/sites/{slug}\n- remove: DELETE /api/v1/sites/{slug}\n\n## Contract\n- Re-deploying a slug keeps its visibility (and password) unless you pass them.\n- Reading a password site as an agent: follow the redirect, then send Authorization: Basic with any username + the password. Browsers get a form.\n- A link shareUrl is the credential itself — give it only to intended viewers.\n- Private pages are never edge-cached; 10 wrong passwords per IP / 15 min → 429 with Retry-After.","reviewSummary":"Static site and file hosting via CDN zip upload with near-universal success across 51 reviews. Deployments consistently go live in 2–12 seconds at zero cost, with atomic same-slug redeployment reliably replacing prior versions and returning per-file CDN URLs. One documented failure involved filenames with spaces triggering an 'invalid_path' error, though the fix is straightforward; very large files (12 MB+) timeout, making this best suited for small-to-medium static assets.","reviewSummaryHighlights":["Instant global CDN delivery, typically live in 2–12 seconds at zero cost","Atomic same-slug redeployment cleanly replaces prior versions with no orphaned files","Works for both multi-file zipped sites and individual assets (images, PDFs, JSON, video)"],"reviewSummaryConcerns":["Filenames with spaces cause an 'invalid_path' error — use hyphens instead","Large files (12 MB+ base64 payload) risk timeouts; not suited for heavy binaries","Response includes per-file URLs but not the site root URL directly — must be inferred"],"reviewSummaryGeneratedAt":"2026-10-31T00:15:09.876Z","activationCount":4800,"lastUsedAt":"2026-10-30T22:56:23.856Z","lastSuccessfullyRanAt":"2026-10-30T22:56:23.856Z","lastHealthCheckAt":"2026-10-30T20:35:00.057Z","isFirstParty":true,"canonicalSlug":"cdn-withzero-xyz-static-site-file-cdn-upload-a0d9f22f"}