Skip to content

Roblox Studio

The Voxel Roblox Studio plugin lets you generate voxel models with AI from inside Studio. You describe what you want, the same agentic generator that powers the web app builds it, and the plugin instantiates the result in your place. It is also the first integration to use a long-lived Personal Access Token — so it doubles as the reference for how programmatic clients authenticate today.

The plugin never sees your password. It pairs with your account through a device-link flow (the same shape as the OAuth device flow you’ve seen on TVs and consoles), then calls the buffered POST /api/generate/roblox endpoint with its token. That endpoint returns a flat voxel list and material palette as one JSON document, which the plugin turns into Parts.

The /link approval screenImage to be added
Where you confirm the code from Studio and approve the requested scopes.

1. Start the pairing (plugin → API). The plugin calls the endpoint below. No auth is required: the returned device_code is itself the secret the plugin holds onto.

POST /api/plugin/device/start
{
"device_code": "long-opaque-secret",
"user_code": "WXYZ-2468",
"verify_url": "https://voxelai.studio/link?code=WXYZ-2468",
"interval": 3,
"expires_in": 600
}

The user_code uses an unambiguous alphabet (no 0/O/1/I) and the whole pairing expires after 10 minutes.

2. Approve in the browser (you). The plugin opens verify_url (or shows you the user_code to type). On the /link page you sign in and approve the requested scopes:

  • Build with AI in Studio
  • Spend your tokens
  • Read your balance

Approval is a single authenticated call from that page:

POST /api/plugin/device/approve
{ "user_code": "WXYZ-2468" }

It returns { "ok": true }, or 404 if the code doesn’t exist / 410 if it has expired.

3. Poll for the token (plugin → API). While you approve, the plugin polls every interval seconds:

POST /api/plugin/device/poll
{ "device_code": "long-opaque-secret" }
// still waiting
{ "status": "pending" }
// approved — the token is returned exactly once
{ "status": "approved", "token": "vxlrbx_…" }
// the pairing expired (HTTP 400)
{ "status": "expired", "error": "expired_token" }

The plugin stores the vxlrbx_… token securely. Only a SHA-256 hash of it is kept server-side, so it cannot be recovered later — if it’s lost, just link again.

With the token, the plugin authenticates like any API client:

POST /api/generate/roblox
Authorization: Bearer vxlrbx_…
Content-Type: application/json
{ "prompt": "a small crystal tree", "symmetry": true }

The full request and response shapes are in Endpoints → Buffered Generation. The response gives you voxels ({x, y, z, materialId}) and a materials palette (hex + PBR fields) to instantiate directly.

Revoke a token at any time — from the plugin’s “Unlink Studio” action or the web profile page:

POST /api/plugin/tokens/revoke
Authorization: Bearer <session token>
{ "id": "<token-id>" }

Returns { "ok": true }, or 404 if the token isn’t found. A revoked token stops working immediately.