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

# AsyncPrimeCut API Reference

```python
from poma import AsyncPrimeCut
```

`AsyncPrimeCut` is the asynchronous companion to `PrimeCut`.

## Constructor

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

If `api_key` is omitted, the client reads `POMA_API_KEY`.

## Methods

### `submit`

```python
await submit(
    file_path,
    *,
    base_url: str | None = None,
) -> str
```

Submit a document and return the job ID.

### `collect`

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

Collect a submitted job and return typed `PomaResult`.

Like the sync client, `collect(...)` tries SSE first and falls back to adaptive polling if needed.

### `ingest`

```python
await ingest(
    file_path,
    *,
    base_url: str | None = None,
    show_progress: bool = False,
    download_dir: str | os.PathLike[str] | None = None,
    filename: str | None = None,
    initial_delay: float = 5.0,
    poll_interval: float = 3.0,
    max_interval: float = 15.0,
) -> PomaResult
```

Submit, collect, download, and unpack in one call.

### `aclose`

Close the underlying `httpx.AsyncClient`.

`AsyncPrimeCut` also supports async context-manager usage:

```python
from poma import AsyncPrimeCut

async with AsyncPrimeCut() as client:
    result = await client.ingest("example.pdf")
```