# Pyth-On API ## API Docs - Auth [Register a new user](https://uihvx7cw11.apidog.io/register-a-new-user-32463888e0.md): Creates a new user account and returns a JWT token and API key. - Auth [Login](https://uihvx7cw11.apidog.io/login-32463889e0.md): Authenticate with email and password. Returns a JWT token and your API key. - Auth [Verify token](https://uihvx7cw11.apidog.io/verify-token-32463890e0.md): Check if the current token or API key is valid. - Auth [Refresh token](https://uihvx7cw11.apidog.io/refresh-token-32463891e0.md): Get a new JWT token using your current valid token or API key. - Execute [Execute code](https://uihvx7cw11.apidog.io/execute-code-32463892e0.md): Run code in a sandboxed environment. Supports Python, JavaScript, and TypeScript. - Secrets [Create or update a secret](https://uihvx7cw11.apidog.io/create-or-update-a-secret-32463893e0.md): Store an encrypted secret. Encrypted with AES-256-GCM (per-secret IV + auth tag). Secrets are injected as environment variables during execution. - Secrets [Delete a secret](https://uihvx7cw11.apidog.io/delete-a-secret-32463894e0.md): Permanently delete an encrypted secret. Logged in the audit trail. - Secrets [List all secrets](https://uihvx7cw11.apidog.io/list-all-secrets-32463895e0.md): Returns metadata only. Secret values are never returned. - Audit [Get audit log](https://uihvx7cw11.apidog.io/get-audit-log-32463896e0.md): Returns the audit trail for your account. Every secret operation, package change, and code execution is logged. SOC 2 / ISO 27001 ready. - System [Health check](https://uihvx7cw11.apidog.io/health-check-32463897e0.md): Returns API health status, execution backend, supported languages, AI availability, and version. - System [API info](https://uihvx7cw11.apidog.io/api-info-32464018e0.md): Returns API name, version, supported languages, and endpoint listing. - Generate [AI generate and execute code](https://uihvx7cw11.apidog.io/ai-generate-and-execute-code-32464019e0.md): Send a natural language prompt. Claude AI generates production-ready code and optionally executes it in a sandbox. - Packages [List persistent packages](https://uihvx7cw11.apidog.io/list-persistent-packages-32464020e0.md): Returns the list of packages that are automatically installed before every code execution. - Packages [Set package list](https://uihvx7cw11.apidog.io/set-package-list-32464021e0.md): Replace the entire persistent package list. Maximum 50 packages. These are installed before every execution. - Packages [Add a single package](https://uihvx7cw11.apidog.io/add-a-single-package-32464022e0.md): Add one package to the persistent list. - Packages [Remove a package](https://uihvx7cw11.apidog.io/remove-a-package-32464023e0.md): Remove a package from the persistent list. - Zero-Knowledge [Client encryption helper](https://uihvx7cw11.apidog.io/client-encryption-helper-32466614e0.md): Helper endpoint for testing. In production, encryption should happen client-side using the same algorithm. - Zero-Knowledge [Store encrypted code](https://uihvx7cw11.apidog.io/store-encrypted-code-32466615e0.md): Store an encrypted code blob. The server stores it as an opaque payload and **never decrypts it**. - Zero-Knowledge [Delete encrypted code](https://uihvx7cw11.apidog.io/delete-encrypted-code-32466616e0.md): - Zero-Knowledge [List encrypted code](https://uihvx7cw11.apidog.io/list-encrypted-code-32466617e0.md): List all zero-knowledge encrypted code snippets. Returns metadata only — the server cannot read the code. - Zero-Knowledge [Decrypt and execute in sandbox](https://uihvx7cw11.apidog.io/decrypt-and-execute-in-sandbox-32466618e0.md): 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. ## Schemas - [AuthRequest](https://uihvx7cw11.apidog.io/authrequest-14023680d0.md): - [AuthResponse](https://uihvx7cw11.apidog.io/authresponse-14023681d0.md): - [UserInfo](https://uihvx7cw11.apidog.io/userinfo-14023682d0.md): - [ExecuteRequest](https://uihvx7cw11.apidog.io/executerequest-14023683d0.md): - [ExecuteResponse](https://uihvx7cw11.apidog.io/executeresponse-14023684d0.md): - [SecretInput](https://uihvx7cw11.apidog.io/secretinput-14023685d0.md): - [GenerateRequest](https://uihvx7cw11.apidog.io/generaterequest-14023692d0.md): - [SecretMetadata](https://uihvx7cw11.apidog.io/secretmetadata-14023686d0.md): - [GenerateResponse](https://uihvx7cw11.apidog.io/generateresponse-14023693d0.md): - [AuditEntry](https://uihvx7cw11.apidog.io/auditentry-14023687d0.md): - [PackageInfo](https://uihvx7cw11.apidog.io/packageinfo-14023694d0.md): - [EncryptedCodeMetadata](https://uihvx7cw11.apidog.io/encryptedcodemetadata-14023947d0.md): - [ZKPayload](https://uihvx7cw11.apidog.io/zkpayload-14024008d0.md): - [HealthResponse](https://uihvx7cw11.apidog.io/healthresponse-14023688d0.md): - [Error](https://uihvx7cw11.apidog.io/error-14023689d0.md):