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

# Client

```python theme={"system"}
class Client(
    *,
    url: str = "https://api.tilebox.com",
    token: str | None = None,
    name: str | None = None,
)
```

Create a Tilebox workflows client.

## Parameters

<ParamField path="url" type="string">
  Tilebox API Url. Defaults to `https://api.tilebox.com`.
</ParamField>

<ParamField path="token" type="string">
  The API Key to authenticate with. If not set the `TILEBOX_API_KEY` environment variable will be used.
</ParamField>

<ParamField path="name" type="string | None">
  Optional service name for workflow telemetry. If not set, the default service name is used.
</ParamField>

## Sub clients

The workflows client exposes sub clients for interacting with different parts of the Tilebox workflows API.

```python theme={"system"}
def Client.jobs() -> JobClient
```

A client for interacting with jobs.

```python theme={"system"}
def Client.clusters() -> ClusterClient
```

A client for managing clusters.

```python theme={"system"}
def Client.automations() -> AutomationClient
```

A client for scheduling automations.

## Logging

```python theme={"system"}
def Client.configure_logging(level: int, runner_level: int | None = None) -> None
```

Configure which task and runner logs this client exports. See [`Client.configure_logging`](/api-reference/python/tilebox.workflows/Client.configure_logging).

## Task runners

```python theme={"system"}
def Client.runner(...) -> TaskRunner
```

A client is also used to instantiate task runners. Check out the [`Client.runner` API reference](/api-reference/python/tilebox.workflows/Client.runner) for more information.

<RequestExample>
  ```python Python theme={"system"}
  from tilebox.workflows import Client

  # read token from an environment variable
  client = Client()

  # or provide connection details directly
  client = Client(
      url="https://api.tilebox.com",
      token="YOUR_TILEBOX_API_KEY",
      name="sentinel-2-runner",
  )

  # access sub clients
  job_client = client.jobs()
  cluster_client = client.clusters()
  automation_client = client.automations()

  # or instantiate a task runner
  runner = client.runner(tasks=[...])
  ```
</RequestExample>
