Developers and AI

Publish from code or an AI in one call

Snapy has a simple API so a script or an AI assistant can publish what it makes and hand back a link. It needs a free API key, so every page has an account behind it.

Publish from code or an AI in one call

The publish API

Send the content you generated and get a live link back in one request. No file upload form, just JSON.

Publishing needs an API key, whatever you are publishing. A page or file that anyone could host anonymously is what phishing uses, and the website has always asked you to confirm an email address before a link goes live. The API asks the same. Create a key in your Snapy dashboard under API keys, then send it as Authorization: Bearer <key> on the publish call. X-Api-Key: <key> works too, for tools that cannot set an Authorization header. A session cookie works instead if you are calling from your own signed-in site.

The key is free. It needs a confirmed email address and nothing else, and what you can publish with it is bounded by the same one-live-link allowance the website gives you.

POST https://api.snapy.host/api/publish
Content-Type: application/json
Authorization: Bearer <your key>

{
  "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" \
  -H "Authorization: Bearer $SNAPY_API_KEY" \
  -d '{"content":"<h1>It works</h1>","name":"hello"}'

Set SNAPY_API_KEY to a key from your dashboard first. Without it the call answers 401, because every publish needs an account behind it.

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.

  1. In ChatGPT, create or edit a custom GPT and open the Actions area.
  2. Import the schema from https://api.snapy.host/openapi.json.
  3. 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 150MB
415 Blocked file type The type is not allowed (executables and macro-enabled office files are blocked)
401 No key, or a key that is not valid Publishing needs a key. Create a free one in your dashboard under API keys
403 Email not verified Confirm your email address, then publish
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

Security notes

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:

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.

Try the app first

Drop a file, get a link. Free, and you verify your email once.

Upload a file
Snapy Pro · unlimited links, and who opened them Refundable within 7 days