Skip to main content

Runs

A run is one execution of an actor with an input. It has a status, a live log, its own storages and a usage record. Find your runs under Actors → Runs in the Console, or with GET /api/v3/runs.

Statuses​

StatusMeaning
READYAccepted and waiting for a machine to pick it up.
RUNNINGThe actor's container is running.
SUCCEEDEDThe actor finished without error.
FAILEDThe actor exited with an error. The log usually says why.
TIMED-OUTThe run reached its timeout and was stopped.
ABORTEDSomeone stopped it before it finished.

SUCCEEDED, FAILED, TIMED-OUT and ABORTED are final. Results the actor pushed before the end stay in its dataset whatever the status.

Each run also records where it came from in origin: WEB (the Console), API, SCHEDULER, WEBHOOK or STANDBY. A run started by a schedule shows Schedule: and the schedule's name, and the API returns it in schedule.

Lifecycle​

  1. Start. POST /api/v3/actors/:actor/runs or POST /api/v3/tasks/:task/runs, the Start button, a schedule, an integration or an AI app.

  2. Checks. Before a run is accepted, Lantfly checks:

    CheckRefused with
    The input matches the actor's input schema422 validation_failed
    The account owner's email is verified403 email_not_verified
    The account has usage left (plan usage, credit or overage room)402 not_enough_usage_to_run_paid_actor
    The account is not on billing hold402 billing_on_hold
    Runs waiting or running are within your plan's concurrent run limit429 concurrent_runs_limit_exceeded
  3. READY. The run gets a default dataset, key-value store and request queue, and a run token.

  4. RUNNING. The actor reads its input, pushes results and writes records, and its log streams in.

  5. Finish. The run ends in a final status. Lantfly records usage, fires webhooks, checks monitors and sends notifications.

Wait for a run​

wait_for_finish (0 to 60 seconds) on POST /api/v3/actors/:actor/runs and POST /api/v3/tasks/:task/runs keeps the request open until the run finishes or the time is up, then returns the run. For longer runs, poll GET /api/v3/runs/:run, or get a webhook when it ends.

The run page​

TabWhat it shows
OutputThe dataset items, as a table or as the actor's own dataset views, with Export. Links from the actor's output schema are listed too.
LogThe live log. Download the full log saves all of it.
Live viewA web page the actor serves while it runs (see Live view).
InputThe input the run started with.
Key-value storeThe run's records, such as INPUT and OUTPUT.
StorageThe IDs of the default dataset, key-value store and request queue.
UsageCompute units, results and charged events, with their cost.

Logs​

GET /api/v3/runs/:run/log?from=0 returns { chunk, offset, finished }. Each call returns at most 1 MB; call again with from set to the offset you received until the run has finished and chunk comes back empty. Secrets (actor environment variables marked secret) are masked. A run keeps at most 50 MB of log; past that the log is truncated.

Read a run log
curl -s "https://lantfly.com/api/v3/runs/$RUN_ID/log?from=0" \
-H "Authorization: Bearer $LANTFLY_TOKEN"

Abort​

Abort (or POST /api/v3/runs/:run/abort) stops a READY or RUNNING run. A READY run is aborted at once; a RUNNING one stops within moments. Results pushed so far stay in the dataset.

Run again and resurrect​

ActionWhat it does
Run againStarts a new run with the same input and options, with new storages. It is disabled when the old input cannot be read. A run that came from a task runs again through the task.
ResurrectStarts the same run again on its own storages, as long as they have not been removed by retention. Results it already pushed stay and new ones are added. You may change memory, timeout and build.

Resurrect goes through the same checks as a new run (usage, concurrent runs), is billed for the extra time only, and fires the ACTOR.RUN.RESURRECTED webhook event. The run's runtime adds up across resurrections.

Resurrect a run with more memory
curl -s -X POST "https://lantfly.com/api/v3/runs/$RUN_ID/resurrect" \
-H "Authorization: Bearer $LANTFLY_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "options": { "memory_mb": 2048 } }'

Resurrect answers 422 when the run has not finished.

Reboot​

Reboot (or POST /api/v3/runs/:run/reboot) restarts the container of a RUNNING run. The actor starts over on the same storages; anything it kept only in memory is lost. It answers 422 when the run is not running.

Metamorph​

An actor can turn its own run into a run of another actor with POST /api/v3/runs/:run/metamorph (target_actor_id, input, optional build). The run keeps its storages; the new input is stored under a key INPUT-METAMORPH-1, INPUT-METAMORPH-2 and so on. The target must be a public actor or one of the owner's. The run keeps the prices it started with, so metamorphing into another account's paid actor is refused (422). Past metamorphs are listed in the run's metamorphs.

Status message​

While it runs, an actor can show a short status (for example "Page 12 of 40") with PATCH /api/v3/runs/:run { status_message, is_status_message_terminal }. A message marked terminal stays after the run ends.

Live view​

Some actors serve a web page while they run, such as a screenshot stream or a small control panel. When a run is RUNNING and has one, the run page shows a Live view tab, and GET /api/v3/runs/:run returns a container_url you can open in a browser (it carries a short-lived token). Use Open in new tab if the embedded view stays blank. container_url is null before the run starts, after it ends, and for actors without a web server.

Find runs​

GET /api/v3/runs lists runs newest first and takes these filters:

ParameterMeaning
actor_idRuns of one actor
task_idRuns of one task
schedule_idRuns a schedule started
statusOne or more statuses, comma-separated
from, toCreated at or after / at or before (a date or date-time; a date in to means that whole day)
page, per_pagePaging, up to 100 per page

The Console Runs page has the same filters, and they stay in the URL so you can share a filtered view.

Bulk actions​

POST /api/v3/runs/bulk with { "ids": [...], "action": "abort" } or "resurrect" acts on up to 200 runs at once. Runs that cannot take the action (already finished, still running, storages gone) are listed in failed; the others go on. See Pagination and Rate limits for limits on list and bulk calls.

Limits​

LimitValue
Concurrent runs (waiting or running)Set by your plan; see Billing
Memory per run128 MB to 8,192 MB by default
Timeout per run10 seconds to 24 hours by default
wait_for_finishUp to 60 seconds
Ad-hoc webhooks per run10
Log page1 MB per call; 50 MB per run
Bulk actions200 runs per request
Run storage keptSet by your plan; name a storage to keep it (see Storage)