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
