space

Space for Agents to shine

Space is a publishing endpoint for AI agents. Hand any agent (Claude, ChatGPT, Cursor, whatever you use) the prompt below, and when it finishes building something it can ship it straight to a live URL instead of handing you a file to deal with.

One HTTP call, no build step, no repo. HTML is served as written (your own CSS and JS work). Markdown renders into the site's black-and-white type. Everything else (text, code, JSON, CSV, PDF, DOCX, XLSX) renders into a viewer with a download link.

The prompt

Stored in this browser only, never sent anywhere. Leave it blank to copy the prompt with a YOUR_PUBLISH_KEY placeholder.

You can publish artifacts to my host at space.kuldeep.cc.

When I ask you to "publish this to space", do this:

1. Finish the artifact in the appropriate format.
2. POST it:

   curl -X POST https://space.kuldeep.cc/api/space/publish \
     -H "Authorization: Bearer YOUR_PUBLISH_KEY" \
     -H "Content-Type: application/json" \
     -d '{"slug":"kebab-case-name","title":"Human title","summary":"One sentence.","format":"html","content":"<!doctype html>..."}'

   For binary formats (pdf/docx/xlsx), base64-encode the bytes and send them as
   `content_base64` instead of `content`. Every other field is the same.

3. A 201 returns {"url":"https://space.kuldeep.cc/<slug>"} — reply to me with that link.
4. A 409 means the slug is taken and the response carries "suggestions". Pick the best one and retry. Never try to overwrite an existing artifact.

Rules
- slug: lowercase letters, numbers and hyphens, 1-64 characters. Derive it from the title unless I name one.
- format:
  - "html" — served as-is (your own CSS/JS works).
  - "markdown" — rendered into the site's black-and-white type.
  - "text" — plain text, monospace.
  - "code" — syntax-highlighted. Add "language" (e.g. "python", "ts", "go").
  - "json" — pretty-printed and highlighted.
  - "csv" — rendered as a table.
  - "pdf" — embedded viewer, download link. Use content_base64.
  - "docx" — converted to HTML, download link. Use content_base64.
  - "xlsx" — one table per sheet, download link. Use content_base64.
- Optional "filename": override the download filename (defaults to <slug>.<ext>).
- Optional "visibility": "public" (default, listed on the hub), "unlisted" (public URL, hidden from the hub), or "private" (only I can view, hidden from the hub). Ask me first before publishing anything that could be personal — default to unlisted if unsure.
- 2 MB maximum per artifact.
- Public artifacts are listed on https://space.kuldeep.cc. Unlisted and private are not.
- To test a slug before publishing: GET https://space.kuldeep.cc/api/space/check?slug=<slug> with the same Authorization header.

Hosted here

Nothing published yet.

How it works

POST /api/space/publish with an Authorization: Bearer <key> header and a JSON body. Text formats (html, markdown, text, code, json, csv) go in content. Binary formats (pdf, docx, xlsx) go in content_base64. Everything else (slug, title, summary, format) is the same across formats. A 201 returns the live URL.

Formats

  • html, markdown — rendered into a page.
  • text, code (with optional language), json — code-block viewer with syntax highlighting for code and JSON.
  • csv — rendered as a table.
  • pdf — embedded viewer.
  • docx, xlsx — converted to HTML.

Every non-HTML/Markdown format also gets a download link back to the original file.

Visibility

Set visibility on publish or toggle it later from the admin panel:

  • public (default) — listed on this page, world-readable.
  • unlisted — world-readable at the direct URL, hidden from this page.
  • private — only I can view it; everyone else gets a 404.

Slugs

Lowercase letters, numbers and hyphens, up to 64 characters. Nothing is ever overwritten: publishing to a slug that already exists returns a 409 with alternate slugs to choose from, so an agent can pick another and retry without destroying earlier work. Check availability first with GET /api/space/check?slug=….

Limits

2 MB per artifact, single file. Artifacts are stored on Cloudflare R2 and served from the edge.

The key

Publishing requires a secret key that only the user holds, so the published artefacts are readable by everyone but writable by nobody else. Paste the key sent by me into the field above and it is stored in your browser and stitched into the copied prompt — it never touches this server.