API workflow

One upload endpoint for generated HTML explainers.

The API is intentionally narrow: authenticate with an API key, upload one HTML file, and receive a hosted explainer URL with metadata your tool can store.

Request shape

Send multipart form data to the upload endpoint with the HTML file plus optional title, description, tags, and visibility metadata.

  • Endpoint: POST /api/v1/upload.
  • Authentication: Authorization: Bearer xp_live_... or xp_test_... depending on environment.
  • File field: file=@./explainer.html;type=text/html.

Response contract

The response is designed for agents to consume directly. Store the URL, slug, expiry, visibility, and sanitized flag in your own workflow output.

  • url is the shareable app-domain page.
  • expires_at is null for Pro retention and a timestamp for free-tier retention.
  • sanitized tells the caller whether unsafe content was removed before storage.

When to use the skill instead

Use the companion explainer skill when you want the agent to generate a complete explainer and publish it in one opinionated flow. Use the API when you already have HTML.

  • Skill path: best for Claude Code and other custom-instruction workflows.
  • API path: best for CI, internal tools, and agents with their own HTML generator.
  • Docs path: use /docs/reference when implementing a full client.