Skip to main content
Use the Bread SDK for programmatic control over the baking process. Perfect for automation, integration, and advanced use cases. Available in Python and TypeScript.

What is the Bread SDK?

The Bread SDK provides full programmatic access to the baking platform:
  • Multi-language support: Choose Python or TypeScript based on your stack
  • Full control: Access all baking features programmatically
  • Async support: Efficient async/await patterns for concurrent operations
  • Integration ready: Easy to integrate into existing workflows

Get Started


Core Concepts

Repositories

Like GitHub, these repos hold all of a model’s bake data. Create and manage repos programmatically.

Prompts

Define teacher and student prompts that encode behavior into model weights.

Stim Data

Generate synthetic user prompts that the baked model will respond to.

Rollout Jobs

Get expert responses from prompted models to create training datasets.

Targets

Combine stim generators and rollout configuration for a given prompt.

Bakes

Configure and run training jobs that update model weights.

The Baking Workflow

Create Repo → Set Prompt → Create Target → Run Stim → Run Rollout → Configure Bake → Start Bake
Each step builds on the previous one. The SDK provides methods for each phase, giving you complete control over the process.

SDK vs bgit

Use the SDK when:
  • You need programmatic control
  • Building automation or integrations
  • Working with Python or TypeScript/JavaScript applications
  • Need async/concurrent operations
Use bgit when:
  • You prefer a git-based workflow
  • Want version control built-in
  • Prefer YAML configuration
  • Need Git history for model evolution
Both tools use the same underlying platform and produce the same baked models.