Introduction
What is Substrate?

Substrate is an AI inference platform. In particular, it excels at enabling complex multi-model workloads. At its core, Substrate is 1) a collection of cutting-edge AI models (opens in a new tab) – tuned for optimum performance, and 2) a set of composable APIs for relating these models to each other. We believe having both of these components in one platform is key to enabling fast, intuitive development of efficient, production-ready AI applications.

The primary interface for Substrate is an intuitive multi-language SDK for building graphs. You can run a single node, chain multiple nodes, or build arbitrarily complex branching workflows.

TypeScript
Python

const scene = new GenerateText({
prompt: "a short detailed descriptions of a mythical forest creature: ",
});
const styles = ["woodblock printed", "art nouveau poster"];
const images = styles.map((style) => {
return new GenerateImage({
prompt: scene.future.text.concat(` render in a ((${style})) style`),
store: "hosted",
});
});
const result = await substrate.run(scene, ...images);

You can program with nodes in a natural imperative manner (with excellent type hints). Under the hood, Substrate keeps track of a dependency graph for node relationships in your code. When you call substrate.run(), your graph is automatically executed in a way that maximizes parallelism and minimizes latency and data round-trips.

You can run image, audio, embeddings, and LLM models using nodes (opens in a new tab); you can even save embeddings and query vector stores using nodes. Nodes are all you need.