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:
https://lantfly.com/api/v3/standby/{actor}/{path}
| Part | Description |
|---|---|
{actor} | Actor ID or slug, for example lantfly~web-scraper. |
{path} | The path on the actor's web server, with its query string. |
curl "https://lantfly.com/api/v3/standby/u4821~price-api/search?q=serum" \
-H "Authorization: Bearer $LANTFLY_TOKEN"
What happens:
- If your account has no Standby run of the actor, Lantfly starts one and waits until its web server answers.
- 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. - 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}):
| Field | Type | Default | Description |
|---|---|---|---|
is_enabled | boolean | Turns Standby on. | |
desired_idle_instances | 0 or 1 | 1 keeps the run up after the idle timeout. | |
max_requests_per_run | integer, 1–1000 | 4 | Requests one run serves at once. |
idle_timeout_secs | integer, 30–86400 | 300 | Seconds without requests before the run stops. |
memory_mbytes | integer ≥ 128 | Actor default | Memory of the Standby run. |
Set standby to null to turn it off. See Actors.
Limits
| Limit | Value |
|---|---|
| Waiting requests per account (shared with MCP tool calls that wait) | 5 |
| Total time for one request, including start-up | 300 seconds |
| Request and response body | 10 MB |
Errors
| Status | Code | Meaning | What to do |
|---|---|---|---|
| 400 | actor_standby_not_enabled | The actor's version doesn't have Standby on. | Enable it on the version. |
| 400 | actor_is_deprecated | The actor is deprecated. | Use another actor. |
| 403 | insufficient_permissions | Read-only token, or an actor-limited token for another actor. | Use a token that can run the actor. |
| 404 | record_not_found | No such actor, or you can't see it. | Check the ID or slug. |
| 413 | request_too_large | The request body is over the limit. | Send less. |
| 429 | rate_limit_exceeded | 5 requests of the account are already waiting. | Retry after Retry-After (5 s). |
| 502 | standby_run_failed | The run ended before it could answer. | Check the run's log, then retry. |
| 502 | standby_proxy_unreachable | The machine serving the run didn't answer. | Retry. |
| 502 | response_too_large | The actor answered with more than the limit. | Make the actor answer with less. |
| 503 | standby_capacity_exceeded | The run already serves max_requests_per_run requests. | Retry after Retry-After, or raise max_requests_per_run. |
| 504 | standby_run_not_ready | The run didn't become ready, or the request ran out of time. | Retry after Retry-After. The run keeps starting. |