Your first inference call
Install the SDK for your language, export AETHER_API_KEY, and stream a completion in under a minute.
curl https://api.aether-compute.ai/v1/inference/chat/completions \
-H "Authorization: Bearer $AETHER_API_KEY" \
-H "X-Aether-Region: auto" \
-H "X-Aether-Residency: EU" \
-H "Content-Type: application/json" \
-d '{
"model": "aether-llm-70b-moe",
"stream": true,
"messages": [
{"role": "system", "content": "You are a compliance-aware assistant."},
{"role": "user", "content": "Summarize GDPR Article 32."}
],
"routing": { "max_latency_ms": 80, "prefer_tier": "edge" }
}'Four ways to authenticate
Every request must be authenticated. Choose the mechanism that fits your deployment posture — keys for prototyping, HMAC or OAuth for production, mTLS for regulated tenants.
API Key (Bearer)
DefaultSend your key as an HTTP Bearer token on every request. Keys are scoped to a project, a set of regions, and a residency policy. Rotate at any time from the console.
Authorization: Bearer sk_live_ae_9f3b...c21e
X-Aether-Region: auto
X-Aether-Residency: EUHMAC Request Signing
Recommended for server-to-serverSign the request line, timestamp and body hash with your secret. Prevents replay and works well through proxies. Skew tolerance is ±300 seconds.
X-Aether-Key-Id: ak_9f3b21
X-Aether-Timestamp: 1758300420
X-Aether-Signature: v1=HMAC_SHA256(secret,
METHOD + "\n" + PATH + "\n" + TS + "\n" + SHA256(body))OAuth 2.0 / OIDC (Enterprise)
FederatedExchange your IdP token (Azure AD, Okta, Google Workspace) for a short-lived Aether access token via the client-credentials flow. Fine-grained scopes: inference:read, inference:write, scheduler:*.
POST /oauth/token
grant_type=client_credentials
client_id=...&client_secret=...
scope=inference:write scheduler:readmTLS (Sovereign tenants)
Regulated workloadsMutual TLS with a customer-issued client cert. Required for CN sovereign and MEA sovereign endpoints. Pinned to the tenant's dedicated ingress.
curl --cert client.pem --key client.key \
https://sovereign-cn.aether-compute.ai/v1/...Core endpoints
| Method | Path | Endpoint |
|---|---|---|
| POST | /inference/chat/completions | Chat completions OpenAI-compatible chat completion with optional streaming. Routed to the lowest-latency compliant region. |
| POST | /inference/embeddings | Embeddings Generate vector embeddings from text or code. Batching up to 512 inputs. |
| POST | /inference/images | Image generation Diffusion image generation. GPU-tier aware, sovereign-region pinning available. |
| POST | /schedule/dispatch | Scheduler dispatch Submit a workload to the cross-border scheduler with residency, latency and cost constraints. |
| GET | /regions | List regions Enumerate active core / edge / hotel regions with live capacity and SLA. |
| GET | /models | List models Return deployable model catalog including residency and compliance flags. |
| GET | /jobs/{id} | Get job Poll long-running inference or fine-tuning job state. |
| DELETE | /jobs/{id} | Cancel job Cancel an in-flight scheduled workload. |
Server-Sent Events & WebSocket
SSE (default for chat / completions)
Set "stream": true. The server emits data: frames and terminates with data: [DONE].
data: {"choices":[{"delta":{"content":"GDPR "}}]}
data: {"choices":[{"delta":{"content":"Article 32 "}}]}
data: {"choices":[{"delta":{"content":"requires..."}}]}
data: [DONE]WebSocket (bidirectional & agents)
Use wss://api.aether-compute.ai/v1/stream for tool-calling agents and long-running sessions with mid-stream control messages.
> {"type":"auth","token":"sk_live_..."}
< {"type":"ready","region":"fra-core-01"}
> {"type":"prompt","content":"Draft SOC2 mapping"}
< {"type":"delta","content":"CC6.1: ..."}
< {"type":"final","usage":{...}}Error taxonomy & retries
| HTTP | Code | Meaning |
|---|---|---|
| 400 | invalid_request | Malformed body or unsupported routing constraint. |
| 401 | unauthenticated | Missing / expired key, bad signature, or clock skew. |
| 403 | residency_violation | Requested region is outside your data-residency policy. |
| 409 | capacity_conflict | No node currently satisfies latency + residency + GPU tier. |
| 429 | rate_limited | Per-project or per-region RPS exceeded. Retry-After header set. |
| 503 | region_degraded | Target region degraded; scheduler failed over — safe to retry. |
All 5xx and 429 responses are safe to retry with exponential backoff. The scheduler emits an X-Aether-Route header with the region and tier that served each request for observability.
