# Stacktree /provision — Provision API Key for Private HTML Sharing

> Stacktree /provision — Provision API Key for Private HTML Sharing is a paid API for AI agents from api.stacktr.ee, paid per call via x402, $1/call, status unknown (last checked 2026-09-15).

Provisions a one-time-shown stk_live_ API key for Stacktree, which lets agents publish private, unguessable links to HTML content such as specs, PR writeups, and status reports.

## Facts

- Endpoint: POST https://api.stacktr.ee/provision
- Price: $1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/stacktree-provision-provision-api-key-for-private-html-sharing-7ec55e75
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wiNYJIDYqo5XezPTc4rJN

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability stacktree-provision-provision-api-key-for-private-html-sharing-7ec55e75 -d '<json body>'
```

Example prompt: I want to start publishing private HTML links with Stacktree — provision me a new stk_live_ API key so I can share specs and PR writeups as unguessable private links.

## When to prefer this

Use this endpoint when an AI agent needs to provision a fresh Stacktree API key before it can publish private HTML content (specs, reports, custom editors). This is the gateway/auth step — call this once before using other Stacktree endpoints. Choose this over alternatives when you need MCP-native, private-by-default HTML link sharing with replace-in-place capabilities.

## Known failure modes

- Payment not settled or invalid x402 signature — no key returned
- ACP shared payment token malformed (must start with spt_) — 400 error
- AP2 mandate object invalid or missing required fields — provisioning fails
- Duplicate or replayed payment — rejected to prevent double-provisioning
- Network timeout before payment confirmation — key not issued, must retry

## How this service works

Stacktree: provision a persistent API key for hosting HTML pages as private, shareable web pages ($1.00). The key is returned once in the response body.

## Output

Returns a JSON object with ok: true, a one-time-shown stk_live_ API key (api_key), a usage hint showing how to set the Authorization: Bearer header, the key prefix, and the protocol name.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "ap2_mandate": {
   "type": "object",
   "description": "AP2 rail: an AP2 mandate object."
  },
  "acp_shared_payment_token": {
   "type": "string",
   "description": "ACP rail: a Stripe Shared Payment Token (spt_...)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "usage": "Authorization: Bearer stk_live_…",
  "api_key": "stk_live_…"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stacktree-provision-provision-api-key-for-private-html-sharing-7ec55e75/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.stacktr.ee](https://www.zero.xyz/host/api.stacktr.ee/llms.txt)
