> ## Documentation Index
> Fetch the complete documentation index at: https://abstract-pbc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Choose a checkpoint, send an observation, and get robot actions.

## Install

```sh theme={"theme":"css-variables"}
pip install "abstract-client>=0.2.2"
```

Use Python 3.10 or later. [Get an API key](https://abstract-pbc.mintlify.site/authentication.md) before your first call.
A new account starts with \$5 of API credit;
[add more](https://platform.abstract.inc/start?setup=billing) when that runs out.
Set `ABSTRACT_API_KEY` in your program's environment; keep the key out of source code.

## Get an action

`frames` and `observation` come from your robot's cameras and sensors, as described below.
Read the key into `ABSTRACT_API_KEY` with `os.environ["ABSTRACT_API_KEY"]`.

```python Python theme={"theme":"css-variables"}
import abstract

checkpoint = "allenai/molmoact2"
embodiment = "yam"
client = abstract.client(
    ABSTRACT_API_KEY, checkpoint, embodiment
)

client.set_observation(frames, observation)
action = client.get_action()
client.reset_episode()
```

* `set_observation()` supplies the camera frames, task, and measured robot state.
* `get_action()` returns an action chunk for your controller. It does not move the robot.
* `reset_episode()` ends the model's episode. It does not reposition the robot.

The client checks that the checkpoint is available to your account and matches the embodiment.
Choosing an embodiment does not adapt a checkpoint trained on another robot.

## Connect your observations

For this YAM checkpoint, `frames` contains JPEG bytes from three cameras:
`overhead`, `wrist_l`, and `wrist_r`. Use the state measured when those frames were captured.

```python Python theme={"theme":"css-variables"}
frames = {
    "overhead": top_jpeg,
    "wrist_l": left_jpeg,
    "wrist_r": right_jpeg,
}
observation = {
    "prompt": "put the cup in the bin",
    "state": state,
}
```

`state` contains each gripper's measured pose and opening, in the checkpoint's
[YAM coordinate frames](https://abstract-pbc.mintlify.site/robots/models.md#poses). See the [request fields](https://abstract-pbc.mintlify.site/robots/get-action.md)
for their names and shapes. Send actual measurements, not example poses or joint angles.

The returned `action.left` and `action.right` hold the two arms' target rows; `action.dt`
is the time between rows. Your controller validates the targets and performs its own
inverse kinematics. Keep the episode open while continuing the same task: feed camera ticks
through `set_observation()` and collect `action.next_frames_per_camera` new ticks before the
next `get_action()`. Reset when the task ends. Call `client.close()` when finished, or use
the client as a context manager.

* [Supported checkpoints](https://abstract-pbc.mintlify.site/robots/models.md)
* [Robot API reference](https://abstract-pbc.mintlify.site/robots/get-action.md)
* [Errors and limits](https://abstract-pbc.mintlify.site/errors.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.