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

# Configuration (WherobotsConfig)

> API key, region, endpoint, and timeout settings, read from arguments or environment variables.

```python theme={"system"}
from wherobots import WherobotsConfig
```

## WherobotsConfig

```python theme={"system"}
WherobotsConfig(
    api_key: str | None = None,
    region: str | None = None,
    s3_bucket: str | None = None,
    s3_prefix: str = 'wherobots-jobs',
    base_url: str = 'https://api.cloud.wherobots.com',
    version: str = 'latest',
    request_timeout_seconds: int = 30,
    client_chain: str | None = None,
    id_token_path: str | None = None,
)
```

Immutable configuration for the Wherobots Jobs client.

#### Parameters

**api\_key** `str | None` (default: None)

Wherobots API key.

**region** `str | None` (default: None)

Default deployment region (e.g. `"aws-us-west-2"`).

**s3\_bucket** `str | None` (default: None)

S3 bucket for script uploads.

**s3\_prefix** `str` (default: 'wherobots-jobs')

Key prefix within the bucket.

**base\_url** `str` (default: '[https://api.cloud.wherobots.com](https://api.cloud.wherobots.com)')

Wherobots API base URL (must use HTTPS).

**version** `str` (default: 'latest')

API version string.

**request\_timeout\_seconds** `int` (default: 30)

HTTP request timeout in seconds.

**client\_chain** `str | None` (default: None)

Upstream `X-Wherobots-Client` chain for callers that
embed this SDK (e.g. the Airflow provider). The SDK appends its
own hop to the right of it, so the origin client stays leftmost.
Advisory only — it never affects authentication.

**id\_token\_path** `str | None` (default: None)

Workload-identity token mounted in Wherobots notebook
and job pods. Used for auth only when no `api_key` is set
(ADR-0003).

### from\_env()

```python theme={"system"}
WherobotsConfig.from_env(
    api_key: str | None = None,
    region: str | None = None,
    s3_bucket: str | None = None,
    s3_prefix: str | None = None,
    base_url: str | None = None,
    version: str | None = None,
    request_timeout_seconds: int | None = None,
    client_chain: str | None = None,
    id_token_path: str | None = None,
) -> WherobotsConfig
```

Build configuration from environment variables with optional overrides.

Explicit parameters take priority over environment variables.
Empty-string env vars are treated as unset.

#### Parameters

**api\_key** `str | None` (default: None)

Override for `WHEROBOTS_API_KEY`.

**region** `str | None` (default: None)

Override for `WHEROBOTS_REGION`.

**s3\_bucket** `str | None` (default: None)

Override for `WHEROBOTS_S3_BUCKET`.

**s3\_prefix** `str | None` (default: None)

Override for `WHEROBOTS_S3_PREFIX`.

**base\_url** `str | None` (default: None)

Override for `WHEROBOTS_API_BASE_URL`.

**version** `str | None` (default: None)

Override for `WHEROBOTS_VERSION`.

**request\_timeout\_seconds** `int | None` (default: None)

Override for
`WHEROBOTS_REQUEST_TIMEOUT_SECONDS`.

**client\_chain** `str | None` (default: None)

Override for `WHEROBOTS_CLIENT_CHAIN` — the
upstream `X-Wherobots-Client` chain this SDK appends its
own hop to.

**id\_token\_path** `str | None` (default: None)

Override for `WHEROBOTS_ID_TOKEN_PATH`, which
Wherobots notebook and job pods set.

#### Returns

**return** `WherobotsConfig`

A validated `WherobotsConfig` instance.

#### Raises

* `WherobotsConfigError`: If the timeout env var is not a valid
  integer, or if validation in `__post_init__` fails.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.