Skip to content
  • Macros
  • Attributes
  • Obfuscate API
  • Generating Keys with API
  • Editing Keys with API
  • Using the Oracle SDK
  • Setup
  • Commands

Guides

Obfuscate API

Use the Soteria REST API to obfuscate Lua scripts programmatically.

Endpoint

HTTP
POST https://soteria.rip/api/obfuscate

Send your Lua script as a JSON request with the code as a string under the code field, and your API key in the x-api-key header.

Request Body

JSON
{
  "code": "-- your lua source...",
  "args": {
    "target": "Roblox",
    "compression-loader": false,
    "compatibility-mode": false,
    "custom-error": true,
    "optimization-level": 3,
    "flow-complexity": 1,
    "node": "main"
  }
}
FieldTypeRequiredDescription
codestringYesThe Lua script to obfuscate.
argsobjectNoObfuscation settings. All fields are optional and will fall back to their defaults if omitted.
paymentSourcestringNoWhere the cost is taken from. "auto" (default) uses your included credit first, then your balance. "credit" uses only your included credit. "balance" uses only your purchased balance. The request fails if the chosen source cannot cover the cost.

Args Fields

All fields within args are optional.

FieldTypeDefaultDescription
targetstring"Roblox"The obfuscation target environment. Accepted values: "Roblox", "Studio", "Luau".
compression-loaderbooleanfalseWraps the output in a compressed loader to decrease file size. Requires loadstring to be available.
compatibility-modebooleanfalseGives up stronger security to improve support for lower-fidelity executors such as Xeno. Only available when target is "Roblox".
custom-errorbooleantrueEnables Soteria's Custom Error Handler, which results in slightly larger output but helps debug issues in your input.
optimization-levelnumber3Controls the level of optimization applied. Range: 1–3, where 3 is maximum optimization.
flow-complexitynumber1Controls the complexity of control flow obfuscation. Range: 1–3, where higher values produce more complex flow.
nodestring"main"Selects which obfuscator node to use. Accepted values: "main", "beta". Beta may have newer features but can be less stable.

Response

JSON
{
  "code": "-- obfuscated lua source...",
  "balance": 12.50,
  "membershipBalance": 4.99
}
FieldTypeDescription
codestringThe obfuscated Lua script.
balancenumberRemaining purchased/earned balance on your account after this request.
membershipBalancenumberRemaining included membership credit after this request. 0 if you have no active membership.

Examples

async function obfuscate(script, apiKey) {
  const res = await fetch("https://soteria.rip/api/obfuscate", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
      "x-api-key": apiKey,
    },
    body: JSON.stringify({ code: script }),
  });

  if (!res.ok) {
    throw new Error(`Request failed: ${res.status} ${res.statusText}`);
  }

  const data = await res.json();
  console.log("Balance remaining:", data.balance);
  return data.code;
}

const script = `print("Hello, World!")`;
obfuscate(script, "YOUR_API_KEY").then((code) => {
  console.log(code);
});

API Key Management

Getting your API key: Navigate to Settings → API Keys. Your key is shown there. If you haven't generated one yet, click Generate.

Regenerating a leaked key: If your API key is ever exposed, go to Settings → API Keys and click Generate New. Your old key is immediately invalidated. Note that you can only generate a new key once per minute.

Rate limits: API key generation is limited to once per minute. Script obfuscation requests are subject to your account's balance, each request deducts between $0.10 and $1.00 depending on the script's size, taken from your included membership credit first and then your purchased/earned balance.

AttributesGenerating Keys with API
SoteriaSoteria

Products

  • Soteria
  • Oracle
  • Genesis
  • Pricing

Resources

  • Documentation
  • Blog
  • Discord

Legal

  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Acceptable Use
Soteria
Pricing
Log inGet Started