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

# StashClient

> The main client interface for interacting with Stash's GraphQL API.

The main client interface for interacting with Stash's GraphQL API.

## StashClient

```python theme={null}
StashClient(
    conn: dict[str, Any] | None = None,
    verify_ssl: bool = True,
)
```

Bases: `StashClientBase`, `ConfigClientMixin`, `FileClientMixin`, `FilterClientMixin`, `GalleryClientMixin`, `GroupClientMixin`, `ImageClientMixin`, `JobsClientMixin`, `MarkerClientMixin`, `MetadataClientMixin`, `PackageClientMixin`, `PerformerClientMixin`, `PluginClientMixin`, `SceneClientMixin`, `ScraperClientMixin`, `StudioClientMixin`, `SubscriptionClientMixin`, `SystemQueryClientMixin`, `TagClientMixin`, `VersionClientMixin`, `NotImplementedClientMixin`

Full Stash client combining all functionality.

Initialize client.

Parameters:

| Name         | Type                     | Description                                                                                                                                                                                                        | Default |
| ------------ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
| `conn`       | `dict[str, Any] \| None` | Connection details dictionary with: - Scheme: Protocol (default: "http") - Host: Hostname (default: "localhost") - Port: Port number (default: 9999) - ApiKey: Optional API key - Logger: Optional logger instance | `None`  |
| `verify_ssl` | `bool`                   | Whether to verify SSL certificates                                                                                                                                                                                 | `True`  |

### Attributes

#### capabilities

```python theme={null}
capabilities: ServerCapabilities | None
```

The detected server capabilities, or `None` before `initialize()`.

Exposed so callers can introspect the connected server's appSchema-driven feature set — e.g., to gate optional features that only newer Stash versions support, or to drive client-side decisions that mirror the fragment store's capability injection logic.

#### log

```python theme={null}
log = (
    get("Logger", client_logger) if conn else client_logger
)
```

#### url

```python theme={null}
url = f'{scheme}://{host}:{port}/graphql'
```

### Functions

#### initialize

```python theme={null}
initialize() -> None
```

Initialize the client and detect server capabilities.

Calls base class initialize() to set up transport/session, then runs capability detection and rebuilds the fragment store with version-appropriate fields.
