E42Enclave42
API documentation

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-235b-thinking",
    "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.

HeaderAuthorization: Bearer <YOUR_API_KEY>
Content typeContent-Type: application/json
Base URLhttps://api.enclave42.com

Chat completions

The primary endpoint follows an OpenAI-compatible chat completions format.

POST/v1/chat/completions

Example response

{
  "id": "chatcmpl_...",
  "object": "chat.completion",
  "model": "qwen3-235b-thinking",
  "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
  }
}

Confidential inference

Confidential-compute models use the exact same endpoint, POST /v1/chat/completions. They do not use the ordinary JSON Quickstart above.

Calling a Confidential-compute model requires the Enclave42 Confidential client lifecycle: session creation, evidence retrieval, local verification of that evidence, local encryption of the request, encrypted dispatch, and local decryption of the response. The encrypted dispatch itself is sent to the same /v1/chat/completions endpoint, with:

Content typeContent-Type: application/octet-stream

Sending Content-Type: application/json to a Confidential-compute model is rejected before any inference is dispatched:

403model_requires_confidential_pipeline

A successful Confidential execution produces a signed Security Receipt. Classic JSON inference never produces a Confidential Security Receipt.

Confidential client (preview)

The Enclave42 Confidential client handles the session, evidence, local verification, local encryption, encrypted dispatch, and local decryption for you -- your code only sends a prompt and reads back a response and a receipt id.

from enclave42 import Enclave42

client = Enclave42(api_key="<YOUR_API_KEY>")

result = client.confidential.chat(
    model="glm-5-1-tee",
    prompt="Explain this in one sentence."
)

print(result.text)
print(result.receipt_id)

This is a preview of the Confidential client's public API. It is not yet published to a package index -- there is no pip install command for it today. Run the example above from a copy of the Enclave42 SDK source in your own environment.

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.

ExploreEntry secure models
BuildEntry, Standard and Advanced secure models
BusinessFull catalogue: Entry, Standard, Advanced and Frontier models
SovereignFull catalogue on UAE-resident infrastructure
EnterpriseCustom access and private deployment options
Open model catalog →

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.

API key creationAllowed even before wallet top-up.
Paid inferenceRequires available wallet balance.
Usage analyticsRequests, tokens, cost, and debits appear in Usage.

Error responses

ErrorMeaning
401 unauthorizedMissing or invalid API key.
402 insufficient_wallet_balanceWallet balance is not sufficient for paid inference.
403 customer_suspendedCustomer account has been suspended by admin controls.
403 model_not_allowedThe API key or plan does not allow this model.
429 rate_limitedRequest limit exceeded. Retry after a short delay.

Need help?

For onboarding, enterprise access, custom workloads, or account support, contact the Enclave42 team.

Contact support