Deploy CVMs programmatically using the Phala Cloud API. The API exposes the same backend used by the Phala Cloud dashboard, so anything you can do in the UI you can automate via API.Documentation Index
Fetch the complete documentation index at: https://docs.phala.com/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
All API requests require an API key passed in theX-API-Key header. Generate your key at Settings → API Keys in the Phala Cloud dashboard.
Deployment Flow
CVM deployment follows a two-phase provision → commit workflow:- Provision — reserve resources and receive a
compose_hashandapp_env_encrypt_pubkey - Commit — finalize the deployment with the provisioned values
KMS Types
| Feature | Built-in KMS | On-chain KMS |
|---|---|---|
| Setup | Automatic | Requires smart contract deployment |
| App ID | Derived from compose hash | Contract address |
| Best for | Development and standard production | Decentralized access control |
Using SDKs
For a simpler experience, use one of the official SDKs instead of raw API calls:JavaScript SDK
@phala/cloud — provision, deploy, and manage CVMsPython SDK
phala-cloud — sync and async clientGo SDK
github.com/Phala-Network/phala-cloud/sdks/go
