Source: http://www.poma-ai.com/docs/sdk/reference/poma

# Poma Client API Reference

> `Poma` is deprecated and will be removed in a future version. Use `PrimeCut` for new work.

```python
from poma import Poma
```

`Poma` remains available for compatibility with older integrations.

## Constructor

```python
Poma(
    api_key: str | None = None,
    *,
    timeout: float = 600.0,
    client: httpx.Client | None = None,
)
```

## Legacy methods

### `start_chunk_file`

```python
start_chunk_file(
    file_path,
    *,
    base_url: str | None = None,
) -> dict[str, Any]
```

Submit a file and return a dictionary that includes the job ID.

### `get_chunk_result`

```python
get_chunk_result(
    job_id: str,
    *,
    initial_delay: float = 5.0,
    poll_interval: float = 3.0,
    max_interval: float = 15.0,
    show_progress: bool = False,
    download_dir: str | os.PathLike[str] | None = None,
    filename: str | None = None,
) -> dict[str, Any]
```

Poll until completion and return unpacked dictionary data.

Unlike `PrimeCut.collect(...)`, this legacy helper uses polling only.

### `unpack_poma_archive`

```python
unpack_poma_archive(
    poma_archive_data: bytes | None = None,
    poma_archive_path: str | os.PathLike[str] | None = None,
) -> dict[str, Any]
```

Unpack archive data without using `PomaArchive`.

`extract_chunks_and_chunksets_from_poma_archive` is a backwards-compatible alias.

### `create_cheatsheet`

Returns a single cheatsheet string.

### `create_cheatsheets`

Returns one cheatsheet per document.

### `download_file`

```python
download_file(
    download_url: str,
    filename: str | None = None,
    *,
    save_directory: str | os.PathLike[str] | None = None,
) -> str
```

Download a file from a POMA download URL and return the saved path.

### `download_bytes`

```python
download_bytes(download_url: str) -> bytes
```

Download raw bytes from a POMA download URL.

### `close`

Close the underlying `httpx.Client`.

`Poma` also supports context-manager usage:

```python
with Poma() as client:
    job = client.start_chunk_file("example.pdf")
```

For the recommended migration path, see [Migrate from Poma to PrimeCut](/sdk/migration/poma-to-primecut).