Install SDK
The data-api-client SDK provides typed bindings for the data cluster API. It is available for both Python and TypeScript, and is hosted on a private GitLab package registry.
Python
Prerequisites
- Python 3.11+
- uv (recommended) or pip
Registry Configuration
The Python SDK is published to a private GitLab PyPI registry. You need a GitLab personal access token with read_api scope.
Add the following to your pyproject.toml:
[project]
dependencies = [
"data-api-client>=1.1.5-dev",
]
[tool.uv]
index-strategy = "unsafe-best-match"
[[tool.uv.index]]
name = "gitlab-data-cluster"
url = "https://gitlab.com/api/v4/projects/75857874/packages/pypi/simple"
[tool.uv.sources]
data-api-client = { index = "gitlab-data-cluster" }
Authentication
Set your GitLab credentials as environment variables before installing:
export UV_INDEX_GITLAB_DATA_CLUSTER_USERNAME=<your-gitlab-username>
export UV_INDEX_GITLAB_DATA_CLUSTER_PASSWORD=<your-gitlab-token>
Install
uv sync
Verify
from data_api_client import ApiClient, Configuration
print("SDK installed successfully")
TypeScript
Prerequisites
- Node.js 20+
- npm or yarn
Registry Configuration
The TypeScript SDK is published to a private GitLab npm registry under the @alien scope.
Create a .npmrc file in your project root:
@alien:registry=https://gitlab.com/api/v4/projects/75857874/packages/npm/
Add the dependency to your package.json:
{
"dependencies": {
"@alien/data-api-client": "^1.1.4-dev"
}
}
Authentication
Authenticate with the GitLab npm registry:
npm login --registry https://gitlab.com/api/v4/packages/npm/
You will be prompted for your GitLab username, personal access token (as password), and email.
Install
npm install
Verify
import { Configuration, EntriesApi } from "@alien/data-api-client";
console.log("SDK installed successfully");
SDK Usage
Once installed, configure the client to connect through the platform proxy:
Python
from data_api_client import ApiClient, Configuration
config = Configuration(
host="https://api.alien.club/clusters/YOUR_CLUSTER_ID/proxy"
)
client = ApiClient(
config,
header_name="Authorization",
header_value="Bearer oat_YOUR_API_TOKEN",
)
TypeScript
import { Configuration } from "@alien/data-api-client";
const config = new Configuration({
basePath: "https://api.alien.club/clusters/YOUR_CLUSTER_ID/proxy",
headers: {
Authorization: "Bearer oat_YOUR_API_TOKEN",
},
});
Replace YOUR_CLUSTER_ID with your cluster ID (found at app.alien.club/clusters) and YOUR_API_TOKEN with an API key generated from the Keys section.
What's Next
Now that the SDK is installed, follow the quickstart for your language:
- Python SDK Quickstart — Full Python examples: datasets, entries, search, and error handling
- TypeScript SDK Quickstart — Full TypeScript examples: datasets, entries, search, and error handling
Or jump to a specific task:
- Upload Documents — Upload and process documents programmatically
- Configure a Pipeline — Set up processing pipelines via the API
- Search and Query — Search your documents via the API