Home/API Documentation
Developer & AI Agent Reference

High-Speed Static Hosting API for Developers & AI Agents

Programmatically publish, update, and manage CSS, JS, JSON, XML, Markdown, and Base64 images with edge CDN delivery. Zero CAPTCHA challenges, automatic CORS, and sub-second URLs.

Personal API Bearer Token

Use your personal Bearer token for programmatic file updates, folder isolation, and unlimited zero-CAPTCHA operations.

Authorization: Bearer ss_your_token_here
Get API Key (Free)
Base Endpoint
https://api.staticsave.com/api

REST API root for authenticated user data, actions, and temporary uploads.

CDN Delivery
cdn.staticsave.com/{folder}/{file}

Anycast global caching with sub-50ms TTFB and automated cache invalidation.

CORS & Security
Origin: * | nosniff

Automatic wildcard CORS headers for seamless script injection and fetch() calls.

Supported Formats
css, js, json, xml, txt, md, webp, jpg

Text files and Base64 images up to 30,000 characters per file payload.

Reference

API Endpoints Reference

Available Endpoints (8)
POSThttps://api.staticsave.com/api/user/data
Bearer Token

List Folders

Returns a list of every folder created under your account along with creation date, page counts, and last update timestamp.

Request Parameters (application/x-www-form-urlencoded)

ParameterTypeRequiredDescription
foldersstringRequiredRequired flag. Set to 1 to query folder metadata.

CURL Request Example

curl -X POST https://api.staticsave.com/api/user/data \
  -H "Authorization: Bearer ss_your_api_token_here" \
  -d "folders=1"

Expected JSON Responses

200 OK (Success)
{
  "status": true,
  "message": "Folders fetched",
  "folders": [
    {
      "custom": "myfolder",
      "date": "2026-08-25 18:07:03",
      "pagecounts": 4,
      "lastupdate": "2026-09-03 09:31:36"
    }
  ]
}
Error Payload
{
  "status": false,
  "message": "Invalid or expired token"
}
Interactive Sandbox

Live Request Builder

Customize parameters to generate instant, copy-ready cURL or JavaScript snippets tailored with your folder and token.

4-15 alphanumeric chars
Without extension
Select target format
Overrides default placeholder
Generated cURL Command:Live URL: https://cdn.staticsave.com/myfolder/script.js
curl -X POST https://api.staticsave.com/api/user/action \
  -H "Authorization: Bearer ss_your_api_token_here" \
  -d "addpage=1&custom=myfolder&pagename=script&pagetype=js&content=console.log('StaticSave%20API%20ready')%3B"
Automated Coding Workflows

Engineered for Autonomous AI Coding Agents

Cursor, Claude Code, Windsurf, AutoGPT, Cline, and custom LLM agents frequently need to publish live prototypes, mock REST endpoints, and styles without getting blocked.

Zero Interactive CAPTCHAs

Standard cloud hosting platforms present Cloudflare turnstiles or bot puzzles that immediately break automated agent tool calls. StaticSave API has zero CAPTCHA challenges.

Instant Mock REST APIs

When scaffolding a client-side web application, agents can upload sample datasets with pagetype=json and instantly obtain a live, CORS-enabled mock API endpoint.

Machine-Readable Spec (agents.md)

Point any LLM system prompt directly to staticsave.com/agents.md for a clean, deterministic, markdown-formatted API cheatsheet.

Agent Integration Best Practices
01
Sequential Requests OnlyAvoid firing parallel bursts or loops. StaticSave rate limiters monitor rapid bursts to preserve edge quality.
02
Handle HTTP 429 GracefullyIf your agent receives an HTTP 429, implement an exponential backoff pause (3–5 seconds) before retrying.
03
Temporary vs AuthenticatedUse Temporary Hosting for short-lived test previews; use your Bearer Token when creating permanent links that require updates.
04
Timestamp VerificationFor temporary uploads, ensure your agent sets utc-date-within-10-seconds to current UTC (ISO 8601).

Supported MIME Types & CDN Delivery Specs

StaticSave delivers strict Content-Type headers for every format, preventing MIME-sniffing and cross-site script block errors.

Extension (pagetype)Delivered Content-TypeMax LimitPayload TypeEdge CDN Header
.csstext/css; charset=UTF-830,000 charsRaw CSS StringAccess-Control-Allow-Origin: *
.jsapplication/javascript; charset=UTF-830,000 charsRaw JS StringAccess-Control-Allow-Origin: *
.jsonapplication/json; charset=UTF-830,000 charsRaw JSON StringAccess-Control-Allow-Origin: *
.xmlapplication/xml; charset=UTF-830,000 charsRaw XML StringAccess-Control-Allow-Origin: *
.txttext/plain; charset=UTF-830,000 charsRaw Text StringAccess-Control-Allow-Origin: *
.mdtext/markdown; charset=UTF-830,000 charsRaw Markdown StringAccess-Control-Allow-Origin: *
.webpimage/webp30,000 chars (~22KB)Base64 encoded binaryAccess-Control-Allow-Origin: *
.jpgimage/jpeg30,000 chars (~22KB)Base64 encoded binaryAccess-Control-Allow-Origin: *

HTTP Error Codes & Responses

StaticSave APIs return consistent JSON payloads with a boolean status and a human-readable message.

200 OK

Success

The request was successful. Payload includes "status": true and the resulting resource ID or URL.

400 Bad Request

Validation Error

Missing required parameters, invalid folder name characters (non-alphanumeric), or file size exceeding 30,000 characters.

401 Unauthorized

Invalid Token

Missing or expired Bearer token in the Authorization header. Generate a new token in your profile.

429 Rate Limit

Too Many Requests

Sequential request burst threshold exceeded. Pause for 3 to 5 seconds before dispatching the next file update.

Frequently Asked Questions

Everything you need to know about integrating with the StaticSave REST API and CDN.

Chrome Web Store

StaticSave Chrome Extension

FREE

Host files, inject scripts, and speed up your workflow directly inside your browser tabs.