Build with Enclave42 model APIs.
Use one OpenAI-compatible endpoint to call secure model inference, track usage, and manage wallet-based billing from the Enclave42 dashboard.
Quickstart
Create an API key from the dashboard, assign it to an allowed model, then call the chat completions endpoint from your backend.
curl https://api.enclave42.com/v1/chat/completions \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-32b-tee",
"messages": [
{
"role": "user",
"content": "Reply with a short product summary."
}
]
}'Authentication
API requests require a bearer token. Keep your API key server-side and never expose it in a browser, mobile app, public repository, or client-side bundle.
| Header | Authorization: Bearer <YOUR_API_KEY> |
|---|---|
| Content type | Content-Type: application/json |
| Base URL | https://api.enclave42.com |
Chat completions
The primary endpoint follows an OpenAI-compatible chat completions format.
/v1/chat/completionsExample response
{
"id": "chatcmpl_...",
"object": "chat.completion",
"model": "qwen3-32b-tee",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Here is a concise product summary..."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 24,
"completion_tokens": 18,
"total_tokens": 42
}
}Models
Use the exact technical Model ID displayed in the Models page or API Keys page. Model access depends on the customer plan and the model assigned to the API key.
Wallet billing
Subscription controls platform access and model tiers. Wallet balance pays for actual inference consumption. Each successful request creates a usage record and a wallet debit.
Error responses
| Error | Meaning |
|---|---|
401 unauthorized | Missing or invalid API key. |
402 insufficient_wallet_balance | Wallet balance is not sufficient for paid inference. |
403 customer_suspended | Customer account has been suspended by admin controls. |
403 model_not_allowed | The API key or plan does not allow this model. |
429 rate_limited | Request limit exceeded. Retry after a short delay. |
Need help?
For onboarding, enterprise access, custom workloads, or account support, contact the Enclave42 team.
Contact support