overview
the parity api decompiles lua 5.1–5.5 and luau bytecode back into readable source. it is free while in beta. there are no accounts and no api keys.
| base url | https://api.useparity.lol |
| auth | none during beta |
| max upload | 2 MB per request |
endpoints
GET /v1/defaults
returns 200 json with the default option values.
POST /v1/decompile
decompiles one file. send the bytecode as the raw request body (Content-Type: application/octet-stream) or as a multipart file field. accepts raw bytecode, base64, or json-wrapped bytecode from .luac .luauc .txt .bin inputs.
| field | where | description |
|---|---|---|
file | body | the bytecode, up to 2 MB |
<option> | query | any option below, e.g. ?methodSyntax=false |
returns 200 with the decompiled lua source.
GET /v1/health
200 with queue depth and uptime.
options
all options are query parameters on /v1/decompile. omit a parameter to use its default.
| parameter | type | default | description |
|---|---|---|---|
inferNames | bool | true | names locals from how they're used (local Part = Instance.new("Part")) |
debugNames | bool | true | uses variable names stored in debug info when present |
identifierCase | enum | auto | casing for generated names: auto | pascalCase | camelCase | snake_case |
generatedNames | enum | descriptive | naming style when nothing better is known: descriptive | typed | simple |
inferTypes | bool | true | infers local types from the operations that use them |
inferRobloxTypes | bool | true | infers roblox types from calls like Instance.new |
typeAnnotations | bool | true | writes : type annotations where the type is known |
methodSyntax | bool | true | writes methods as function t:m() instead of t.m(self, ...) |
utf8 | bool | true | utf-8 text in strings instead of byte escapes |
headerInfo | bool | true | adds a comment header with the active settings and timing |
comments | bool | true | adds informational comments to the output |
functionLineInfo | enum | functions | -- line: N markers on functions: off | functions | all |
functionDebugNames | bool | true | uses function names stored in debug info when present |
upvalueComments | bool | true | adds a comment listing the upvalues each function captures |
markInlinedCopies | bool | true | annotates functions the compiler duplicated by inlining |
normalizeComparisons | bool | true | puts the variable on the left of comparisons (5 == x becomes x == 5) |
compoundAssignments | bool | true | x = x + 1 becomes x += 1 (luau) |
removeUselessForStep | bool | true | removes the step from numeric for loops when it's 1 |
mergeTableLiterals | bool | true | rejoins table constructors the compiler split apart |
parallelAssignments | bool | true | rebuilds a, b = x, y parallel assignments |
inlineTemporaries | bool | true | inlines single-use temporaries into the expression that reads them |
sugarLocalFunctions | bool | true | local f = function() becomes local function f() |
autoCleanup | enum | auto | dead code cleanup level: off | auto | aggressive |
removeUnusedLocals | bool | false | removes locals that are never read |
earlyReturns | bool | true | flattens nested ifs into guard clauses |
removeUselessReturn | bool | true | removes a trailing bare return |
interpolatedStrings | bool | true | rebuilds `{x}` string interpolations (luau) |
loopCompletionDefaults | bool | true | hides loop-completion bookkeeping the compiler inserts |
mathConstants | bool | true | writes known constants as math.pi, math.huge, etc. |
preferConst | bool | true | marks never-reassigned locals <const> (lua 5.4+) |
indentWidth | int | 4 | spaces per indent level, 0–16 |
rate limits
per source ip. exceeding one returns 429 with a Retry-After header.
| scope | limit |
|---|---|
POST /v1/decompile | 300 requests / minute |
POST /v1/decompile | 2 concurrent jobs |
errors
| status | condition |
|---|---|
| 400 | missing file or unreadable body |
| 413 | file over 2 MB |
| 415 | unsupported content type |
| 429 | rate limited, see Retry-After |
| 503 | job queue full, retry shortly |