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_TOKEN (or BUILDAI_API_KEY), then falls back to the CLI credential stored by buildai login in ~/.buildai/credentials.json.

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.3.0.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.3.0-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: buildai_sdk-2.3.0.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.3.0.tar.gz
Algorithm Hash digest
SHA256 3af6bc05bbef089945564e60fcb60b7c1e7f7105d893355e27d30a5f77f143e5
MD5 18f88ac5963b4e5a8550d344677558ba
BLAKE2b-256 93cb574a3f51ccdd7715eed1267d0798ce1bebd85333d29d243b929363996868

See more details on using hashes here.

File details

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

File metadata

  • Download URL: buildai_sdk-2.3.0-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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bed9f5900e4581fc7d9b087f1f7316784ef5c3871a7cf4cb06d4182f36bd35d
MD5 93b09fbf586d88910e2f500d331394a1
BLAKE2b-256 523f16c810c6523311a21063d9e2b5305e84d5eed8ea164589172b3cf49248eb

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