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

# Authentication

> To access the Tilebox API, you must authenticate your requests. This guide explains how authentication works, focusing on API keys used as bearer tokens.

## Creating an API key

To create an API key, log into the [Tilebox Console](https://console.tilebox.com). Navigate to [Settings -> API Keys](https://console.tilebox.com/settings/api-keys) and click the "Create API Key" button.

<Info>
  Keep your API keys secure. Deactivate any keys if you suspect they have been compromised.
</Info>

## Bearer token authentication

The Tilebox API uses bearer tokens for authentication. You need to pass your API key as the `token` parameter when creating an instance of the client.

<CodeGroup>
  ```python Python theme={"system"}
  from tilebox.datasets import Client as DatasetsClient
  from tilebox.workflows import Client as WorkflowsClient

  datasets_client = DatasetsClient(token="YOUR_TILEBOX_API_KEY")
  workflows_client = WorkflowsClient(token="YOUR_TILEBOX_API_KEY")
  ```

  ```go Go theme={"system"}
  import (
  	"github.com/tilebox/tilebox-go/datasets/v1"
  	"github.com/tilebox/tilebox-go/workflows/v1"
  )

  datasetsClient := datasets.NewClient(datasets.WithAPIKey("YOUR_TILEBOX_API_KEY"))
  workflowsClient := workflows.NewClient(workflows.WithAPIKey("YOUR_TILEBOX_API_KEY"))
  ```
</CodeGroup>

<Tip>
  If you set your API key as an environment variable named `TILEBOX_API_KEY`, you can skip the token parameter when creating a client.
</Tip>
