Metadata-Version: 2.4
Name: servo-client
Version: 0.1.1
Summary: Python SDK for Servo's hosted robot model API
Requires-Python: >=3.12
Description-Content-Type: text/markdown
Requires-Dist: httpx
Requires-Dist: pydantic>=2

# servo-client

The public Python SDK for Servo's hosted robot model API.

Servo gives robotics teams one typed API for working with hosted robot policies, world models,
datasets, fine-tuning jobs, evaluations, and deployments. Your application talks to Servo resources;
Servo handles model-specific adapters, compatibility checks, provider orchestration, and usage
tracking behind the hosted API.

## Install

```bash
pip install servo-client
```

## Quickstart

```python
import os

import servo
from servo import templates

sv = servo.Servo(
    base_url=os.environ["SERVO_BASE_URL"],
    api_key=os.environ["SERVO_API_KEY"],
)

robot = sv.robots.register(templates.so101())
obs = templates.sample_observation(robot)

model = sv.models.get("smolvla")
model.inspect(robot)  # compatibility, cameras, action space, readiness

chunk = model.policy(robot, instruction="pick up the cube").act(obs)
print(chunk.actions[0])
```

## What You Can Do

- Call hosted policy models through `model.policy(robot).act(observation)`.
- Inspect model/robot compatibility before sending actions to hardware.
- Register robots, datasets, models, checkpoints, deployments, and jobs.
- Stream data, curate rollout failures, fine-tune, evaluate, and redeploy through one client.
- View hosted usage and billing state for your organization.

## Authentication

Servo uses organization-scoped API keys:

```bash
export SERVO_BASE_URL="https://api.servo.example"
export SERVO_API_KEY="sk_..."
```

Pass the key to `servo.Servo(...)`; the client sends it as `Authorization: Bearer <key>`.

## Package Boundary

This distribution contains only the public `servo` client and `servo_contracts` wire contracts. It
does not include `servo_platform`, Modal app launchers, FastAPI routes, SQLAlchemy models, provider
credentials, private endpoint URLs, or other hosted-service backend code.

## Requirements

- Python 3.12+
- A Servo hosted API URL and organization API key
