> ## Documentation Index
> Fetch the complete documentation index at: https://docs.akumi.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Python SDK

> Install and use the official Python client for the inference API.

The official Python client for the inference API, installed with pip and generated from the OpenAPI spec.

For authentication, resources, errors and the other shared concepts, see [all SDKs](/sdks).

## Install

Python, via pip (Python 3.9+):

```bash theme={null}
pip install akumi
```

## Quickstart

```python theme={null}
import os
from akumi import Akumi

client = Akumi.from_api_key(os.environ["AKUMI_API_KEY"])

response = client.chat.create(params={
    "model": "mistral/mistral-small-2603",
    "messages": [{"role": "user", "content": "Summarize this contract."}],
})
```

Python also ships an asynchronous client, `AsyncAkumi`, with the same methods behind `await`.

## Streaming

Call `client.chat.create_streamed(params={...})` for a streamed variant of the chat call that yields chunks as they arrive; `AsyncAkumi` exposes the same as an async iterator. Pass `"stream": true` in the request alongside it.

## Source

The Python SDK lives in its own repository and is generated, not hand-written. When the API changes, it is regenerated from the spec.

* Python: [https://github.com/akumi-cloud/python-sdk](https://github.com/akumi-cloud/python-sdk)
