Guide: Datasets & Datapoints

This example shows how to programmatically create, read, and delete datapoints from a dataset.

See API Reference: Datasets & Datapoints for more information.

Getting Started

Setup

  1. Install Docker.
  2. Generate an API key for OpenAI (OPENAI_API_KEY).
  3. Set the OPENAI_API_KEY environment variable.
  4. Launch TensorZero and Postgres: docker compose up

Running the Example

Python (TensorZero Client)

uv run main.py

curl (HTTP)

./main.sh