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

# Python

> The Python client for the Octavia AI CMS API — what it covers and how to call it.

A Python 3.9+ client for the Octavia AI CMS API. Every response is a generated dataclass, so fields are attributes rather than string keys, and the package ships a `py.typed` marker so type hints reach your editor.

<Info>Every method on this page is listed with its parameters and types on the [methods page](/api-reference/ai-cms/sdks/python/methods).</Info>

## What the SDK gives you

* **One method per operation.** Every endpoint in the [API reference](/api-reference/ai-cms/introduction) has a
  method, and each method's name, arguments and return shape come from the spec.
* **A typed response.** Every response is a generated dataclass, so fields are attributes rather than string keys, and the package ships a `py.typed` marker so type hints reach your editor.
* **A result object, not an exception.** By default a failed call comes back as a value with `ok` false, so batch
  work does not need a `try`/`catch` around every request. No third-party dependencies — it uses `urllib` from the standard library, so there is nothing to compile.

## How it is organized

The client groups methods by resource, so a call reads the same way as the route it calls:

```python theme={null}
cms.article.getById("6810f2c3a1b2c3d4e5f60718")
cms.category.getAll(query={"page": 1, "limit": 10})
cms.ai.summarize({"text": "..."})
```

`cms` is the client you initialized, and each segment after it is a resource followed by a method. The
full list of resources and every method under them is on the [methods page](/api-reference/ai-cms/sdks/python/methods).

## Authentication

The API key is the only credential. It is sent as the `x-api-key` header on every request, and it is the only
header the SDK sets — there is no header parameter and no hook for adding one. The gateway handles tenant routing
and service status itself.

```bash theme={null}
export OCTAVIA_API_KEY="0x-OCT..."
```

Never commit a key. Read it from the environment, and keep it on the server: a key in browser or mobile code is a
key anyone can extract.

## Where to go next

* [Install and use](/api-reference/ai-cms/sdks/python/install) — initialize the client and make your first call.
* [Methods](/api-reference/ai-cms/sdks/python/methods) — every method, with its parameters and types.
* [Errors and rate limits](/api-reference/ai-cms/rate-limits-and-errors) — what each status code means and how to
  back off.
