The publish API
Send the content you generated and get a live link back in one request. No file upload form, no account, just JSON.
POST https://api.snapy.host/api/publish
Content-Type: application/json
{
"content": "<!doctype html><h1>Hello from an AI</h1>",
"filename": "index.html",
"name": "my-demo"
}
content is the text or HTML to publish. filename is optional and sets the type (defaults to index.html). name is optional and sets the link name. For a binary file, send content_base64 instead of content.
You get back:
{
"url": "https://my-demo.snapy.page",
"stats_url": "https://snapy.host/a/XXXX",
"token": "XXXX"
}
url is the live link to share. stats_url is your private page to see views and downloads. Open the link right away.
Try it with curl
curl -X POST https://api.snapy.host/api/publish \
-H "content-type: application/json" \
-d '{"content":"<h1>It works</h1>","name":"hello"}'
Use it from a ChatGPT custom GPT
This is the fun part. You can give a custom GPT the power to host what it builds and reply with a link.
- In ChatGPT, create or edit a custom GPT and open the Actions area.
- Import the schema from
https://api.snapy.host/openapi.json. - Save. Now when you ask the GPT to build a page, it can publish it and give you a working link.
Use it from any AI agent or script
It is a plain HTTP POST, so anything that can make a web request can use it: a Python or Node script, a no-code tool like Zapier or Make, or an autonomous agent. The agent builds something, calls the endpoint, and shares the link it gets back.
Response codes and errors
The endpoint returns JSON. Check the HTTP status to handle errors cleanly.
| Status | Meaning | What to do |
|---|---|---|
| 200 | Published | Read url, stats_url, and token from the body |
| 400 | Bad request | Send valid JSON with either content or content_base64 |
| 413 | File too large | Keep the file under 100MB |
| 415 | Blocked file type | The type is not allowed (executables and macro-enabled office files are blocked) |
| 429 | Rate limited | Slow down and retry after a short wait |
| 5xx | Server error | Retry after a short backoff |
On an error the body includes an error field with a short message, so log that when a call fails.
Limits
- Up to 100MB per file.
- Fair-use rate limits per client, so space out large batches and back off on a 429.
- Free to use right now, with no account.
Security notes
- Calls go over HTTPS only.
- No API key is needed today, so do not put secrets in the page content you publish (anyone with the link can open it).
- The
tokenin the response is sensitive: it unlocks the private analytics page and link management, so treat it like a password and do not paste it into public code. - For a published page that should not be public, set a password when you create it.
OpenAPI schema
The full machine-readable schema is at https://api.snapy.host/openapi.json (also mirrored at /openapi.json on this domain). Import it into a ChatGPT custom GPT action, an API client, or a code generator to get typed calls without writing the request by hand.
Step-by-step guides for each tool
There is a short how-to for every popular tool in the integrations section:
- ChatGPT custom GPT action
- Claude MCP connector
- Zapier, Make, and n8n automation
- Python and JavaScript scripts
MCP server for Claude
A dedicated MCP server lets assistants like Claude call Snapy as a built-in publish tool. See the Claude integration guide for how to add it.
Want to see it in action first? Upload a file or read how to share an AI-generated page.
