AI Chat

Mint a short-lived preview URL for a port in the user's shared global AI workspace. The gateway grant is identical to application previews; the only difference is how the owning sandbox is resolved.

post/ai/workspace/preview-link

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/ai/workspace/preview-link
  • Auth: HTTP bearer

Request body

pathstring nullable

Optional same-origin path to open after the preview grant is exchanged.

portinteger required

The development server port detected or selected in the sandbox.

Response

expires_atinteger required
urlstring required

A short-lived authenticated URL. Its fragment carries the grant and never reaches the development server or referrer headers.

Changes

No recorded changes to this operation across all 54 revisions of this API.