From 8c1f69e2979aa635209ca51d1f61894ebd8f8f4e Mon Sep 17 00:00:00 2001 From: Nandaja Date: Fri, 28 Nov 2025 16:12:30 +0000 Subject: [PATCH] [docs] Clarify using GITPOD_BASE_URL env var for custom domains Co-authored-by: Ona --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index f4421881..944a3cf4 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,26 @@ we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/) to add `GITPOD_API_KEY="My Bearer Token"` to your `.env` file so that your Bearer Token is not stored in source control. +## Custom Domains + +By default, the SDK connects to `https://app.gitpod.io/api`. To connect to a custom Gitpod domain, set the `GITPOD_BASE_URL` environment variable: + +```sh +export GITPOD_BASE_URL="https://custom.domain.com/api" +``` + +Or provide it directly when creating the client: + +```python +from gitpod import Gitpod + +client = Gitpod( + base_url="https://custom.domain.com/api", +) +``` + +The SDK will automatically use the custom domain for all API requests. + ## Async usage Simply import `AsyncGitpod` instead of `Gitpod` and use `await` with each API call: