Reference
API Reference
Complete documentation for the EOIL REST API. Base URL: https://api.eoil.ltd
Authentication
Include Authorization: Bearer eoil_sk_... in all requests.
Jobs
POST
/v1/jobsSubmit a new optimization job.
Request body
{
"type": "optimize",
"data": { "model": "alpha-v3", "epochs": 100 }
}Response
{
"id": "job_9x2mK7pQ",
"status": "queued",
"credits": 10.0,
"estimatedMs": 2340,
"createdAt": "2025-07-12T09:14:22Z"
}GET
/v1/jobs/{id}Get the status and result of a job.
Response
{
"id": "job_9x2mK7pQ",
"status": "completed",
"result": { "sharpe": 2.41, "cagr": 0.183 },
"durationMs": 2180,
"completedAt": "2025-07-12T09:14:24Z"
}GET
/v1/jobsList jobs with optional status filter and cursor pagination.
Response
{
"data": [ { "id": "job_9x2mK7pQ", "status": "completed" }, ... ],
"nextCursor": "eyJpZCI6ImpvYl8",
"hasMore": true
}DELETE
/v1/jobs/{id}Cancel a queued or running job.
Response
{ "cancelled": true }Balance & Usage
GET
/v1/balanceRetrieve current EOIL balance.
Response
{ "balance": 1240.50, "currency": "EOIL" }GET
/v1/usageUsage analytics for the current billing period.
Response
{
"period": "2025-07",
"totalCredits": 480.0,
"jobCount": 312,
"breakdown": { "optimize": 400.0, "fvd": 80.0 }
}API Keys
POST
/v1/keysCreate a new API key with specified scopes.
Request body
{
"name": "production",
"scopes": ["jobs:read", "jobs:write", "balance:read"]
}Response
{
"id": "key_a1b2c3",
"name": "production",
"key": "eoil_sk_...",
"createdAt": "2025-07-12T09:00:00Z"
}GET
/v1/keysList all API keys for your account.
Response
{
"data": [
{ "id": "key_a1b2c3", "name": "production", "lastUsed": "2025-07-12T..." }
]
}