# Vessel SDK

Repository: [github.com/andrewcampi/vessel_sdk](https://github.com/andrewcampi/vessel_sdk).

## What it does

Vessel SDK is the official Python client for the [Vessel](https://andrewcampi.com/wiki/vessel.md) platform at `https://vessel-platform.acampi.dev`. It wraps embeddings and chat completions and handles batching so a caller can pass many inputs without building the batch protocol by hand.

The constructor takes a base URL and an API key, the same shape as the OpenAI client. The repository's quick start reads both from the environment:

```python
from vessel import Vessel
import os

client = Vessel(
    base_url=os.environ["VESSEL_BASE_URL"],
    api_key=os.environ["VESSEL_API_KEY"],
)

client.models.list()
```

Install it from a checkout with `pip install -e .` after the requirements file, or install the requirements directly. The package is the client. The server is Vessel itself, described on the Vessel page.

## What the client takes care of

- **Automatic batch processing.** Multiple inputs are grouped into the batch calls Vessel is built for.
- **Rate limiting.** The client waits when it would otherwise exceed the platform's limits.
- **Metrics.** Calls can report timing and throughput, which is the number Vessel is designed around.
- **Errors.** Failures come back as exceptions with a message, rather than a partial silent result.

The interface is deliberately small. Model listing, chat completions, and embeddings are the surface. The server-side design (a captain process, crewmate workers, Redis, and large batches on a model that stays resident) is documented on the [Vessel](https://andrewcampi.com/wiki/vessel.md) page and is not reimplemented in the SDK.

## Repository

Issues and the rest of the examples are in [andrewcampi/vessel_sdk](https://github.com/andrewcampi/vessel_sdk). The platform URL above is the one published in that repo's description. This portfolio does not hand out Vessel API keys.
