Skip to main content
The Anthropic SDK can call Phala’s compatible /v1/messages endpoint directly. Set the Phala host without /v1 because the SDK appends /v1/messages.
Use auth_token in Python or authToken in TypeScript. The api_key option sends x-api-key, while Phala expects Authorization: Bearer.

Install

Send a message

Choose a model

Use a model ID from the live Phala catalog; the Messages format also works with supported non-Anthropic models:
Model availability and supported fields change. Test streaming or tool use with the selected model before depending on it in production.

Privacy boundary

Every request enters through Phala’s attested gateway. This TEE-only endpoint requires a verified upstream; evidence coverage varies by provider. Ordinary Anthropic SDK clients do not verify the gateway, pin its TLS key, or audit response receipts. Use the TypeScript ACI verifier or Private AI Proxy for client-side verification.

Troubleshooting