Integration · no API key
The anyshare REST API
A file hosting API that needs no key and no account: POST a file or a folder’s files, get a live URL back, then update or delete it with the token from the response.
No install, no account. Returns JSON with your link and a claim link to keep it.
curl -F file=@index.html https://anyshare.ai/api/v1/sites- No account to publish
- No API key
- Keep links 30 days with a free account
The whole API on one page
The base path is /api/v1 on the app domain, and there are four endpoints. POST /sites creates a link, GET /sites/{slug} returns its public metadata, PUT /sites/{slug} replaces the content at the same URL, and DELETE /sites/{slug} removes it. Changing or deleting a link needs Authorization: Bearer <token>.
Without an account a link expires 1 hour after upload unless someone keeps it: the response has a claimUrl where a person signs in or creates a free account, and the link then lasts 30 days. Send Authorization: Bearer as_key_… (a key from npx -y @anyshare/cli login) on the create and the link is in that account from the start; the same key can update or delete it instead of the token. POST /sites/{slug}/claim keeps an existing link from code.
Uploads are multipart file fields, and a filename may carry a relative path (assets/app.js), so a whole site can go up in one request. Or send a raw body with an X-Filename header. A single .zip is unpacked. Optional fields: slug, title, and spa=true for single-page apps.
Reference
Requests
Copy, paste, change the file name.
Create
Multipart file field. The JSON response has url, token and, without an account, claimUrl.
curl -F file=@report.pdf https://anyshare.ai/api/v1/sitesSeveral files
Filenames carry relative paths, so links between the files keep working.
curl -F "file=@index.html" -F "file=@assets/app.js;filename=assets/app.js" https://anyshare.ai/api/v1/sitesFolder
Zipped on the fly, without .env files. A single .zip is unpacked into a site.
(cd dist && zip -qrD - . -x '.env*' '*/.env*') | curl -F "file=@-;filename=site.zip" https://anyshare.ai/api/v1/sitesRaw body
X-Filename sets the name; Accept: text/plain returns just the URL.
curl --data-binary @notes.md -H "X-Filename: notes.md" -H "Accept: text/plain" https://anyshare.ai/api/v1/sitesUpdate / delete
The token from the create response. The URL stays the same on update.
curl -X PUT -H "Authorization: Bearer $TOKEN" -F file=@report.html https://anyshare.ai/api/v1/sites/sunny-otter-4821
curl -X DELETE -H "Authorization: Bearer $TOKEN" https://anyshare.ai/api/v1/sites/sunny-otter-4821Response
Returned once, with status 201. Store token privately: it authorizes updates and deletion.
{
"slug": "sunny-otter-4821",
"url": "https://sunny-otter-4821.anyshare.site",
"mode": "site",
"kind": "html",
"files": 3,
"bytes": 48213,
"plan": "free",
"expiresAt": "2026-11-25T11:00:00.000Z",
"version": 1,
"claimed": false,
"token": "as_tok_…",
"manageUrl": "https://anyshare.ai/…",
"claimUrl": "https://anyshare.ai/claim/sunny-otter-4821#token=as_tok_…"
}When it’s shared
What the URL shows
The url in the response opens the right viewer for what you sent. Add ?raw to a file URL for the original bytes, or ?download to download it.
- Websites from HTML or a zip
- Viewers for PDFs, JSON and more
- Raw bytes with ?raw
- Range requests for video and audio
How it works
Create, read, change
- Step 1:
POST the file
Send one or more
filefields to/api/v1/sites. The response has status201and a JSON body. - Step 2:
Read the response
Show
urlto the user, withclaimUrlif there is one, keeptokenprivately, and useexpiresAtto know exactly when the link goes away. - Step 3:
PUT or DELETE later
Same body as the create, plus
Authorization: Bearer <token>. The URL doesn’t change when you update.
The details
Details that matter in production
Retry-safe creates
Send
Idempotency-Key: <uuid>on POST. Repeating a create with the same key returns the original link instead of making a second one.Plain-text mode
Accept: text/plainreturns just the URL and a newline, which is handy in shell scripts. The claim link comes in theX-Anyshare-Claim-Urlheader.Errors written for people
{"error":{"code":"…","message":"…"}}with stable codes:bad_request,too_large,too_many_files,unsupported,slug_taken,invalid_slug,unauthorized,not_found,already_claimed,rate_limited,internal. The message can be shown as is.Notes explain what happened
When there’s something to say,
notesexplains how the upload was read: a zip was unpacked, a wrapping folder was used, or a single-page app was detected.Rate limits
Uploads are rate limited per IP address. Over the limit you get
429withrate_limited; wait and retry with the same idempotency key.Free limits
50 MB per upload (all files combined), 1,000 files per link. Without an account a link lasts 1 hour; keep it with a free account and it lasts 30 days from the upload.
FAQ
Questions, answered.
Is there an API key?
npx -y @anyshare/cli login) is optional: send it as Authorization: Bearer and links go straight into your account, with no claim step.Is there an OpenAPI spec?
/llms-full.txt, a plain-text file written for agents to read, and the endpoints are small enough to fit on this page.Can I choose when a link expires?
expiresAt in every response says exactly when. Links that don’t expire are part of Pro, which is coming soon.How do I retry without creating duplicates?
Idempotency-Key header with a UUID on POST, and reuse it on every retry. Retry network errors, 429 and 5xx responses with backoff.Can I tell you which tool is publishing?
X-Anyshare-Source (cli, mcp or api) and X-Anyshare-Client (for example claude-code or codex). They help show who published a link.Give your agent a URL for any file.
One step to connect, no account or API key. It hands you back a link anyone can open, and a claim link to keep it.





