Stainless Docs Platform

Stainless Docs Platform

Stainless Docs Platform

Create dynamic docs for your API that developers love. Author REST API, SDK, and narrative docs that automatically stay in sync with your actual API. Built on Astro, so you can customize anything and deploy anywhere.

Create dynamic docs for your API that developers love. Author REST API, SDK, and narrative docs that automatically stay in sync with your actual API. Built on Astro, so you can customize anything and deploy anywhere.

Create dynamic docs for your API that developers love. Author REST API, SDK, and narrative docs that automatically stay in sync with your actual API. Built on Astro, so you can customize anything and deploy anywhere.

Docs that developers love

Great docs help developers onboard faster and choose your API over competitors. Build on strong foundations created by the team behind Markdoc and Stripe’s documentation platform.

AI-powered
hybrid search

AI-powered
hybrid search

AI-powered
hybrid search

Copy Markdown

Copy Markdown

Copy Markdown

Integration with AI tools

Integration with
AI tools

Performance optimized

Performance optimized

minimal client-side JS

minimal client-side JS

SEO/Search optimized

SEO/Search optimized

llms.txt

llms.txt

Light / Dark modes

Light / Dark modes

“We knew we wanted great docs for our new API, but we just didn't know how long that might take. With Stainless we were able to go live in just 2 days.”

Batuhan İçöz

Beeper

“We knew we wanted great docs for our new API, but we just didn't know how long that might take. With Stainless we were able to go live in just 2 days.”

Batuhan İçöz

Beeper

“We knew we wanted great docs for our new API, but we just didn't know how long that might take. With Stainless we were able to go live in just 2 days.”

Batuhan İçöz

Beeper

“We knew we wanted great docs for our new API, but we just didn't know how long that might take. With Stainless we were able to go live in just 2 days.”

Batuhan İçöz

Beeper

Generated and hand-written docs, always in sync

Generated and hand-written docs,
always in sync

Write language-specific SDK docs, REST API docs, and narrative docs all within the same codebase. If you use Stainless SDKs, your docs and code snippets are always updated to reflect the latest API changes in your OpenAPI spec.

---
title: Introduction
---

import { Callout } from "@stainless-api/docs/components";

Welcome to your <strong>Stainless Docs</strong> site!

<Callout variant="info">Hey!</Callout>

---
title: Introduction
---

import { Callout } from "@stainless-api/docs/components";

Welcome to your <strong>Stainless Docs</strong> site!

<Callout variant="info">Hey!</Callout>

Powerful and flexible authoring tools for prose

Powerful and flexible authoring tools for prose

Powerful and flexible authoring tools for prose

Author content in Markdown, MDX, or Markdoc with a rich set of built-in components. Build custom content components in React or as Astro components. Maintain your docs as code in a GitHub repo you control.

Author content in Markdown, MDX, or Markdoc with a rich set of built-in components. Build custom content components in React or as Astro components. Maintain your docs as code in a GitHub repo you control.

Author content in Markdown, MDX, or Markdoc with a rich set of built-in components. Build custom content components in React or as Astro components. Maintain your docs as code in a GitHub repo you control.

Infinitely extensible

Stainless Docs Platform sites are built with Astro, an open-source framework for high-performance, content-driven websites. You can customize anything from the smallest component to the entire UI.

import { defineConfig } from "astro/config";
import { stainlessDocs } from "@stainless-api/docs";
import { generateChangelog } from "./generateChangelog";

function generateChangelogIntegration() {
  return {
    name: "generate-changelog",
    hooks: {
      "astro:build:done": async ({ pages }) => {
        await generateChangelog(pages);
      },
    },
  };
}

export default defineConfig({
  integrations: [
    stainlessDocs({ title: "Todo Ninja" }),
    generateChangelogIntegration(),
  ],
});
import { defineConfig } from "astro/config";
import { stainlessDocs } from "@stainless-api/docs";
import { generateChangelog } from "./generateChangelog";

function generateChangelogIntegration() {
  return {
    name: "generate-changelog",
    hooks: {
      "astro:build:done": async ({ pages }) => {
        await generateChangelog(pages);
      },
    },
  };
}

export default defineConfig({
  integrations: [
    stainlessDocs({ title: "Todo Ninja" }),
    generateChangelogIntegration(),
  ],
});

Customize anything with code

Customize anything with code

Customize anything with code

Customize Stainless Docs with code at every layer: locals in the render context, server-side actions, middleware, and integration hooks for server and build. TypeScript-first. Create an Astro integration or use an existing one.

Customize Stainless Docs with code at every layer: locals in the render context, server-side actions, middleware, and integration hooks for server and build. TypeScript-first. Create an Astro integration or use an existing one.

Customize Stainless Docs with code at every layer: locals in the render context, server-side actions, middleware, and integration hooks for server and build. TypeScript-first. Create an Astro integration or use an existing one.

Easily theme to match your brand

Easily theme to match your brand

Easily theme to match your brand

Style with simple CSS variable based styling out of the box or pull in Tailwind, SASS, or LESS.

Style with simple CSS variable based styling out of the box or pull in Tailwind, SASS, or LESS.

Style with simple CSS variable based styling out of the box or pull in Tailwind, SASS, or LESS.

/* theme.css */
:root[data-theme="light"] {
  --stl-ui-swatch-accent-base:  #11cc8d; 
  --stl-ui-swatch-accent-muted: #beffe9;
  --stl-ui-swatch-accent-faint: #effff9;
}

:root[data-theme="dark"] {
  --stl-ui-swatch-accent-base:  #1eb281;
  --stl-ui-swatch-accent-muted: #136247;
  --stl-ui-swatch-accent-faint: #0b281e;
}
/* theme.css */
:root[data-theme="light"] {
  --stl-ui-swatch-accent-base:  #11cc8d; 
  --stl-ui-swatch-accent-muted: #beffe9;
  --stl-ui-swatch-accent-faint: #effff9;
}

:root[data-theme="dark"] {
  --stl-ui-swatch-accent-base:  #1eb281;
  --stl-ui-swatch-accent-muted: #136247;
  --stl-ui-swatch-accent-faint: #0b281e;
}
/* theme.css */
:root[data-theme="light"] {
  --stl-ui-swatch-accent-base:  #11cc8d; 
  --stl-ui-swatch-accent-muted: #beffe9;
  --stl-ui-swatch-accent-faint: #effff9;
}

:root[data-theme="dark"] {
  --stl-ui-swatch-accent-base:  #1eb281;
  --stl-ui-swatch-accent-muted: #136247;
  --stl-ui-swatch-accent-faint: #0b281e;
}
<script>
  // App.svelte
  let numbers = $state([1, 2, 3, 4]);

  function addNumber() {
    numbers.push(numbers.length + 1);
  }
</script>

<p>{numbers.join(' + ')} = ...</p>

<button onclick="{addNumber}">
  Add a number
</button>
<script>
  // App.svelte
  let numbers = $state([1, 2, 3, 4]);

  function addNumber() {
    numbers.push(numbers.length + 1);
  }
</script>

<p>{numbers.join(' + ')} = ...</p>

<button onclick="{addNumber}">
  Add a number
</button>
<script>
  // App.svelte
  let numbers = $state([1, 2, 3, 4]);

  function addNumber() {
    numbers.push(numbers.length + 1);
  }
</script>

<p>{numbers.join(' + ')} = ...</p>

<button onclick="{addNumber}">
  Add a number
</button>

Bring your favorite front end framework

Bring your favorite front end framework

Bring your favorite front end framework

React

Svelte

Vue

Solid

Preact

more…

Built on Astro

The Stainless Docs platform is built on Astro, a flexible framework designed for building blazing fast contentful sites.

Astro sites take full advantage of web standards, are UI framework agnostic, and support both SSG and SSR out of the box. Astro is backed by leading developer-first companies including Cloudflare, Netlify, and now Stainless.

Deploy anywhere

Every Stainless docs site is a repo that you fully own and control. Host your docs site with Stainless, or on your own infrastructure.

Stainless hosted

Stainless hosted

Rock solid static site hosting, backed by Cloudflare’s global network

Free custom domains

Global edge caching

Sub-100ms TTFB

Automatic SSL

Self hosted

Deploy as a static site or add server side rendering (SSR) with prebuilt adapters for major hosting providers

Paved paths for popular managed hosts like Vercel, Fly.io, and Cloudflare

Fine-tune caching headers, redirects, compression, and edge configurations

We’re opening early access to the Stainless Docs Platform

We’re opening early access to the Stainless Docs Platform

We’re opening early access to the Stainless Docs Platform

Our team reviews every application carefully and we'll be onboarding customers over the next few weeks—apply now to be among the first.

Our team reviews every application carefully and we'll be onboarding customers over the next few weeks—apply now to be among the first.

Our team reviews every application carefully and we'll be onboarding customers over the next few weeks—apply now to be among the first.