Reference

HTTP API

This section documents the public HTTP surface of the Euriklis platform: the base URL and conventions, authentication, the response envelope, and the semantics of each endpoint. Every endpoint returns JSON unless explicitly noted otherwise. Full request-body syntax for the compute endpoint is set out in the DAG schema reference; per-operation signatures are enumerated in the Operations catalog.

§1

Base URL and conventions

All endpoints are served from a common base URL and versioned under /v1.

https://api.euriklis.com/v1/…

Request bodies are encoded as application/json, except where an endpoint accepts file uploads and requires multipart/form-data. Successful responses are always application/json, with the exception of the ECU stream, which is text/event-stream. Numeric quantities are transmitted as JSON numbers; large matrices are transmitted as nested arrays of numbers.

§2

Authentication

Endpoints that consume ECU or that access user-scoped resources are authenticated by an API key supplied in the x-api-key request header. Keys are issued from the API keys panel of the dashboard and may be revoked or rotated at any time.

curl https://api.euriklis.com/v1/data/uploads \
  -H "x-api-key: $EURIKLIS_API_KEY"

A missing key returns 401 with {"error":"Missing x-api-key header"}; an unknown key returns 401 with {"error":"Invalid API key"}. Endpoints that do not consume ECU (GET /v1/health, GET /v1/info, GET /v1/operations) are unauthenticated.

§3

Response envelope

All JSON responses share a common envelope structure. Successful responses carry a Boolean success: true and a data object whose shape is endpoint-specific. Error responses carry success: false, a human-readable error string, and — where produced by static validation — a details array of diagnostic strings.

Error envelope
{
  "success": false,
  "error": "Invalid computation graph",
  "details": [
    "nodes[0].operations[1].arguments.x: expected matrix, received undefined"
  ]
}
Two legacy endpoints (GET /v1/health and GET /v1/info) use the field name status rather than success; the value "completed" is equivalent to true. New endpoints use success.
§4

Compute

The principal endpoint of the platform. Accepts a JSON-encoded computational graph, validates it, executes it, and returns the entry-node result together with the total ECU consumption. The request grammar is fully specified in DAG schema.

POST /v1/compute
PropertyValue
MethodPOST
Path/v1/compute
Authenticationx-api-key required
Content-Typeapplication/json or multipart/form-data
Success status200
BilledYes — ECU per executed operation
Response
{
  "success": true,
  "data": {
    "result": { "AAt": [[], [], []] },
    "ecuUsed": 3
  }
}

The resultobject maps each placeholder listed in the entry node's return array (with the leading $ and any state. prefix stripped) to its computed value. When the request body is multipart/form-data, the JSON graph is supplied under the graph field and one or more files as additional parts — the mechanism is described on the DAG schema page.

§5

Operation discovery

Programmatic enumeration of the operation registry. The response contains, for every operation, its description and its JSON Schema — suitable for driving IDE completions, contract tests, or generated client stubs.

GET /v1/operations
PropertyValue
MethodGET
Path/v1/operations
AuthenticationNot required
Success status200
BilledNo
Response (abbreviated)
{
  "success": true,
  "data": {
    "math.matrix.svd": {
      "description": "",
      "inputSchema": { "type": "object", "properties": {}, "required": [] }
    },
    "math.matrix.random": {},
    "finance.efficientFrontier": {}
  }
}
§6

Informational endpoints

Human-readable narrative endpoints. Suited to shell exploration and to quick self-service documentation from within an agent session; the canonical machine-readable equivalent is the operation discovery endpoint (§5).

GET /v1/health
PropertyValue
MethodGET
Path/v1/health
AuthenticationNot required
ResponseLiveness probe.
{
  "success": true,
  "data": { "message": "Euriklis API is working correctly." },
  "ecu": 0
}
GET /v1/info

Returns a narrative summary of the API — request grammar, submission instructions, and pointers to the reference material.

GET /v1/info/:packageName

Returns package-scoped narrative documentation. Currently defined for math; further packages become available as they are added to the registry.

§7

File uploads

Files may be uploaded independently of a compute request and later referenced by identifier. This is the recommended pattern for reusable data (large tables, calibration matrices) that participate in multiple graphs. Uploads are scoped to the owning API key and persist until explicitly deleted or until the server's storage-eviction policy retires them.

POST /v1/data/upload
PropertyValue
MethodPOST
Path/v1/data/upload
Authenticationx-api-key required
Content-Typemultipart/form-data
BodyForm field file containing the file to upload.
curl -X POST https://api.euriklis.com/v1/data/upload \
  -H "x-api-key: $EURIKLIS_API_KEY" \
  -F "file=@dataset.xlsx"
Response
{
  "success": true,
  "data": {
    "id": "3f5a0b28-9e5b-4a44-bd57-9c8e9c6e2c11",
    "name": "dataset.xlsx",
    "size": 41283
  }
}

The returned id is subsequently used inside a compute request under the top-level files map. See the DAG schema page for the injection mechanism.

GET /v1/data/uploads

Lists the caller's uploads.

Response
{
  "success": true,
  "data": [
    {
      "id": "3f5a0b28-9e5b-4a44-bd57-9c8e9c6e2c11",
      "name": "dataset.xlsx",
      "size": 41283,
      "uploadedAt": "2026-07-21T09:14:22.008Z"
    }
  ]
}
POST /v1/data/upload/delete

Deletes an upload by identifier. Body: {"id": "<upload-id>"}. Returns {"success": true} on success.

§8

Ticker symbol search

A convenience endpoint for locating equity ticker symbols by free-text query. Intended as a companion to the finance operations, particularly when constructing a portfolio-analysis graph interactively.

GET /v1/finance/symbols
PropertyValue
MethodGET
Path/v1/finance/symbols?q=<query>
AuthenticationNot required
Query parameterq: free-text search string.
Response (abbreviated)
{
  "success": true,
  "data": [
    { "symbol": "AAPL", "shortname": "Apple Inc.", "exchange": "NMS" },
    { "symbol": "AAPL.MX", "shortname": "Apple Inc.", "exchange": "MEX" }
  ]
}
§9

ECU consumption stream

A server-sent-events endpoint that emits an event whenever the caller's ECU consumption changes. Suitable for live dashboards and for programmatic quota monitoring. The initial event upon connection reports the current state.

GET /v1/ecu/stream
PropertyValue
MethodGET
Path/v1/ecu/stream
Authenticationx-api-key required
Content-Typetext/event-stream
PayloadJSON with ecuUsed and ecuBalance.
Stream sample
data: {"ecuUsed": 3421, "ecuBalance": 96579}

data: {"ecuUsed": 3424, "ecuBalance": 96576}
Enterprise-tier accounts with an unlimited quota transmit ecuBalance: null. Only ecuUsed is meaningful in that case.
§10

Status codes

HTTP status codes distinguish the failure class. Validation failures are reported with structured details and do not incur ECU consumption.

StatusMeaning
200Successful completion; the response envelope carries success: true.
400Static validation failure — malformed body, unrecognised operation, arity or shape error, invalid placeholder. Includes a details array.
401Missing or invalid API key.
422Runtime failure during execution — e.g. a numerical operation raised an exception. No details array; the error string carries the message.
429ECU quota exceeded. Reset occurs on the customary billing boundary; enterprise-tier accounts do not receive this code.
500Unexpected internal error. Reproduction reports are welcome via the support channel.