Substrate is a powerful SDK for building with AI models, with batteries included (opens in a new tab): language models, image generation, built-in vector storage, sandboxed code execution, and more.

Substrate is also an inference engine optimized for running compound AI workloads. Wiring together multiple inference APIs is inherently slow – whether you do it yourself, or use a framework like LangChain. Substrate lets you ditch the framework, write less code, and run compound AI fast. Learn more: Why Substrate?

Mini examples

Substrate is the simplest way to write multi-step AI programs. Each example below is hosted in a runnable code environment, so you can get a feel for Substrate without opening your editor.

Take a JSON object and transform it into the target schema. ComputeJSON produces 100% guaranteed JSON output. (Unreliable JSON generation is a common pain point with other providers.)

You can run this code (hit "Preview") or view on (opens in a new tab)