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

# Get Started

MindBridge API Python Client can be installed with `pip`:

<CodeGroup dropdown>
  ```bash theme={null}
  pip install mindbridge-api-python-client
  ```
</CodeGroup>

It is recommended to install and run MindBridge API Python Client from a virtual environment, for example, using the Python standard library's `venv` or using `uv`.

# Usage

Before you begin, create an API token within your tenant by following [Create an API token](/api-explorer/create-api-token).

There are several methods to securely store your API token and use it with your Python process. For this short example, it’s assumed that the following have been set as environment variables:

* `MINDBRIDGE_API_URL`: Your MindBridge tenant URL, like *\[subdomain]*.mindbridge.ai
* `MINDBRIDGE_API_TOKEN`: Your API token

This example script connects to your MindBridge tenant and calls the /v1/users/current endpoint to retrieve information about the authenticated user:

<CodeGroup dropdown>
  ```python theme={null}
  import os
  import mindbridgeapi as mbapi

  url = os.environ.get("MINDBRIDGE_URL", "")
  token = os.environ.get("MINDBRIDGE_API_TOKEN", "")

  server = mbapi.Server(url=url, token=token)

  user = server.users.get_current()
  print(f"Name: {user.first_name} {user.last_name}")
  print(f"Role: {user.role}")
  print(f"ID:   {user.id}")
  ```
</CodeGroup>
