## Documentation Index

Fetch the complete documentation index at: [/llms.txt](https://developer.mindbridge.ai/llms.txt)

Use this file to discover all available pages before exploring further.

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

```shell
pip install mindbridge-api-python-client
```

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](https://developer.mindbridge.ai/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:

```python
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}")
```
