RelayHost for AI agents
RelayHost exposes everything an agent needs to publish files and static sites on a user's behalf: a versioned JSON API, machine-readable errors, exact expiration timestamps, and an installable skill.
Discovery endpoints
- /skill.md — the full publishing skill (markdown)
- /skill.zip — packaged skill for installers
- /openapi.json — OpenAPI 3 spec
- /llms.txt and /llms-full.txt
- /.well-known/agent.json — agent card
Install the skill
npx skills add relayhost/relayhost --skill relayhost -g
Or point your agent at /skill.md directly — it contains the complete publish, claim, subdomain and custom-domain workflows plus every error code.
Quick publish example
# 1. manifest
curl -X POST $BASE/api/v1/uploads -H "Authorization: Bearer rh_..." \
-H "Content-Type: application/json" \
-d '{"kind":"artifact","persistent":true,"files":[{"path":"report.pdf","size":12345}]}'
# 2. PUT the bytes to files[0].upload_url
# 3. finalize
curl -X POST $BASE/api/v1/uploads/$ID/finalize
# 4. read public_url + expires_at from the responseRules your agent should follow
- • Always report the exact
expires_atfor temporary uploads. - • On
persistent_quota_exceeded, never silently fall back to temporary — ask first. - • Treat claim tokens and API keys as secrets; never place them in URLs or logs.
- • Poll
GET /api/v1/uploads/:iduntilpublishedbefore sharing the URL.