This guide walks you through making your first call to Shroud — first with the OpenAI-compatible HTTP path so you can paste-and-run, then with the Cocoon SDK if you need end-to-end encryption.
If you don't yet know which path you want, see Two paths in.
Include the key in every request via the Authorization header:
Authorization: Bearer shroud_prod_your_key_here
Base URLs
The examples below use shroud.us as the base host. Pick the environment that matches your API key:
Environment
Base URL
WebSocket base
Production
https://shroud.us
wss://shroud.us
Development
https://dev.shroud.us
wss://dev.shroud.us
Requests with a key for the wrong environment are rejected at the gateway.
Step 3: Make your first call
OpenAI-compatible chat completions
The fastest path. The gateway is OpenAI-compatible at /v1/chat/completions, so any OpenAI client works after a single base_url change. The gateway terminates TLS itself and forwards your prompt into a TEE — this trades end-to-end confidentiality for drop-in compatibility. For end-to-end-encrypted inference jump to Step 4: use the Cocoon SDK.
Pick the language tab that matches your stack. Each tab walks through the same three steps: set the API key in your environment, install or invoke the client, and run a hello-world chat completion.
The MCP endpoint speaks JSON-RPC 2.0 and requires an initialize handshake before any other call. Start by discovering capabilities — this endpoint is public and needs no authentication:
curl https://shroud.us/.well-known/mcp
Open a session by sending initialize. The response header Mcp-Session-Id must be echoed back on every subsequent request:
Step 4: Use the Cocoon SDK for confidential inference
The OpenAI-compatible HTTP path lets the gateway see your prompts in clear. For confidential inference where the platform operator must not see plaintext, use one of the official Cocoon SDKs. The SDK opens a WebSocket to wss://shroud.us/v1/cocoon/stream, performs an ECDH key exchange against a TEE-attested public key, and AES-256-GCM-encrypts every message end-to-end.