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

Store encrypted code

PUT
/api/v1/zk/code/{name}
Store an encrypted code blob. The server stores it as an opaque payload and never decrypts it.
The payload must be generated client-side (or via POST /api/v1/zk/encrypt for testing).

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
Encrypted code stored
Body

🟠400BadRequest
🟠401Unauthorized
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT '/api/v1/zk/code/' \
--header 'x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "encryptedPayload": {
        "v": 1,
        "salt": "W4OB5gKHK9ov...",
        "nonce": "B+kG0B4oK1...",
        "ciphertext": "x9Fj2kL..."
    },
    "language": "python",
    "description": "My encrypted scraper"
}'
Response Response Example
200 - Example 1
{
    "name": "string",
    "language": "string",
    "description": "string",
    "stored": true,
    "zeroKnowledge": true
}
Modified at 2026-04-04 08:23:30
Previous
Client encryption helper
Next
Delete encrypted code
Built with