# VLA API requests: action chunks, contracts and failures

> Build a VLA client around action horizons, embodiment-specific units, bounded retries and offline validation of the OpenRobotics /v1/act contract.

OpenRobotics · November 21, 2026 · Updated December 1, 2026

**A VLA API returns an action chunk, not a hardware-independent robot command.** OpenRobotics accepts an instruction, an observation and a requested horizon at `POST /v1/act`. A successful response contains `actions`, a matrix whose rows are successive steps. Interpreting those columns, deciding when the observation is too old, and deciding whether an action is safe remain the client's responsibility.

This walkthrough follows the repository's gateway and act worker contract (task version 3), checked on December 1, 2026. The executable example uses synthetic local data only: no API key, network request, GPU or robot is involved. OpenRobotics here means the model API at openrobotics.dev, not the Open Robotics/ROS organization; no affiliation is implied.

## From an observation to an action chunk

A vision-language-action model combines image features, language and sometimes proprioception to predict actions. The output mechanism differs by checkpoint. [OpenVLA](https://www.openrobotics.dev/models/openvla/openvla-7b)'s original implementation predicts discretized action tokens ([OpenVLA explained](https://www.openrobotics.dev/blog/openvla) covers why); openpi's flow-based policies, such as [π0](https://www.openrobotics.dev/models/physical-intelligence/pi0), generate continuous action sequences ([how π0 works](https://www.openrobotics.dev/blog/pi0)). Sharing an HTTP envelope does not make their input normalization, camera layout or control space interchangeable.

An action chunk has shape `H_returned × D_action`. `H_returned` is the number of rows actually received, not necessarily the requested horizon. `D_action` depends on the embodiment: seven numbers might describe Cartesian deltas and a gripper, but they could mean something else. Do not infer semantics from vector length. The gateway's generic response contract requires a nonempty list of numeric lists; a client still needs stricter application-specific shape checks.

Action chunking and **Action Chunking with Transformers (ACT)** are also different terms. Chunking is the general choice to predict multiple future actions. ACT is the specific imitation-learning method described by Zhao and colleagues (and the first policy trained in [the LeRobot tutorial](https://www.openrobotics.dev/blog/lerobot)), including a conditional variational autoencoder and temporal ensembling of overlapping predictions. The `/act` route name does not mean that every model uses ACT.

Chunking trades observation freshness against prediction reuse. Executing more rows before replanning reduces how often the application asks for a new prediction, but leaves it reacting to an older observation for longer. That is an architectural trade-off, not a measured latency or safety claim about this service.

## Establish an embodiment contract first

Before assembling JSON, record the checkpoint, camera names, image preprocessing, state layout, action units and controller period in the client configuration. For a simulation experiment, also record the simulator version, task and reset seed. A model-family name alone is insufficient: two checkpoints from one family may expect different robots and normalization statistics.

Coordinate conventions must be explicit. Are translations in the camera frame, robot base frame or tool frame? Are they absolute positions, normalized deltas or velocities? Are angles Euler rotations, axis-angle values or joint positions? Is the gripper value a width in meters or a discrete open/close convention? An eight-number state is not automatically eight joint angles. Treat missing answers as an integration blocker.

The public [model catalog](https://www.openrobotics.dev/models) provides fields including `endpoint`, `embodiments`, `checkpoint`, `license`, `status` and `excluded_reason`. Inspect them together. A catalog listing does not prove that a worker is warm, that a model is free, or that its checkpoint supports arbitrary hardware. In the implementation, HTTP integrations can be classified as live before any particular request succeeds. Excluded models are not callable; development stand-ins must not be confused with model inference.

## Construct the public request

The following is an **illustrative request template**, not a runnable inference example. Replace the image placeholders and use a checkpoint-compatible observation before considering a real call. Such a call can be billed and may start a worker; this article does neither.

```json
{
  "model": "physical-intelligence/pi0",
  "instruction": "put the black bowl on the plate",
  "observation": {
    "images": {
      "agentview": "<base64 JPEG from the compatible simulator>",
      "wrist": "<base64 JPEG from the same observation>"
    },
    "state": [0.12, -0.48, 0.33, 0, 1.57, 0, 0.04, 0.04]
  },
  "embodiment": "libero",
  "action_horizon": 50
}
```

The model identifier occurs in the implementation; the numbers are illustrative, not a recorded robot observation. The gateway accepts `instruction` up to 1,000 characters and trims whitespace. `action_horizon` is an integer from 1 to 100, defaulting to 50. The state accepts up to 64 finite numbers. Named `images` accepts one to eight cameras, with names made from letters, digits, underscores, periods and hyphens, up to 64 characters.

Image limits are measured on **base64 string length**, not decoded pixel bytes: the gateway caps the single image or combined image strings at `4 × 1024 × 1024` characters. Base64 overhead matters when choosing resolution and JPEG quality. A data URL's prefix also occupies characters. The outer HTTP body is capped separately at 8 MiB. Passing these limits does not establish that the image decodes correctly or matches the checkpoint's expected input geometry.

Depth-aware requests can additionally carry named `depths` as 16-bit PNGs in millimeters, and `cameras` containing 3×3 intrinsics and optional 4×4 camera-to-robot extrinsics. Those are model-specific capabilities, not requirements or supported inputs for every VLA. See the [act API reference](https://www.openrobotics.dev/docs/api/act) for the public envelope rather than forwarding a worker request directly: the worker envelope's `task` and contract headers are gateway concerns.

## Validate a response offline

A successful public response includes `id`, `model`, `backend`, `actions` and `usage`, where usage contains `cost_usd` and `latency_ms`. Neither the returned matrix nor the usage timing supplies capture timestamps, control frequency or coordinate-frame labels. Keep observation timing in your own request context.

Save the following as `check_chunk.py` and run `python3 check_chunk.py`. It is an executable **synthetic fixture**, not a policy, simulator or robot controller. Its made-up two-dimensional action space is deliberately unlike a real checkpoint: each row is an illustrative pair of joint targets in radians. The application policy allows at most two rows into an offline inspection window; nothing is executed.

```python
import math

def inspect_chunk(reply, *, model, dimensions, requested, capture_s, now_s):
    if reply.get("model") != model:
        raise ValueError("model mismatch")
    if reply.get("backend") not in {"http", "openvla"}:
        raise ValueError("not a real-model backend")
    age_s = now_s - capture_s
    if not 0 <= age_s <= 0.10:
        raise ValueError("stale observation")
    rows = reply.get("actions")
    if not isinstance(rows, list) or not 1 <= len(rows) <= requested:
        raise ValueError("unexpected horizon")
    for row in rows:
        if not isinstance(row, list) or len(row) != dimensions:
            raise ValueError("action shape mismatch")
        if not all(type(x) in (int, float) and math.isfinite(x) for x in row):
            raise ValueError("non-finite action")
    return rows[:2]

fixture = {
    "id": "act_fixture",
    "model": "physical-intelligence/pi0",
    "backend": "http",
    "actions": [[0.1, -0.2], [0.2, -0.1], [0.3, 0.0]],
    "usage": {"cost_usd": 0.0, "latency_ms": 0}
}
options = dict(model=fixture["model"], dimensions=2, requested=3,
               capture_s=10.0, now_s=10.05)
print(inspect_chunk(fixture, **options))
for changes in ({"backend": "simulated"}, {"actions": [[0.1]]}):
    try:
        inspect_chunk({**fixture, **changes}, **options)
    except ValueError as error:
        print(str(error))
try:
    inspect_chunk(fixture, **{**options, "now_s": 10.5})
except ValueError as error:
    print(str(error))
```

Expected output, tested locally with this fixture:

```text
[[0.1, -0.2], [0.2, -0.1]]
not a real-model backend
action shape mismatch
stale observation
```

The fixture deliberately labels its backend `http` to exercise that validation branch; it is not evidence of an HTTP inference call. Its zero cost and latency are placeholders, not pricing or performance measurements. The 100 ms freshness threshold is an illustrative application policy, not a recommended robot safety bound. Rejecting a horizon longer than requested is also client policy; the generic worker schema is less restrictive.

Shape and freshness checks are necessary but insufficient. This example does not validate joint limits, collisions, dynamics, actuator saturation or workspace constraints. A physically valid controller must handle those separately and fail safely when the policy or network disappears. Never send this fixture to hardware.

## Timing and bounded failure handling

Use a monotonic clock for elapsed time on one client. Capture a timestamp when acquiring the observation, not just before sending JSON. If the cameras and state arrive from different devices, account for their clock synchronization and acquisition skew. The public act contract does not synchronize them for you.

For an illustrative controller period `Δt = 0.02 s`, a 50-row chunk spans one second of nominal steps. Executing two rows would span 40 ms before the next observation, assuming those actions actually use that controller period. The arithmetic says nothing about measured service throughput. Network transit, queueing, worker computation and client scheduling all consume observation freshness.

Classify a failure before retrying:

| Outcome | Client response |
| --- | --- |
| 400 invalid input, unsupported input or unavailable model | Correct the request or model choice; do not repeat unchanged. |
| 401, 403 | Fix authentication or a disabled key; never log the bearer token. |
| 402 | Inspect credits or key limits; retrying cannot replenish them. |
| 404 | Check the exact model identifier and endpoint. |
| 413 | Reduce the body and encoded image size. |
| 502 | Inspect the sanitized error; do not assume a transient failure. |
| 503 with `Retry-After` | Respect the delay and an overall application deadline; acquire a fresh observation before any later control attempt. |
| Timeout after sending | Treat completion as unknown; do not assume the request was never executed. |

The gateway charges synchronous requests after the backend run succeeds. That does not make blind retries free: a successful request whose response was lost can already have been charged. This walkthrough does not assume an idempotency guarantee for `/act`. Retrying an old observation after a long cold start is also a control error even if the next HTTP response is successful.

## Debug the representation before the model

When actions look wrong, first inspect camera ordering, image color channels, resize/crop conventions and state normalization against the exact checkpoint adapter. Check that the intended embodiment was selected and that an expected wrist view was not silently replaced by another camera. Then validate action units, gripper polarity and the coordinate transform between the model and simulator.

Compare changes using fixed synthetic inputs for parsing tests and a separately controlled simulation evaluation for behavior. Do not compare two unrelated action spaces by subtracting their vectors. Log only sanitized diagnostics such as status, matrix shape and local elapsed time; camera frames, request bodies and keys need separate privacy controls. A malformed-output test can prove a validator rejects a shape, not that a policy completes a task.

## FAQ

### What does a VLA API return?

An action chunk: the `actions` field is a matrix of shape `H_returned × D_action`, one row per successive step. What each column means (Cartesian deltas, joint targets, a gripper value) depends on the checkpoint's embodiment, so the client must interpret units, frames and safety itself.

### Can I swap models by changing only the ID?

The envelope may stay the same, but camera names, state statistics, action units, horizon and checkpoint embodiment may change. Verify those before comparing outputs. The [VLA overview](https://www.openrobotics.dev/blog/vla-models) explains the model families; it is not a compatibility certificate.

### Does the API execute the returned actions?

This endpoint returns a prediction matrix. The code here executes nothing. Physical execution requires an independently validated controller and safety process outside this example.

### Is a shorter chunk always better?

No. It can permit fresher feedback but increases request frequency and may change how the checkpoint was intended to be used. Measure task-specific behavior in an appropriate simulator; do not infer success rate from horizon alone.

### Does a catalog `live` status guarantee readiness?

No. Configuration-level availability and current worker readiness differ. Handle cold starts, explicit exclusions and backend errors, and inspect the response backend rather than treating a catalog entry as an inference result.

## Primary sources and implementation

- [OpenRobotics act gateway](https://github.com/basilysf1709/openrobotics/blob/1bb6e18/packages/gateway/src/endpoints/act.ts), [request pipeline](https://github.com/basilysf1709/openrobotics/blob/1bb6e18/packages/gateway/src/app.ts) and [worker contracts](https://github.com/basilysf1709/openrobotics/blob/1bb6e18/packages/contracts/src/tasks.ts): limits, response envelope and task versions checked for this article.
- [Learning Fine-Grained Bimanual Manipulation with Low-Cost Hardware](https://arxiv.org/abs/2304.13705): ACT and temporal ensembling, not a benchmark of this API.
- [OpenVLA implementation](https://github.com/openvla/openvla): action decoding and checkpoint-specific unnormalization, including the upstream warning that model weights can inherit base-model licensing restrictions.
- [openpi implementation](https://github.com/Physical-Intelligence/openpi): flow-based policies, observation transforms and the explicit warning that a checkpoint may not work on another robot setup.
