Public REST API for encoding, decoding, and compiling VisualSource scripts. All endpoints accept and return JSON.
https://retrostudio-visualsource.onrender.com
Encodes a decoded VisualSource script into the compact base93 format (deflate + base93). The output is ready to paste into RetroStudio.
| Field | Type | Required | Description |
|---|---|---|---|
text | string | required | Raw decoded VS script text (with \x1a/\x1b separators). |
keep_original | boolean | optional | Wrap output with \x1a/\x1b control chars. Defaults to true. |
{
"text": "EditorCameraPosition0,0\x1a...",
"keep_original": true
}
Decodes a base93-encoded VisualSource script into human-readable block format. Supports versions 1–2 (legacy LZW) and 3+ (deflate).
| Field | Type | Required | Description |
|---|---|---|---|
text | string | required | Base93-encoded VS script string. |
keep_original | boolean | optional | Preserve \x1a/\x1b separators in output. Defaults to true. |
Submits a decoded VS script for compilation to Luau. Returns a job_id immediately. Poll /queue/:job_id for the result.
| Field | Type | Required | Description |
|---|---|---|---|
text | string | required | Decoded VS script text. |
Polls the status of a Luau compilation job. Keep polling until status is done or error.
| Parameter | Type | Description |
|---|---|---|
job_id | string | UUID returned by /toluau. |
Converts a decoded VS script string into a structured JSON representation of the block tree.
| Field | Type | Required | Description |
|---|---|---|---|
text | string | required | Decoded VS script text. |
Converts a block tree JSON (as produced by /VS-TO-JSON2) back into a decoded VS script string.
| Field | Type | Required | Description |
|---|---|---|---|
Editor | object | required | Editor metadata (CameraPosition, CameraZoom). |
Blocks | array | required | Array of block objects matching the /VS-TO-JSON2 output schema. |
Parses a decoded VS script and returns a preview-oriented block structure used by the VS Preview panel.
| Field | Type | Required | Description |
|---|---|---|---|
text | string | required | Decoded VS script text. |
Looks up a block by type name and returns its metadata from the block list.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | required | Block type name (e.g. Print, PlayerAdded). |