Overview Auth Quickstart Obfuscate Account Limits Errors

REST API Reference v1

Zerofuscator Pro REST API

Compile VM-protected Roblox Lua scripts programmatically from CI/CD pipelines, release tools, and build scripts over HTTPS. Every build runs in isolated ephemeral server memory with zero script retention.

Base URL https://obf.zeroimpact.online/api/v1
Plan Requirement Pro Plan (or Whitelisted)
Input / Output Lua 5.1 -> Roblox Luau
Lua 5.1 Input Compatibility

Submit valid Lua 5.1 syntax (avoid Luau-only compound operators like +=, continue, or type annotations such as : number). The compiled VM-protected output runs natively inside Roblox Luau.

Authentication

Authenticate every request under /api/v1/* with a secret API key generated in Dashboard > Pro API Keys. Keys start with zf_live_, are shown once at creation, and are stored exclusively as HMAC-SHA256 hashes on our server.

Pass your secret key using either the standard Bearer header or the X-API-Key header:

HTTP Headers
Authorization: Bearer zf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Alternative header:
X-API-Key: zf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  • Key Limit: Up to 5 active keys per Pro account. Revoke compromised or unused keys immediately from your dashboard.
  • Entitlement Enforcement: Free and Starter accounts, or expired Pro subscriptions, receive 403 API_PRO_REQUIRED until Pro is active.
  • Secret Hygiene: Store keys in environment variables (such as ZEROFUSCATOR_API_KEY) or GitHub Actions Secrets. Never commit secret keys to public repositories.

Quickstart Examples

Choose your preferred runtime below. Set ZEROFUSCATOR_API_KEY in your environment before running any snippet.

cURL (Raw Lua pipeline & JSON mode)
# 1. Direct file-to-file build (?format=raw writes protected Lua directly)
curl -fsS -X POST "https://obf.zeroimpact.online/api/v1/obfuscate?format=raw" \
  -H "Authorization: Bearer $ZEROFUSCATOR_API_KEY" \
  -H "Content-Type: text/plain" \
  --data-binary "@script.lua" \
  -o "script.protected.lua"

# 2. JSON mode with explicit protection options
curl -fsS -X POST "https://obf.zeroimpact.online/api/v1/obfuscate" \
  -H "Authorization: Bearer $ZEROFUSCATOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"code":"print(\"Hello Roblox\")","options":{"controlFlow":true,"vmTransform":true,"compact":true}}'
POST

/api/v1/obfuscate

Compiles a Lua 5.1 script into a VM-protected Roblox Luau build. Accepts either JSON or raw text/plain source input, and returns JSON by default or raw Lua output when ?format=raw (or Accept: text/plain) is supplied.

JSON Request Body

Field Type Default Description
code string (required) required UTF-8 Lua 5.1 source code (up to 4 MiB on Pro). Field alias source is also accepted.
options.controlFlow boolean true Enables control-flow hardening and constant shielding.
options.vmTransform boolean true Enables full multi-layer VM virtualization and runtime binding.
options.compact boolean true Minimizes final payload size for faster loading inside Roblox executors.

Query Parameters

Parameter Values Description
format json | raw Defaults to json. Pass format=raw to receive the protected Lua payload directly as text/plain with build metadata in response headers.
controlFlow, vmTransform, compact true | false Optional overrides used when sending raw Content-Type: text/plain requests.

200 OK JSON Response

application/json
{
  "ok": true,
  "output": "--// Protected by Zerofuscator v1.0 [https://dsc.gg/zeroimpact]\n...",
  "inputBytes": 14820,
  "outputBytes": 132410,
  "durationMs": 412,
  "sha256": "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08",
  "sha256Short": "9f86d081884c",
  "billingSource": "monthly_plan",
  "quota": {
    "planId": "pro",
    "planName": "Pro",
    "quotaPeriod": "month",
    "quotaUsed": 3,
    "quotaLimit": 1000,
    "quotaRemaining": 997,
    "dailyUsed": 3,
    "dailyLimit": 1000,
    "dailyRemaining": 997,
    "credits": 10,
    "maxInputBytes": 4194304,
    "resetsAtUtc": "2026-12-01T00:00:00.000Z"
  }
}

Raw Mode Response Headers (?format=raw)

When returning raw Lua bytes, Zerofuscator attaches build telemetry in HTTP response headers: X-Zerofuscator-Input-Bytes, X-Zerofuscator-Output-Bytes, X-Zerofuscator-Duration-Ms, X-Zerofuscator-SHA256, X-Zerofuscator-Billing, X-Zerofuscator-Quota-Period, and X-Zerofuscator-Quota-Remaining.

GET

/api/v1/me

Verifies that an API key is valid and returns your active plan status, remaining monthly builds, credit balance, and maximum input file size without consuming quota.

Request & 200 OK Response
curl -fsS "https://obf.zeroimpact.online/api/v1/me" \
  -H "Authorization: Bearer $ZEROFUSCATOR_API_KEY"

# Response:
{
  "ok": true,
  "key": {
    "id": 4,
    "name": "CI Release Pipeline",
    "prefix": "zf_live_8c4e12...9b02"
  },
  "account": {
    "username": "developer",
    "planId": "pro",
    "planName": "Pro",
    "planExpiresAt": 1798329600,
    "isUnlimited": false
  },
  "quota": {
    "quotaPeriod": "month",
    "quotaUsed": 3,
    "quotaLimit": 1000,
    "quotaRemaining": 997,
    "dailyUsed": 3,
    "dailyLimit": 1000,
    "dailyRemaining": 997,
    "credits": 10,
    "creditCostPerBuild": 1,
    "maxInputBytes": 4194304,
    "resetsAtUtc": "2026-12-01T00:00:00.000Z"
  }
}

Quotas, Credits & Rate Limits

Dashboard builds and REST API builds draw from the same unified account quota. Your monthly Pro allowance is always spent before build credits, and failed builds never burn quota.

Limit Pro Plan Value Behavior
Monthly Build Quota Per-month (UTC) Resets automatically on the 1st of each UTC month at 00:00 UTC. Falls back to Build Credits when exhausted.
Maximum Input Size 4 MiB (4,194,304 B) Oversized payloads are rejected with 413 INPUT_TOO_LARGE before compilation.
Burst Rate Limit 12 builds / minute Exceeding burst cap returns 429 RATE_LIMITED with a Retry-After header.
Concurrent Builds 2 simultaneous Extra overlapping requests return 429 BUILD_IN_PROGRESS without deducting quota.
Failed Build Refund Automatic Invalid Lua 5.1 syntax (422) or server timeouts automatically restore your reserved build.

Error Codes

All API errors return a consistent JSON structure containing a machine-readable code and human-readable error message:

Standard Error Payload
{
  "ok": false,
  "code": "LUA_SYNTAX_ERROR",
  "error": "Lua 5.1 syntax error near line 4: unexpected symbol near '+'"
}
HTTP Code Cause & Resolution
400 MISSING_SOURCE Empty payload or missing code field. Send non-empty UTF-8 Lua 5.1 source.
401 INVALID_API_KEY Missing, malformed, or revoked key. Verify your Authorization: Bearer header.
403 API_PRO_REQUIRED Account is not on an active Pro plan (or subscription expired). Renew or upgrade via Discord.
403 ACCOUNT_BANNED Account is suspended. Contact staff on the Zero Impact Discord server.
413 INPUT_TOO_LARGE Script exceeds your plan size ceiling (4 MiB on Pro). Split oversized assets before compiling.
422 LUA_SYNTAX_ERROR Input contains invalid Lua 5.1 syntax (such as Luau += or type annotations). Quota is automatically refunded.
429 MONTHLY_LIMIT_REACHED / DAILY_LIMIT_REACHED Plan quota reached 0 and no build credits remain. Wait for UTC reset (1st of month for Starter/Pro, 00:00 UTC daily for Free) or redeem credits.
429 RATE_LIMITED / BUILD_IN_PROGRESS Too many requests per minute or more than 2 concurrent builds. Wait for Retry-After seconds.
503 SERVICE_MAINTENANCE / SERVER_BUSY Temporary maintenance window or saturated build queue. Retry with exponential backoff.