---
title: "Client"
description: "Create a Tilebox datasets 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,
    warn_if_unauthenticated: bool = True,
    transport: Literal["grpc", "http1"] = "grpc",
)
```

Create a Tilebox datasets 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.

**warn_if_unauthenticated**

type: bool

Whether to log a warning when no API key is provided for the Tilebox API URL. Defaults to `True`.

**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.

If no API key is provided, the client uses anonymous open data access for public datasets.

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

```python
from tilebox.datasets 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",
)
```

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