# Panes

Canonical: https://usepanes.com/docs/quickstart

## Quickstart

Create an account, prepay, run Excel, Word and PowerPoint, then download your work and stop the computer.

Use Bash, curl, jq, an API-readable inbox and an authorized Stripe SPT or USDC wallet on Base. Checkout requires a browser. Keep response files for recovery. API: **https://api.usepanes.com**. Operator: Renaissance Superintelligence Corporation.

### 1. Check availability before paying

```bash
umask 077
export PANES_API=https://api.usepanes.com
curl --fail-with-body -sS "$PANES_API/v1/catalog" -o catalog.json
jq '{prices, payment_methods, templates}' catalog.json
jq -e '.templates | any(.office_ready == true)' catalog.json
```

For an Office task, continue only when a template has `office_ready: true`. `apps` says what is installed; `office_ready` says first-boot activation has been verified. If none is ready, Office provisioning is unavailable. Adding credit does not activate Office.

### 2. Create your account and key

```bash
# EMAIL is an address your agent can read through its inbox API.
export SIGNUP_STARTED_AT="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
jq -n --arg email "$EMAIL" '{email:$email,key_name:"Office agent"}' > signup-request.json
curl --fail-with-body -sS "$PANES_API/v1/signup" \
  -H 'Content-Type: application/json' --data-binary @signup-request.json -o challenge.json

# Read the six-digit code from that inbox. The auth chapter has an AgentMail example.
jq -n --arg id "$(jq -r .challenge_id challenge.json)" --arg code "$CODE" \
  '{challenge_id:$id,code:$code}' > verification.json
curl --fail-with-body -sS "$PANES_API/v1/signup/verify" \
  -H 'Content-Type: application/json' --data-binary @verification.json -o account-key.json
export PANES_API_KEY="$(jq -er .key account-key.json)"
rm verification.json
```

The reply contains your key once. Store it in your secret store. Signup grants no credit. Email codes expire after 10 minutes and allow five attempts. [Authentication and recovery](/docs#auth).

### 3. Prepay

[Funding](/docs#funding) contains complete requests for Stripe MPP and USDC x402, including signing a USDC authorization through an agent wallet's HTTP interface.

```bash
export TOPUP_REQUEST_KEY="office-credit-$(date +%s)-$RANDOM"
curl --fail-with-body -sS "$PANES_API/v1/topups" \
  -H "Authorization: Bearer $PANES_API_KEY" -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $TOPUP_REQUEST_KEY" \
  -d '{"amount_cents":1000,"method":"usdc_x402"}' -o topup.json
```

Authorize this exact quote using the funding instructions, then poll its `status_url` until `status` is `paid`. A pending or ambiguous payment is **not** a reason to pay again. Credit is prepaid, in USD, at full face value.

### 4. Start a computer

```bash
export TEMPLATE="$(jq -er '.templates[] | select(.office_ready == true) | .id' catalog.json | head -1)"
export COMPUTER_REQUEST_KEY="office-computer-$(date +%s)-$RANDOM"
jq -n --arg template "$TEMPLATE" \
  '{template:$template,name:"office-report",auto_stop_minutes:15,prevent_cloning:true,require_office_ready:true}' > computer-request.json
curl --fail-with-body -sS "$PANES_API/v1/machines" \
  -H "Authorization: Bearer $PANES_API_KEY" -H 'Content-Type: application/json' \
  -H "Idempotency-Key: $COMPUTER_REQUEST_KEY" \
  --data-binary @computer-request.json -o computer.json
export ID="$(jq -er .id computer.json)"
curl --fail-with-body -sS "$PANES_API/v1/machines/$ID/health" \
  -H "Authorization: Bearer $PANES_API_KEY"
```

A successful create returns a running computer. For a lost create reply, GET `/v1/machine-requests/$COMPUTER_REQUEST_KEY`; reuse the original request key and body. Check `resume_warning` before continuing recovered work.

### 5. Finish a real Office task

This task builds an Excel workbook with formulas and a native chart, a Word summary and a PowerPoint presentation with an editable chart.

```bash
curl --fail-with-body -sS https://usepanes.com/examples/office-report.ps1 -o office-report.ps1
curl --fail-with-body -sS -X PUT \
  "$PANES_API/v1/machines/$ID/files?path=C%3A%2Fwork%2Foffice-report.ps1" \
  -H "Authorization: Bearer $PANES_API_KEY" --data-binary @office-report.ps1
curl --fail-with-body -sS "$PANES_API/v1/machines/$ID/exec" \
  -H "Authorization: Bearer $PANES_API_KEY" -H 'Content-Type: application/json' \
  -d '{"script":"& C:/work/office-report.ps1","desktop":true,"timeout_s":180}' -o task.json
jq -e '.exit_code == 0 and (.timed_out != true)' task.json
jq -r .stdout task.json
for FILE in report.xlsx summary.docx presentation.pptx verification.json; do
  curl --fail-with-body -sS --get "$PANES_API/v1/machines/$ID/files" \
    -H "Authorization: Bearer $PANES_API_KEY" --data-urlencode "path=C:/work/$FILE" -o "$FILE"
done
curl --fail-with-body -sS "$PANES_API/v1/machines/$ID/screenshot" \
  -H "Authorization: Bearer $PANES_API_KEY" -o desktop.png
curl --fail-with-body -sS -X POST "$PANES_API/v1/machines/$ID/stop" \
  -H "Authorization: Bearer $PANES_API_KEY" -o stopped.json
jq -e '.state == "stopped"' stopped.json
curl --fail-with-body -sS "$PANES_API/v1/usage" \
  -H "Authorization: Bearer $PANES_API_KEY" -o usage.json
```

Office automation requires `desktop: true`. HTTP 200 does not mean a command succeeded: check `exit_code`, `stderr` and `timed_out`. If its reply is lost, inspect `C:/work/verification.json` and the output files before repeating it. Stop the computer even if the task fails. A stop keeps its files; a delete erases them.
