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.

Changed on
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)
  • 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_atstring date-time required

When the link stops working, ISO 8601 in UTC.

urlstring required

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

Changes