Skip to main content

Actor Standby

Some actors are web servers: they answer HTTP requests instead of processing one input and exiting. With Standby, Lantfly keeps a run of such an actor warm for your account and forwards your requests to it, so each call answers in milliseconds instead of waiting for a container to start.

Call a Standby actor​

Send any method to:

Endpoint
https://lantfly.com/api/v3/standby/{actor}/{path}
PartDescription
{actor}Actor ID or slug, for example lantfly~web-scraper.
{path}The path on the actor's web server, with its query string.
Call /search on a Standby actor
curl "https://lantfly.com/api/v3/standby/u4821~price-api/search?q=serum" \
-H "Authorization: Bearer $LANTFLY_TOKEN"

What happens:

  1. If your account has no Standby run of the actor, Lantfly starts one and waits until its web server answers.
  2. Lantfly forwards the request (method, path, query, headers and body) to the run and returns the actor's answer as is. The answer also carries X-Lantfly-Run-Id.
  3. A run that gets no requests for the version's idle timeout stops.

Your credentials (the Authorization header, the token query parameter and cookies) are never passed to the actor.

Authentication​

  • Bearer token in Authorization, or ?token=… for clients that can't set headers. See Authentication.
  • Read-only tokens are refused, even for GET: any request can start a billed run.
  • Actor-limited tokens can call Standby only for their actors.
  • Permission-limited tokens need actors.run. In an organization, your role needs Start runs.
  • Run tokens can't call Standby.

Billing​

The Standby run is a normal run of your account, started with origin STANDBY. It's billed like any run for as long as it's up, plus the actor's own pricing if it has any. It shows in your runs list.

Enable Standby on an actor​

Standby is set per actor version, in the version's standby field (PATCH /actors/{actor}/versions/{version}):

FieldTypeDefaultDescription
is_enabledbooleanTurns Standby on.
desired_idle_instances0 or 11 keeps the run up after the idle timeout.
max_requests_per_runinteger, 1–10004Requests one run serves at once.
idle_timeout_secsinteger, 30–86400300Seconds without requests before the run stops.
memory_mbytesinteger ≥ 128Actor defaultMemory of the Standby run.

Set standby to null to turn it off. See Actors.

Limits​

LimitValue
Waiting requests per account (shared with MCP tool calls that wait)5
Total time for one request, including start-up300 seconds
Request and response body10 MB

Errors​

StatusCodeMeaningWhat to do
400actor_standby_not_enabledThe actor's version doesn't have Standby on.Enable it on the version.
400actor_is_deprecatedThe actor is deprecated.Use another actor.
403insufficient_permissionsRead-only token, or an actor-limited token for another actor.Use a token that can run the actor.
404record_not_foundNo such actor, or you can't see it.Check the ID or slug.
413request_too_largeThe request body is over the limit.Send less.
429rate_limit_exceeded5 requests of the account are already waiting.Retry after Retry-After (5 s).
502standby_run_failedThe run ended before it could answer.Check the run's log, then retry.
502standby_proxy_unreachableThe machine serving the run didn't answer.Retry.
502response_too_largeThe actor answered with more than the limit.Make the actor answer with less.
503standby_capacity_exceededThe run already serves max_requests_per_run requests.Retry after Retry-After, or raise max_requests_per_run.
504standby_run_not_readyThe run didn't become ready, or the request ran out of time.Retry after Retry-After. The run keeps starting.