Skip to content
  • Auto
  • Light
  • Dark
FeedbackDashboard
Getting started
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

Stainless Docs Platform overview

The Stainless Docs Platform generates comprehensive documentation for your API and your Stainless SDKs while giving you deep control over your content, layout, and deployment with a developer-centric docs-as-code workflow. By default, Stainless will host your docs on robust infrastructure powered by Cloudflare, or you can host your docs site on any static hosting provider.

The Stainless Docs Platform generates your API and SDK reference pages using the same technology Stainless uses to generate your SDKs. We ingest your OpenAPI specification and Stainless configuration, generate language-specific SDK metadata, and render that metadata as interactive content.

  • Language-specific output: We create dedicated documentation for every programming language you have a Stainless SDK for. Users can toggle between languages to see method signatures, parameters, and return objects, with language-specific type definitions. This goes beyond generic REST API documentation to provide a true SDK-native experience.
  • Comprehensive coverage: Everything is documented, from high-level resources to the specific types and properties in your SDKs. Your documentation also includes a full HTTP reference with curl snippets for users who interact with your API directly.
  • Accurate and consistent: The Stainless Docs Platform is powered by the same engine as our SDK generator, so you can be confident that types and method signatures are always correct and remain up-to-date as your API evolves.
  • Extremely customizable: Every Stainless Docs Platform site is an Astro site you fully own and control. You can hit the ground running with the great defaults you get out of the box, or change everything including colors, images, fonts, page structure, and more using your own assets and components. You can easily add an llms.txt file, change the sidebar, add view transitions… the sky’s the limit.
  • Fast and reliable: When you host your docs with Stainless, you can rest assured that your content will always be available thanks to our rock-solid and speedy infrastructure powered by Cloudflare.

For tutorials, conceptual guides, and architectural overviews, you can author content using familiar, Markdown-based formats like MDX and Markdoc. Create rich, interactive pages using a standard library of components (including tabs, cards, and asides) or create your own custom components as needed.

Every site built with the Stainless Docs Platform is a complete, standalone Astro project that you own and control.

  • High performance: By default, Astro generates static HTML and CSS with minimal client-side JavaScript. This ensures your documentation is fast and reliable for users everywhere. Opt-in “islands” of interactivity allow you to use frameworks like React, Vue, or Svelte where needed.
  • Great defaults: Our default theme is clean, responsive, and highly-customizable. You get a great-looking site immediately without touching any Astro code.
  • Full control and extensibility: Want to go further? You’ll have direct access to the generated Git repository for your documentation site, so you can customize your theme, add new pages, modify layouts, and take advantage of Astro’s extensive third-party integration ecosystem.

We believe documentation should be treated with the same care as production code. The Stainless Docs Platform is built around a Git-based workflow that developers will find familiar and efficient.

  • Git as the source of truth: Publish changes by pushing commits to your documentation repository. By default, Stainless automatically builds and deploys your site on every push, but you can also choose your own deployment environment or run your own Astro builds as part of your continuous integration workflow and host the content yourself.
  • Local development: Clone the repository and run the site locally for a high-fidelity preview environment with hot-reloading. You can use your preferred code editor and toolchain.
  • Instant API doc previews: The local development server watches your OpenAPI specification and Stainless configuration. As you make changes, your API reference documentation regenerates on the fly, allowing you to see your edits in real-time.

Search and AI answers that understand SDKs

Section titled “Search and AI answers that understand SDKs”

Effective search is critical for API documentation. The search functionality provided by the Stainless Docs Platform is built from the ground up to understand the structure of your SDKs.

  • Metadata-driven indexing: Instead of scraping the HTML content of rendered pages, we build a search index directly from your SDK’s structural metadata. This provides more relevant and precise results.
  • Faceted search: Users can filter search results by programming language, and narrow down by resources, methods, types, or properties. Results are displayed in a rich format that highlights key SDK metadata, not just text snippets.
  • Conversational AI: An integrated AI-powered search allows users to ask questions in natural language. Using a Retrieval-Augmented Generation (RAG) pipeline, we automatically bring relevant SDK metadata into the LLM’s context to provide accurate, SDK-aware answers.
  • LLM-friendly Markdown: The Stainless Docs Platform generates an LLM-friendly Markdown representation for every single page on your documentation site. Add a .md extension to the end of any URL to get the corresponding Markdown content.