---
title: "Client"
description: "Create a Tilebox workflows client."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

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

# Client

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

import ParamField from "@docs/components/ParamField.astro";

```python
class Client(
    *,
    url: str = "https://api.tilebox.com",
    token: str | None = None,
    name: str | None = None,
    client_id: UUID | None = None,
    transport: Literal["grpc", "http1"] = "grpc",
)
```

Create a Tilebox workflows client.

## Parameters

**url**

type: str

Tilebox API Url. Defaults to `https://api.tilebox.com`.

**token**

type: str | None

The API key to authenticate with. If not set, the `TILEBOX_API_KEY` environment variable is used.

**name**

type: str | None

Optional service name for workflow telemetry. If not set, the default service name is used.

**client_id**

type: UUID | None

Optional stable ID used to scope internal loggers. If not set, a random ID is generated.

**transport**

type: Literal["grpc", "http1"]

Network transport to use for API requests. Defaults to `"grpc"`. Use `"http1"` to force the Connect protocol over HTTP/1.1 on networks that do not support gRPC over HTTP/2 correctly.

## Sub clients

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

```python
def Client.jobs() -> JobClient
```

A client for interacting with jobs.

```python
def Client.clusters() -> ClusterClient
```

A client for managing clusters.

```python
def Client.workflows() -> WorkflowClient
```

A client for managing workflows and workflow release deployments.

```python
def Client.automations() -> AutomationClient
```

A client for scheduling automations.

## Runners

```python
def Client.runner(...) -> TaskRunner
```

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

<h2 id="request-example">Usage example</h2>

```python
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()
workflow_client = client.workflows()
automation_client = client.automations()

# or instantiate a runner
runner = client.runner(tasks=[...])
```

Source: https://tilebox.com/docs/api-reference/python/tilebox.workflows/Client/index.mdx
