| Property | Value |
|---|
| Server | https://api.go-lumen.ai |
|---|
| Authentication | An app key issued to your application: Authorization: Bearer lak_<id>_<secret>. App keys (lak_) are separate from the workspace API keys (lmn_) of the Runtime API. |
|---|
| OpenAPI file | platform-v1.json |
|---|
| Operations | 5 |
|---|
Overview
The API an application built on Lumen uses, authenticated by a key of its AppClient (Authorization: Bearer lak_<id>_<secret>).
Worker API (/worker/v1): an app's own workers pull the tasks of its remote steps (ClusterStep executor.remote.app) from the region the workspace lives in. A worker claims tasks, heartbeats them every lease/3, uploads any files through artifacts:presign, and completes or fails each attempt. An attempt it no longer holds (its lease ran out and the task was claimed again, or it finished) answers 409, and the worker must stop working on it. The task idempotencyKey is stable across attempts: key side effects on it.
Errors are a Status object (code, reason, message).
Operations
Request and response bodies below are described by the schemas in Schemas; the example bodies are built from those schemas.
Sign an upload of one artifact of a held attempt
POST/worker/v1/artifacts:presign
Returns a PUT to the region's store, among the run's files. Send exactly the returned headers: Content-Type and Content-Length are signed, so the store refuses any other body. The size and type are checked again when the attempt completes.
Request body application/json
| Field | Type | Default | Description |
|---|
attemptrequired | integer | - | |
contentTyperequired | string | - | |
namerequired | string | - | pattern `^[A-Za-z0-9_-][A-Za-z0-9._-]{0,127}$` |
sizerequired | integer | - | minimum 1 |
taskIdrequired | string | - | |
request body (built from the schema)
{
"attempt": 1,
"contentType": "string",
"name": "string",
"size": 1,
"taskId": "string"
}
Responses
| Status | Meaning |
|---|
| 200 | The signed upload. |
| 400 | The request is malformed or breaks a limit. (BadRequest) |
| 401 | No valid app key. (Unauthorized) |
| 403 | The key lacks the scope, the region, or a label it presented; or the task is not the app's. (Forbidden) |
| 409 | The attempt is not held by this worker any more; stop working on it. (NotHeld) |
Response 200
| Field | Type | Default | Description |
|---|
expiresAtrequired | string | - | |
headersrequired | map of string | - | |
methodrequired | string | - | one of PUT |
namerequired | string | - | |
urlrequired | string | - | |
response 200 (built from the schema)
{
"expiresAt": "2026-01-02T15:04:05Z",
"headers": {},
"method": "PUT",
"name": "string",
"url": "string"
}
Claim tasks of the app's remote steps
POST/worker/v1/claims
Takes up to limit tasks the worker may run, from the workspaces the app is installed in, each leased for leaseSeconds. With waitSeconds the call waits that long for a task when none is ready (a long poll). The labels a worker presents must be granted by the AppClient's spec.workerLabels; the app label is set for it.
Request body application/json
| Field | Type | Default | Description |
|---|
labels | map of string | - | What the worker carries, each granted by the AppClient's spec.workerLabels. |
leaseSeconds | integer | 60 | minimum 30; maximum 600 |
limit | integer | 1 | minimum 1; maximum 50 |
waitSeconds | integer | 0 | minimum 0; maximum 25 |
workerrequired | string | - | The worker's own name, a DNS label; the same for every call about its tasks.pattern `^[a-z0-9]([-a-z0-9.]{0,61}[a-z0-9])?$` |
request body (built from the schema)
{
"labels": {},
"leaseSeconds": 60,
"limit": 1,
"waitSeconds": 0,
"worker": "string"
}
Responses
| Status | Meaning |
|---|
| 200 | The tasks claimed; none when nothing was ready. |
| 400 | The request is malformed or breaks a limit. (BadRequest) |
| 401 | No valid app key. (Unauthorized) |
| 403 | The key lacks the scope, the region, or a label it presented; or the task is not the app's. (Forbidden) |
| 429 | The key holds as many open claims as it may; retry after Retry-After. (TooManyRequests) |
Response 200
| Field | Type | Default | Description |
|---|
tasksrequired | list of object | - | |
tasks[].attemptrequired | integer | - | This claim's attempt; later calls name it. |
tasks[].config | object | - | The node's settings. |
tasks[].idrequired | string | - | Opaque; names the task in every later call. |
tasks[].idempotencyKeyrequired | string | - | Stable across attempts. |
tasks[].inputrequired | list of object | - | |
tasks[].input[].fields | map of object | - | |
tasks[].input[].files | list of object | - | |
tasks[].input[].files[].contentTyperequired | string | - | |
tasks[].input[].files[].namerequired | string | - | |
tasks[].input[].files[].sizerequired | integer | - | |
tasks[].input[].files[].url | string | - | A signed GET |
tasks[].input[].text | string | - | |
tasks[].leaseExpiresAtrequired | string | - | |
tasks[].maxAttemptsrequired | integer | - | |
tasks[].nodeIdrequired | string | - | |
tasks[].runIdrequired | string | - | |
tasks[].steprequired | string | - | The ClusterStep's name. |
tasks[].workspacerequired | string | - | |
response 200 (built from the schema)
{
"tasks": [
{
"attempt": 1,
"config": {},
"id": "string",
"idempotencyKey": "string",
"input": [
{
"fields": {},
"files": [
null
],
"text": "string"
}
],
"leaseExpiresAt": "2026-01-02T15:04:05Z",
"maxAttempts": 1,
"nodeId": "string",
"runId": "string",
"step": "string",
"workspace": "string"
}
]
}
Extend the leases of held tasks
POST/worker/v1/heartbeats
Extends the lease of every attempt the worker still holds and returns those. An attempt missing from the answer was lost: stop working on it.
Request body application/json
| Field | Type | Default | Description |
|---|
leaseSeconds | integer | 60 | minimum 30; maximum 600 |
refsrequired | list of object | - | maxItems 200 |
refs[].attemptrequired | integer | - | |
refs[].idrequired | string | - | |
request body (built from the schema)
{
"leaseSeconds": 60,
"refs": [
{
"attempt": 1,
"id": "string"
}
]
}
Responses
| Status | Meaning |
|---|
| 200 | The attempts still held. |
| 400 | The request is malformed or breaks a limit. (BadRequest) |
| 401 | No valid app key. (Unauthorized) |
| 403 | The key lacks the scope, the region, or a label it presented; or the task is not the app's. (Forbidden) |
Response 200
| Field | Type | Default | Description |
|---|
refsrequired | list of object | - | |
refs[].attemptrequired | integer | - | |
refs[].idrequired | string | - | |
response 200 (built from the schema)
{
"refs": [
{
"attempt": 1,
"id": "string"
}
]
}
Complete a held attempt
POST/worker/v1/tasks/{taskId}/attempts/{attempt}:complete
Finishes the attempt with its output, and the run goes on. The output's fields are set over the first input document's, its text replaces the text when given, and each artifact (uploaded first through artifacts:presign) is added as a file.
Parameters
| Name | In | Type | Description |
|---|
taskIdrequired | path | string | The task id a claim returned (opaque). |
attemptrequired | path | integer | <nil> |
Request body application/json
| Field | Type | Default | Description |
|---|
artifacts | list of object | - | |
artifacts[].namerequired | string | - | The name presigned for this attempt. |
outputrequired | object | - | |
output.fields | map of object | - | |
output.text | string | - | |
weightMilli | integer | - | Work done, in milli-credits; the step's catalog weight is the least charged. |
request body (built from the schema)
{
"artifacts": [
{
"name": "string"
}
],
"output": {
"fields": {},
"text": "string"
},
"weightMilli": 1
}
Responses
| Status | Meaning |
|---|
| 204 | Completed. |
| 400 | The request is malformed or breaks a limit. (BadRequest) |
| 401 | No valid app key. (Unauthorized) |
| 403 | The key lacks the scope, the region, or a label it presented; or the task is not the app's. (Forbidden) |
| 409 | The attempt is not held by this worker any more; stop working on it. (NotHeld) |
Fail a held attempt
POST/worker/v1/tasks/{taskId}/attempts/{attempt}:fail
A retryable failure queues the task again after backoffSeconds while it has attempts left; otherwise the task and its run fail.
Parameters
| Name | In | Type | Description |
|---|
taskIdrequired | path | string | The task id a claim returned (opaque). |
attemptrequired | path | integer | <nil> |
Request body application/json
| Field | Type | Default | Description |
|---|
backoffSeconds | integer | 0 | minimum 0; maximum 3600 |
errorrequired | string | - | maxLength 2000 |
retryable | boolean | false | |
request body (built from the schema)
{
"backoffSeconds": 0,
"error": "string",
"retryable": false
}
Responses
| Status | Meaning |
|---|
| 204 | Failed. |
| 400 | The request is malformed or breaks a limit. (BadRequest) |
| 401 | No valid app key. (Unauthorized) |
| 403 | The key lacks the scope, the region, or a label it presented; or the task is not the app's. (Forbidden) |
| 409 | The attempt is not held by this worker any more; stop working on it. (NotHeld) |
Schemas
ArtifactRef
| Field | Type | Default | Description |
|---|
namerequired | string | - | The name presigned for this attempt. |
example (built from the schema)
ClaimRequest
| Field | Type | Default | Description |
|---|
labels | map of string | - | What the worker carries, each granted by the AppClient's spec.workerLabels. |
leaseSeconds | integer | 60 | minimum 30; maximum 600 |
limit | integer | 1 | minimum 1; maximum 50 |
waitSeconds | integer | 0 | minimum 0; maximum 25 |
workerrequired | string | - | The worker's own name, a DNS label; the same for every call about its tasks.pattern `^[a-z0-9]([-a-z0-9.]{0,61}[a-z0-9])?$` |
example (built from the schema)
{
"labels": {},
"leaseSeconds": 60,
"limit": 1,
"waitSeconds": 0,
"worker": "string"
}
ClaimResponse
| Field | Type | Default | Description |
|---|
tasksrequired | list of object | - | |
tasks[].attemptrequired | integer | - | This claim's attempt; later calls name it. |
tasks[].config | object | - | The node's settings. |
tasks[].idrequired | string | - | Opaque; names the task in every later call. |
tasks[].idempotencyKeyrequired | string | - | Stable across attempts. |
tasks[].inputrequired | list of object | - | |
tasks[].input[].fields | map of object | - | |
tasks[].input[].files | list of object | - | |
tasks[].input[].files[].contentTyperequired | string | - | |
tasks[].input[].files[].namerequired | string | - | |
tasks[].input[].files[].sizerequired | integer | - | |
tasks[].input[].files[].url | string | - | A signed GET |
tasks[].input[].text | string | - | |
tasks[].leaseExpiresAtrequired | string | - | |
tasks[].maxAttemptsrequired | integer | - | |
tasks[].nodeIdrequired | string | - | |
tasks[].runIdrequired | string | - | |
tasks[].steprequired | string | - | The ClusterStep's name. |
tasks[].workspacerequired | string | - | |
example (built from the schema)
{
"tasks": [
{
"attempt": 1,
"config": {},
"id": "string",
"idempotencyKey": "string",
"input": [
{
"fields": {},
"files": [
null
],
"text": "string"
}
],
"leaseExpiresAt": "2026-01-02T15:04:05Z",
"maxAttempts": 1,
"nodeId": "string",
"runId": "string",
"step": "string",
"workspace": "string"
}
]
}
CompleteRequest
| Field | Type | Default | Description |
|---|
artifacts | list of object | - | |
artifacts[].namerequired | string | - | The name presigned for this attempt. |
outputrequired | object | - | |
output.fields | map of object | - | |
output.text | string | - | |
weightMilli | integer | - | Work done, in milli-credits; the step's catalog weight is the least charged. |
example (built from the schema)
{
"artifacts": [
{
"name": "string"
}
],
"output": {
"fields": {},
"text": "string"
},
"weightMilli": 1
}
Document
| Field | Type | Default | Description |
|---|
fields | map of object | - | |
files | list of object | - | |
files[].contentTyperequired | string | - | |
files[].namerequired | string | - | |
files[].sizerequired | integer | - | |
files[].url | string | - | A signed GET |
text | string | - | |
example (built from the schema)
{
"fields": {},
"files": [
{
"contentType": "string",
"name": "string",
"size": 1,
"url": "string"
}
],
"text": "string"
}
FailRequest
| Field | Type | Default | Description |
|---|
backoffSeconds | integer | 0 | minimum 0; maximum 3600 |
errorrequired | string | - | maxLength 2000 |
retryable | boolean | false | |
example (built from the schema)
{
"backoffSeconds": 0,
"error": "string",
"retryable": false
}
Field
| Field | Type | Default | Description |
|---|
raw | string | - | What the document said; defaults to the value as text. |
typerequired | string | - | one of string, number, boolean, date, money, object, array |
value | any | - | The value; a money value is {amount, currency}, a date YYYY-MM-DD. |
example (built from the schema)
{
"raw": "string",
"type": "string",
"value": "string"
}
HeartbeatRequest
| Field | Type | Default | Description |
|---|
leaseSeconds | integer | 60 | minimum 30; maximum 600 |
refsrequired | list of object | - | maxItems 200 |
refs[].attemptrequired | integer | - | |
refs[].idrequired | string | - | |
example (built from the schema)
{
"leaseSeconds": 60,
"refs": [
{
"attempt": 1,
"id": "string"
}
]
}
HeartbeatResponse
| Field | Type | Default | Description |
|---|
refsrequired | list of object | - | |
refs[].attemptrequired | integer | - | |
refs[].idrequired | string | - | |
example (built from the schema)
{
"refs": [
{
"attempt": 1,
"id": "string"
}
]
}
| Field | Type | Default | Description |
|---|
contentTyperequired | string | - | |
namerequired | string | - | |
sizerequired | integer | - | |
url | string | - | A signed GET |
example (built from the schema)
{
"contentType": "string",
"name": "string",
"size": 1,
"url": "string"
}
Output
| Field | Type | Default | Description |
|---|
fields | map of object | - | |
text | string | - | |
example (built from the schema)
{
"fields": {},
"text": "string"
}
PresignRequest
| Field | Type | Default | Description |
|---|
attemptrequired | integer | - | |
contentTyperequired | string | - | |
namerequired | string | - | pattern `^[A-Za-z0-9_-][A-Za-z0-9._-]{0,127}$` |
sizerequired | integer | - | minimum 1 |
taskIdrequired | string | - | |
example (built from the schema)
{
"attempt": 1,
"contentType": "string",
"name": "string",
"size": 1,
"taskId": "string"
}
PresignResponse
| Field | Type | Default | Description |
|---|
expiresAtrequired | string | - | |
methodrequired | string | - | one of PUT |
namerequired | string | - | |
urlrequired | string | - | |
example (built from the schema)
{
"expiresAt": "2026-01-02T15:04:05Z",
"headers": {},
"method": "PUT",
"name": "string",
"url": "string"
}
Status
| Field | Type | Default | Description |
|---|
code | integer | - | |
message | string | - | |
reason | string | - | |
example (built from the schema)
{
"code": 1,
"message": "string",
"reason": "string"
}
Task
| Field | Type | Default | Description |
|---|
attemptrequired | integer | - | This claim's attempt; later calls name it. |
config | object | - | The node's settings. |
idrequired | string | - | Opaque; names the task in every later call. |
idempotencyKeyrequired | string | - | Stable across attempts. |
inputrequired | list of object | - | |
input[].fields | map of object | - | |
input[].files | list of object | - | |
input[].files[].contentTyperequired | string | - | |
input[].files[].namerequired | string | - | |
input[].files[].sizerequired | integer | - | |
input[].files[].url | string | - | A signed GET |
input[].text | string | - | |
leaseExpiresAtrequired | string | - | |
maxAttemptsrequired | integer | - | |
nodeIdrequired | string | - | |
runIdrequired | string | - | |
steprequired | string | - | The ClusterStep's name. |
workspacerequired | string | - | |
example (built from the schema)
{
"attempt": 1,
"config": {},
"id": "string",
"idempotencyKey": "string",
"input": [
{
"fields": {},
"files": [
{
"contentType": "string",
"name": "string",
"size": 1,
"url": "string"
}
],
"text": "string"
}
],
"leaseExpiresAt": "2026-01-02T15:04:05Z",
"maxAttempts": 1,
"nodeId": "string",
"runId": "string",
"step": "string",
"workspace": "string"
}
TaskRef
| Field | Type | Default | Description |
|---|
attemptrequired | integer | - | |
idrequired | string | - | |
example (built from the schema)
{
"attempt": 1,
"id": "string"
}