Overview

temp.md is an instant file host built for AI agents. POST a file, get back a live URL. No account, no SDK, no config.

One URL per publish. Upload a single HTML file or a full bundle with CSS, JS, and assets. Update in place with an updateToken. Links are live for 7 days and can be claimed permanently.


Publish

Send a POST to https://api.temp.md/temps as multipart/form-data.

Use the field name file for your entry point (served as index.html). Additional files use the field name files/<path> — for example files/style.css.

curl — single file
curl -X POST https://api.temp.md/temps \
  -F "file=@index.html;type=text/html"
curl — multi-file bundle
curl -X POST https://api.temp.md/temps \
  -F "file=@index.html;type=text/html" \
  -F "files/style.css=@style.css;type=text/css" \
  -F "files/app.js=@app.js;type=text/javascript"
python
import requests

res = requests.post(
    "https://api.temp.md/temps",
    files={
        "file": ("index.html", open("index.html", "rb"), "text/html"),
        "files/style.css": ("style.css", open("style.css", "rb"), "text/css"),
        "files/app.js": ("app.js", open("app.js", "rb"), "text/javascript"),
    },
)

data = res.json()
print(data["canonicalUrl"])  # your live link
print(data["updateToken"])   # save this to update later

Update

Use the updateToken from your publish response to push new content to the same URL. Send a PUT to https://api.temp.md/temps/:id with the same multipart format. The link never changes.

curl
curl -X PUT https://api.temp.md/temps/<tempId> \
  -H "Authorization: Bearer <updateToken>" \
  -F "file=@index.html;type=text/html" \
  -F "files/style.css=@style.css;type=text/css"

Response format

Publish and update return different shapes.

Publish response 201

json
{
  "tempId": "xxxxxxxxxxxxxxxx",
  "canonicalUrl": "https://your-awesome-project.temp.md",
  "updateToken": "xxxxxxxxxxxxxxxx",
  "claimToken": "xxxxxxxxxxxxxxxx",
  "claimLink": "https://temp.md/claim?id=...&token=...&url=...",
  "expiresAt": "2026-04-13T00:00:00.000Z",
  "hint": "Ask the user: would you like to enable comments on this page?..."
}
tempId string Unique ID for this Temp. Use it in the PUT URL to update.
canonicalUrl string The live URL for this file.
updateToken string Pass as Authorization: Bearer header to PUT updates to the same URL.
claimToken string Token to permanently claim this Temp to an account.
claimLink string Ready-to-use claim URL. Open in a browser to attach this Temp to your account.
expiresAt string (ISO 8601) When the file expires unless claimed or updated.
hint string Prompt for the agent to relay to the user — asks whether to enable comments on this Temp.

Update response 200

json
{
  "tempId": "xxxxxxxxxxxxxxxx",
  "canonicalUrl": "https://your-awesome-project.temp.md",
  "versionId": "xxxxxxxxxxxxxxxx",
  "expiresAt": "2026-04-13T00:00:00.000Z"
}
tempId string ID of the Temp that was updated.
canonicalUrl string The live URL (unchanged).
versionId string ID of the newly created version.
expiresAt string (ISO 8601) Refreshed expiry — the 7-day clock resets on every update.

Lifecycle

Published files are live for 7 days from the last publish or update.

Every update resets the 7-day clock. A file that's actively being updated stays live indefinitely for free.

After expiry, files enter a 7-day grace period where they can be restored. After that they are deleted.

Claim a link to own it permanently — no expiry, no grace period.


Limits

Max file size 10 MB per file
Link lifetime 7 days (resets on update)
Files per bundle Unlimited (fair use)
Rate limit None (fair use)
Auth required No (to publish or update)

Comments

Temps support optional pinned comments powered by Pindrop.js. When enabled, visitors can drop pins directly onto the page to leave feedback — no account required.

Comments are off by default. After publishing, the response includes a hint field prompting the agent to ask the user if they'd like to turn them on. You can also toggle comments at any time.

Enable comments

Use the updateToken from your publish response.

curl
curl -X PATCH https://api.temp.md/temps/<tempId>/settings \
  -H "Authorization: Bearer <updateToken>" \
  -H "Content-Type: application/json" \
  -d '{"commentsEnabled": true}'

Pass "commentsEnabled": false to turn them off. Existing comments are preserved — they'll reappear if you re-enable. Claimed Temps can also toggle this from the dashboard.

How it works

When enabled, the Pindrop script is automatically injected into your page before it's served — no changes to your HTML needed.

Comments are stored per-Temp and visible to anyone with the link. There's no login required to leave a comment.

Deleting a Temp removes all its comments permanently.