Skip to content
FeedbackDashboard
Your OpenAPI spec

Use multiple OpenAPI specs with Stainless

How to generate a single set of SDKs from multiple specs, or generate different sets of SDKs from different specs.

You have two options when dealing with multiple OpenAPI files:

Option 1: Combine your specs into a single file

Section titled “Option 1: Combine your specs into a single file”

We recommend using the redocly CLI to combine OpenAPI files. This works well when:

  • Customers commonly use multiple APIs together in a single integration
  • The APIs share authentication and configuration
  • You want a simpler developer experience with one unified SDK

Redocly wrote this comprehensive blog article with clear examples. If you’re using Stainless GitHub Action to upload your spec file, just add an extra step beforehand to run the redocly CLI and combine your files in a single spec file.

Option 2: Generate separate SDKs from each OpenAPI file

Section titled “Option 2: Generate separate SDKs from each OpenAPI file”

Create multiple Stainless projects, one for each OpenAPI spec. This approach makes sense when:

  • Your APIs serve entirely different customer bases
  • Developers typically only integrate with one API at a time
  • The APIs have very different authentication or versioning schemes