Guides

Endpoints

Reference

Getting Started

The Cosmo API allows you to programmatically obfuscate Luau scripts. All endpoints require authentication with a valid API key.

Examples

curl -X POST https://api.cosmo.dev/obfuscate \
  -H "Authorization: Bearer cosmo_sk_..." \
  -H "Content-Type: application/json" \
  -d '{"source":"local x = 1"}' 
const response = await fetch('https://api.cosmo.dev/obfuscate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer cosmo_sk_...',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    source: 'local x = 1'
  })
});
const result = await response.json();
import requests

response = requests.post(
  'https://api.cosmo.dev/obfuscate',
  headers={
    'Authorization': 'Bearer cosmo_sk_...',
    'Content-Type': 'application/json',
  },
  json={
    'source': 'local x = 1'
  }
)
result = response.json()
local response = game:HttpPost(
  "https://api.cosmo.dev/obfuscate",
  "source=local x = 1",
  Enum.HttpContentType.ApplicationJson
)