API
API Reference
The EEv3 API is a single endpoint — POST /do — that dispatches all platform capabilities through a unified request/response format.
The /do Endpoint
All requests go through a single URL. The face and action fields determine which capability to invoke.
POSThttps://api.evileye.dev/do
POST https://api.evileye.dev/do
Content-Type: application/json
Authorization: Bearer sk_live_...
X-Entity-ID: my-company
{
"face": "ai",
"action": "generate",
"payload": {
"model": "claude-sonnet-4-20250514",
"prompt": "Summarise Q3 revenue"
},
"options": {
"timeout": 30000,
"idempotencyKey": "req_unique_123"
}
}Request Format
| Field | Type | Required | Description |
|---|---|---|---|
| face | string | Yes | The face module to invoke (e.g. "ai", "auth", "billing") |
| action | string | Yes | The method to call on the face (e.g. "generate", "login") |
| payload | object | Yes | Action-specific parameters |
| options | object | No | Request options: timeout, idempotencyKey, version |
Response Format
Every successful response returns a data object with the result and a meta object with request metadata.
response.json
{
"data": {
"text": "Q3 revenue grew 24% year-over-year...",
"model": "claude-sonnet-4-20250514",
"tokens": { "input": 42, "output": 256 }
},
"meta": {
"timing": 1843,
"requestId": "req_abc123def456",
"version": "4.2.0"
}
}Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | Bearer token. Format: Bearer sk_live_... or Bearer sk_test_... |
| X-Entity-ID | Yes | The entity identifier scoping this request. |
| Content-Type | Yes | Must be application/json. |
| X-API-Version | No | Pin a specific API version. Defaults to latest. Format: 2024-10-01. |
| X-Idempotency-Key | No | Unique key for idempotent requests. Also accepted in options.idempotencyKey. |
Versioning
The API is versioned by date. You can pin a version in the X-API-Version header or in the URL path. If omitted, the latest stable version is used. Breaking changes are announced 90 days in advance.
Related
- Face API Reference— all 42 faces with method signatures
- Error Handling— error codes and retry strategies
- Rate Limits— limits by tier and per-face overrides