1. Zero-Knowledge
Pyth-On API
  • Auth
    • Register a new user
      POST
    • Login
      POST
    • Verify token
      POST
    • Refresh token
      POST
  • Execute
    • Execute code
      POST
  • Secrets
    • Create or update a secret
      PUT
    • Delete a secret
      DELETE
    • List all secrets
      GET
  • Audit
    • Get audit log
      GET
  • System
    • Health check
      GET
    • API info
      GET
  • Generate
    • AI generate and execute code
      POST
  • Packages
    • List persistent packages
      GET
    • Set package list
      PUT
    • Add a single package
      POST
    • Remove a package
      DELETE
  • Zero-Knowledge
    • Client encryption helper
      POST
    • Store encrypted code
      PUT
    • Delete encrypted code
      DELETE
    • List encrypted code
      GET
    • Decrypt and execute in sandbox
      POST
  • Schemas
    • AuthRequest
    • AuthResponse
    • UserInfo
    • ExecuteRequest
    • ExecuteResponse
    • SecretInput
    • GenerateRequest
    • SecretMetadata
    • GenerateResponse
    • AuditEntry
    • PackageInfo
    • EncryptedCodeMetadata
    • ZKPayload
    • HealthResponse
    • Error
  1. Zero-Knowledge

Decrypt and execute in sandbox

POST
/api/v1/zk/execute/{name}
Execute encrypted code. The server never decrypts your code. The master password is passed directly to the isolated sandbox as an environment variable. Decryption (Argon2id + XChaCha20-Poly1305) happens only inside the sandbox.
What the server sees: encrypted blob in, stdout/stderr out.
What the server does NOT see: your source code.
The sandbox installs argon2-cffi + pynacl (Python) or argon2 + @noble/ciphers (JS), derives the key from your master password, decrypts, and executes.

Request

Authorization
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Body Params application/jsonRequired

Examples

Responses

🟢200
application/json
Code decrypted and executed inside sandbox
Body

🟠403
🟠404
🟠400BadRequest
🟠401Unauthorized
🟠429RateLimited
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/v1/zk/execute/' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "masterPassword": "MyS3cur3P@ss!",
    "packages": [
        "requests"
    ]
}'
Response Response Example
200 - Success
{
    "output": "Hello from zero-knowledge!\n",
    "error": "",
    "exitCode": 0,
    "language": "python",
    "zeroKnowledge": true
}
Modified at 2026-04-04 08:23:30
Previous
List encrypted code
Next
AuthRequest
Built with