xr_launch_ar_session
Create a shareable WebXR AR passthrough session URL and QR code. On phone or tablet with WebXR AR support, the model is overlaid on the camera feed at the requested scale. When to use: a field user needs to walk the jobsite with a phone and see the model overlaid in-place at 1:1 scale, or drop a tabletop mini-model on a desk. When NOT to use: the target device is a Meta Quest in VR mode — use xr_launch_vr_session. The device lacks WebXR AR (desktop browser) — use get_viewer_link. APS scopes: viewables:read data:read (enforced at viewer page load, not at tool call). Rate limits: APS default ~50 req/min per app per endpoint; Model Derivative translation jobs ~60 req/min; OSS uploads size-limited per file to 100MB for direct upload, larger via resumable. Errors: 401 APS token expired/invalid — refresh (only at viewer page load); 403 scope or resource permission denied; 404 URN not found — check the ID; 429 rate limited — backoff and retry; 5xx APS upstream outage — retry with jitter. Side effects: NON-IDEMPOTENT. Each call mints a new session_id (ar_). Inserts a row into D1 usage_log read by xr_list_sessions. No APS resources are created.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scale | No | Model placement scale. '1:1' for in-situ real-world scale, 'tabletop' for ~1:50 desk-top display, 'custom' to allow pinch-to-scale. Defaults to '1:1'. | |
| model_id | Yes | APS URN (base64url-encoded, starts with 'dXJu', unpadded) of the model to load in AR. | |
| session_name | No | Human-readable session label shown in the session list. |