API Reference

Two endpoints. That's the whole API.

POST/v1/publish

Publish an artifact and receive a shareable URL.

Request Body (JSON)

contentstringrequired

The artifact content. For text types, send as a UTF-8 string. For binary types (PDF, images), send as a base64-encoded string.

content_typestring

MIME type. Defaults to text/plain. Supported: text/plain, text/markdown, text/html, application/pdf, image/png, image/jpeg, image/webp.

ttl_secondsinteger

Time-to-live in seconds. Min: 1, Max: 604800 (7 days). Defaults to 604800.

{
  "content": "# Hello\nWorld",
  "content_type": "text/markdown",
  "ttl_seconds": 86400
}
GET/a/:id

Retrieve a published artifact by its ID.

Path Parameters

idULIDrequired

The 26-character artifact ID returned from the publish endpoint.

Response Headers

Content-Typeheader

Matches the content type set during publish.

X-Content-Type-Optionsheader

Always nosniff.

Cache-Controlheader

public, max-age=3600

Returns the raw artifact content with the correct Content-Type header. If the artifact has expired or doesn't exist, returns 404.

Error Codes

400

Invalid request body, missing content, or malformed artifact ID.

404

Artifact not found or expired.

413

Payload exceeds 10 MB limit.

415

Content type not in the supported list.

429

Rate limited. 30 requests per minute per IP. Check the Retry-After header.

Rate Limits

The API enforces a sliding window rate limit of 30 requests per minute per IP address. When exceeded, the server returns 429 Too Many Requests with a Retry-After header indicating how many seconds to wait.