Skip to main content

Build AI Python SDK

Project description

BuildAI Python SDK

Python client for Build AI services.

Install

cd apps/buildai-sdk
uv pip install -e .

Quick Start

import buildai

client = buildai.Client(api_key="bai_...")

# Search
hits = client.search("person welding")
for h in hits.data:
    print(h.clip_id, h.score)

# Browse
factories = client.factories.list()
clip = client.clips.get("clip-uuid")
streams = client.sessions.streams("session-uuid")

datasets = client.datasets.list()

client.close()

If api_key= is omitted, the SDK first checks BUILDAI_API_KEY, then falls back to the CLI credential stored by buildai auth login-device in ~/.buildai/config.toml.

Modes

The SDK has two modes:

  • mode="public" is the default and targets the public /v1 contract
  • mode="internal" unlocks internal-only resources when your credential is allowed to use them

Important:

  • both modes use the same /v1 API prefix
  • the distinction is authorization and exposed resource set, not a separate base URL

Dataset Surface

Use client.datasets for the canonical public dataset surface. For the underlying storage model, read ../../docs/data-model.md.

Package Layout

  • buildai/client.py — Client entry point
  • buildai/resources/v1/ — Resource namespaces
  • buildai/models/v1/ — Response models
  • buildai/ids.py — Deterministic UUID helpers

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

buildai_sdk-2.2.1.tar.gz (172.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

buildai_sdk-2.2.1-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file buildai_sdk-2.2.1.tar.gz.

File metadata

  • Download URL: buildai_sdk-2.2.1.tar.gz
  • Upload date:
  • Size: 172.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for buildai_sdk-2.2.1.tar.gz
Algorithm Hash digest
SHA256 24ec636629606a3aa1abea9bf4420a54c4dfa10b7276029dfd36625ca7f28628
MD5 2ecaa5ec9b6815b1cc4921fecb8d2013
BLAKE2b-256 135e187d55d0e61e5c7dfcd124042284f10eeed7fc34ed205150e4723ab62b8c

See more details on using hashes here.

File details

Details for the file buildai_sdk-2.2.1-py3-none-any.whl.

File metadata

  • Download URL: buildai_sdk-2.2.1-py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for buildai_sdk-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 902b0aeb44158dd74207a2be26069137b881c838f5847a3f617f13d0d02d8d16
MD5 e772d2329bbefc0d0deb017b44cfe7ea
BLAKE2b-256 cc33c5b75aaf3ec175aa0aec96cc6df80bd9bc8d813738644d0cd3aeb218df43

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page