Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Upload a file for the iPhone to save to Photos

/v1/uploadsPOST
Uploads the request body to ghosthand.dev with this Mac's account and returns a short link that lasts 1 day. Open it in Safari on the iPhone and tap Save: the share sheet then offers Save Video or Save Image, which adds the file to Photos. No lease: nothing runs on the iPhone. At most 100 MB.
Authorizationoptional
bearerAuth?Bearer <token>
Required on the tunnel. An API token of the account, from ghosthand tunnel url --new-token. The unix socket needs no token
Query Parameters
name *string
File name with its extension; Photos needs the extension to know the type, e.g. clip.mp4
Request Bodyapplication/octet-streamrequired
Type: string
Response
201 ยท Uploaded
url *string
Share page for Safari on the iPhone. Anyone with the link can download the file until it expires.
Example: "https://ghosthand.dev/u/3fK9xQ2mZr7T"
name *string
Example: "clip.mp4"
size *integer (int64)
Bytes
expiresAt *string (date-time)
The link answers 404 after this, 1 day after the upload
Default ยท Error (RFC 9457 problem details). `code` is stable; switch on it, not on `title` or `detail`.
code *"invalid-request" | "unauthorized" | "not-found" | "device-not-found" | "no-device" | "multiple-devices" | "permission-denied" | "bluetooth-unavailable" | "bluetooth-disconnected" | "no-frame" | "device-locked" | "lock-failed" | "pairing-timeout" | "pointer-not-found" | "lock-state-unavailable" | "lockdown-unavailable" | "unlock-failed" | "mute-unconfirmed" | "text-not-found" | "wait-text-timeout" | "cancelled" | "lease-invalid" | "device-leased" | "recording-active" | "no-recording" | "recording-failed" | "daemon-busy" | "tunnel-offline" | "login-required" | "subscription-required" | "unsupported-in-mode" | "xctest-unavailable" | "task-failed" | "internal-error"
Stable error code. Switch on it; title and detail are for people.
title *string
Short summary of the code, the same for every error with this code
status *integer
HTTP status of the error. In stream mode the response status stays 200.
detail *string
What happened and what to do next. Agents should read it.
Request example
curl -X POST "https://ghosthand.dev/macs/studio/v1/uploads?name=%3Cname%3E" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/octet-stream"
Response example
{ "code": "device-leased", "title": "iPhone leased by another client", "status": 409, "detail": "Tommy's iPhone is in use by another lease:\n ses_456 (book a table on OpenTable), acquired 2 min ago, last used 10 s ago (tap)\nDecide first: if that task is still active, give up or tell the user the iPhone is busy." }