Stainless config schema
The Stainless Config (stainless.yml) defines how Stainless generates assets from your OpenAPI specification. It lives in your repo and is version-controlled like any other code. The Stainless config is separate from your spec because it and captures specific settings, structure, and information that do not belong in the API definition itself.
The config controls things such as:
- How endpoints are named and how methods are grouped or nested (e.g.,
chat.completions.create()) - Which SDKs to generate and how they are published (npm, PyPI, Maven, etc.)
- The core hierarchy of the generated client
- Customization beyond your OpenAPI spec, like naming, organization, and behavior changes
Use the content below for detailed understanding of the Stainless configuration file, its supported keys, their types, and their values.
Example OpenAPI spec
# We support 3.X formats. Read about the difference between 3.0 and 3.1# at https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0openapi: 3.1.0
# Information in this section is used in the initial guess of the Stainless config, but not read afterwards.# For example, contact.email is used in the initial guess of the Stainless config for determining# `organization.contact`, which is linked to in each of the SDKs' README.md.info: title: Acme Developer API description: > The Acme Developer API is designed to provide a predictable programmatic interface for accessing your Acme account through an API and transaction webhooks. version: 1.0.0 termsOfService: "https://acme.com/legal#terms" contact: email: support@acme.com
# The servers here is used in the initial guess of the Stainless config for determining `environments` which# allows users to change between various base URLs easily.servers: - url: https://api.acme.com/v1 description: Acme production API server - url: https://sandbox.acme.com/v1 description: Sandbox environment that provides key functionality mirroring production
# Tags are not used by Stainless, but are recommended for other OpenAPI tools and book-keeping.tags: - name: Account - name: Friends - name: Status
# Paths define the endpoints and methods, their request/response types, and more.paths: /accounts: get: tags: - Account summary: List account description: List account parameters: - $ref: "#/components/parameters/Cursor" - $ref: "#/components/parameters/Limit" responses: "200": description: OK content: application/json: schema: allOf: - $ref: "#/components/schemas/PaginationResponse" - type: object properties: data: type: array items: $ref: "#/components/schemas/Account" post: tags: - Account summary: Create account description: Create account requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/Account" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Account" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/TooManyRequests"
/accounts/{account_id}: get: tags: - Account summary: Get account description: Get account parameters: - $ref: "#/components/parameters/AccountID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountConfiguration" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/TooManyRequests" put: tags: - Account summary: Update account description: | Update account configuration. parameters: - $ref: "#/components/parameters/AccountID" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/Account" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/Account" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/TooManyRequests" /accounts/{account_id}/link: post: tags: - Account summary: Link account to external account description: Link account to external account, such as a Google or Facebook Account parameters: - $ref: "#/components/parameters/AccountID" - $ref: "#/components/parameters/IdempotencyKey" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AccountLink" examples: GoogleAccount: account_type: "google" google_account_id: "123456789" FacebookAccount: account_type: "facebook" google_account_id: "123456789" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/AccountLink" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/TooManyRequests" /accounts/{account_id}/friends: get: tags: - Friends summary: Get friends for this an account parameters: - $ref: "#/components/parameters/AccountID" - $ref: "#/components/parameters/Cursor" - $ref: "#/components/parameters/Limit" responses: "200": description: OK content: application/json: schema: allOf: - $ref: "#/components/schemas/PaginationResponse" - type: object properties: data: type: array items: $ref: "#/components/schemas/FriendResponse"
"400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/TooManyRequests" /accounts/{account_id}/friends/{friend_id}: put: tags: - Friends summary: Add a friend to this account parameters: - $ref: "#/components/parameters/AccountID" - $ref: "#/components/parameters/FriendID" requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateFriendRequest" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/FriendResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/TooManyRequests" delete: tags: - Friends summary: Remove a friend from this account parameters: - $ref: "#/components/parameters/AccountID" - $ref: "#/components/parameters/FriendID" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/FriendResponse" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" "422": $ref: "#/components/responses/UnprocessableEntity" "429": $ref: "#/components/responses/TooManyRequests"
/status: get: tags: - Status summary: API status check operationId: getStatus security: [] # disable security responses: "200": description: Endpoint for users to check whether they can reach the api. content: application/json: schema: type: object properties: message: type: string
components: parameters: IdempotencyKey: in: header name: Idempotency-Key description: A idempotency key to make retrying operations safe. schema: type: string examples: IdempotencyKeyExample: value: my-random-key-848x8e8r1 summary: A sample idempotency key Cursor: in: query name: cursor nullable: true description: The cursor for pagination, which can be populated by the `next_cursor` value of the initial request. schema: type: string Limit: in: query name: limit nullable: true description: The number of elements to fetch in the page. Defaults to 20 if not provided. schema: type: integer AccountID: in: path name: account_id required: true description: Globally unique identifier for account. schema: type: string format: uuid examples: AccountIDExample: value: d86a0a4d-7459-471a-83b4-431136320828 summary: A sample account id FriendID: in: path name: friend_id required: true description: Globally unique identifier for friend. schema: type: string format: uuid examples: FriendIDExample: value: d86a0a4d-7459-471a-83b4-431136320828 summary: A sample friend id
schemas: PaginationResponse: type: object properties: has_more: type: boolean next_cursor: type: string nullable: true required: - has_more - next_cursor Address: type: object properties: address1: type: string description: Valid address. example: 155 Water St address2: type: string description: Unit or apartment number (if applicable). city: type: string description: Name of city. example: New York City country: type: string description: > Valid country code, entered in uppercase ISO 3166-1 alpha-3 three-character format. example: USA postal_code: type: string description: > Valid postal code. Only USA ZIP codes are currently supported, entered as a five-digit ZIP or nine-digit ZIP+4. example: "11217" state: type: string description: > Valid state code. Only USA state codes are currently supported, entered in uppercase ISO 3166-2 two-character format. example: NY required: - address1 - city - country - postal_code - state Account: type: object properties: id: type: string format: uuid readOnly: true name: type: string plan: type: string enum: - FREE - PREMIUM description: The plan that the user is on. state: type: string enum: - ACTIVE - PAUSED description: Account states. address: $ref: "#/components/schemas/Address" required: - name AccountConfiguration: type: object AccountLink: oneOf: - type: object title: "Google" properties: type: const: "google" google_account_id: type: "string" required: - type - google_account_id - type: object title: "Facebook" properties: type: const: "facebook" facebook_account_id: type: "string" required: - type - facebook_account_id discriminator: propertyName: type Error: type: object properties: message: type: string data: {} CreateFriendRequest: type: object properties: message: type: string writeOnly: true FriendResponse: type: object properties: mutuals: type: integer readOnly: true friend_since: type: string format: date-time readOnly: true required: - mutuals - friend_since
securitySchemes: BasicAuth: type: http scheme: basic ApiKeyAuth: type: apiKey in: header name: "X-Acme-Api-Key"
responses: BadRequest: description: A parameter in the query given in the request does not match the valid queries for the endpoint. content: application/json: schema: $ref: "#/components/schemas/Error" Conflict: description: The request could not be completed due to a conflict with the current state of the target resource. content: application/json: schema: $ref: "#/components/schemas/Error" InternalServerError: description: There was a processing error on the server-side. content: application/json: schema: $ref: "#/components/schemas/Error" NotFound: description: The specified resource was not found. content: application/json: schema: $ref: "#/components/schemas/Error" TooManyRequests: description: | Client has exceeded the number of allowed requests in a given time period.
| | | |---|---| | Rate limited, too many requests per second | User has exceeded their per second rate limit | | Rate limited, reached daily limit | User has exceeded their daily rate limit | | Rate limited, too many keys tried | One IP has queried too many different API keys | content: application/json: schema: $ref: "#/components/schemas/Error" Forbidden: description: Client is not authorized to call the endpoint content: application/json: schema: $ref: "#/components/schemas/Error" Unauthorized: description: User has not been authenticated. Invalid or missing API key. content: application/json: schema: $ref: "#/components/schemas/Error" UnprocessableEntity: description: Unprocessable entity. content: application/json: schema: $ref: "#/components/schemas/Error"
# This defines which securitySchemes can be used in conjunction with each other.# See components.securitySchemes for their definition.security: - BasicAuth: [] - ApiKeyAuth: [] - {} # Indicates that no-auth is a valid option.Example Stainless config
# yaml-language-server: $schema=https://app.stainless.com/config.schema.json
# 'organization' defines metadata such as the name of your organization, the# docs site, contact information, which all get rendered on the SDK README.md.organization: name: acme docs: https://docs.acme.com contact: support@acme.com
settings: license: Apache-2.0
edition: 2025-10-08
# 'resources' define the high level mapping of endpoints to the structure in# each SDK. For example, the configuration below will correspond to being# able to call## - client.status() which makes a request to GET /status## - client.accounts.friends.list() which makes a request to GET /accounts/{account_id}/friends## As well as being able to access types with## import Acme from 'acme-typescript'## const result: Acme.Account = …## https://www.stainless.com/docs/guides/configure#resourcesresources: $client: methods: status: get /status accounts: models: account: "#/components/schemas/Account" account_configuration: "#/components/schemas/AccountConfiguration" account_link: "#/components/schemas/AccountLink" methods: list: get /accounts create: post /accounts retrieve: get /accounts/{account_id} update: put /accounts/{account_id} link: endpoint: post /accounts/{account_id}/link skip: - ruby subresources: friends: models: friend: "#/components/schemas/FriendResponse" methods: list: get /accounts/{account_id}/friends update: put /accounts/{account_id}/friends/{friend_id} delete: delete /accounts/{account_id}/friends/{friend_id}
# 'pagination' configures how your pagination style works, what request params# and response fields map to which pagination roles, and how we match your# endpoints against the pagination style.## https://www.stainless.com/docs/guides/configure#paginationpagination: - name: cursor_page type: cursor request: cursor: type: string limit: type: integer response: data: type: array items: {} next_cursor: type: string nullable: true
# 'client_settings' primarily configures the general behavior of the api client,# such as retries, timeouts, headers, and idempotency keys.## 'client_settings.opts' defines extra arguments to add to your client,# most prominently options that pertain to authentication, but could also be wired# up to read from the environment and send a value as a header.## https://www.stainless.com/docs/guides/configure#client-optsclient_settings: idempotency: header: "Idempotency-Key"
opts: username: type: string nullable: true auth: security_scheme: BasicAuth role: username read_env: ACME_USERNAME password: type: string nullable: true auth: security_scheme: BasicAuth role: password read_env: ACME_PASSWORD acme_api_key: type: string nullable: true auth: security_scheme: ApiKeyAuth read_env: ACME_API_KEY
# 'environments' map names of an environment to the corresponding base url.environments: production: https://api.acme.com/v1 sandbox: https://sandbox.acme.com/v1
# 'query_settings' define how more complex query parameters (such as objects and arrays)# are rendered.query_settings: nested_format: brackets array_format: repeat
# 'readme' defines what endpoints and arguments we should use to generate the snippets# in the README of each language.readme: example_requests: # The default example request is used for all snippets unless they are specifically overrode. default: type: request endpoint: post /accounts params: {} # You can explicitly override each example from the default case, such as 'headline' # which is the first snippet your user sees in the README. The 'default' example request # will still be used for all other example snippets. headline: type: request endpoint: post /accounts params: {} pagination: type: request endpoint: get /accounts params: {}targets: typescript: edition: typescript.2025-10-10 package_name: acme-typescript production_repo: stainless-sdks/acme-typescript-public publish: npm: true python: edition: python.2025-10-08 package_name: acme project_name: acme-python production_repo: stainless-sdks/acme-python-public publish: pypi: true go: edition: go.2025-10-08 package_name: acme-go production_repo: stainless-sdks/acme-go-public ruby: edition: ruby.2025-10-08 gem_name: acme production_repo: stainless-sdks/acme-ruby-public publish: rubygems: falseEditions
Section titled “Editions”Editions allow us to safely make updates and improvements to SDKs and the Stainless config that aren’t backwards-compatible, like changing default behavior or renaming a property. For more information, including details about the improvements we’ve made in each edition, have a look at our editions reference.
Config
Section titled “Config”| Key | Description |
|---|---|
edition? | “2025-10-10” | “2025-10-08” |
organization | Organization |
targets? | { Customization for each language’s repo name, package manager name, etc. |
environments | Record<string, string> Map of the name of the environment which appears in the SDK to the corresponding url to use. |
resources | { Resources define the organization for your API and the endpoints that are available under which resources. |
readme | Readme |
settings | Settings |
query_settings | QuerySettings |
security? | Array<SecurityConfig> Overrides the top-level security key in the OpenAPI spec. |
security_schemes? | Record<string, SecurityScheme> Overrides the |
client_settings? | ClientSettings |
pagination? | { Defines pagination schemes for pagination helpers and auto-pagination in the SDKs. |
unspecified_endpoints? | Array<string> List of endpoints to explicitly ignore, such as |
codeflow? | CodeflowConfig |
custom_casings? | Record<string, InitialismConfig | CasingConfig | { Defines how phrases are rendered in different SDKs. Can be either an ‘initialism’ which tells the generator to treat the word as an abbreviation like ‘API’ or ‘CPU’, or a more powerful |
openapi? | OpenAPIConfig |
diagnostics? | DiagnosticsConfig |
Organization - organization
Section titled “Organization - organization”How the organization is represented in the SDKs, such as name and github_org.
| Key | Description |
|---|---|
name | string Name of your organization or company, in lowercase. Used in documentation. |
docs? | string Link to your API documentation. |
contact? | string Contact email for bug reports, questions, and support requests. |
security_contact? | string Security email address for reporting vulnerabilities. Will be mentioned in the generated |
security_policy_url? | string Link to a page covering your security policy. Will be mentioned in the generated SECURITY.md. |
security_policy_terms? | string Terms for your security policy. Will be added to the generated SECURITY.md. Stainless always generates a default security policy covering SDKs security issues. |
github_org? | string Name of the GitHub organization that the production SDKs live in. |
upload_spec? | boolean Whether or not to enable uploading the input openapi spec and publicly exposing it in the SDK. This allows running tests in the SDKs against a mock server, and if disabled will disable tests from automatically running in CI. |
Targets - targets
Section titled “Targets - targets”TypeScript - targets.typescript
Section titled “TypeScript - targets.typescript”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “typescript.2025-10-10” | “typescript.2025-10-08” |
package_name | string The name of the package in the import such as |
publish | { |
options? | { |
custom? | { } |
MCP - targets.typescript.options.mcp_server
Section titled “MCP - targets.typescript.options.mcp_server”| Key | Description |
|---|---|
package_name? | string The name of the mcp package. Defaults to |
enable_all_resources? | boolean Adds all endpoints to the MCP server by default. Defaults to true. Set this value to false to opt-in each resource or endpoint to be included. e.g. |
recommend_dynamic_tools? | boolean “Dynamic tools” are a feature of the MCP server that provides tools for LLMs to dynamically discover This is helpful if an API has a large number of endpoints, such that the default list of tools would If true, the MCP server will recommend these dynamic tools in the README, and enable them by default if no In any case, dynamic tools can be enabled or disabled explicitly by the end user. |
enable_code_tool? | boolean Generate a tool for the MCP server to run TypeScript code against your Stainless SDK. See https://www.stainless.com/docs/guides/generate-mcp-server-from-openapi#code-execution-tool for more information. |
enable_docs_tool? | boolean Generate a tool for the MCP server to look up documentation for your Stainless SDK. This requires you to expose the SDK docs search API for your project. |
generate_cloudflare_worker? | boolean Generates a cloudflare worker that you can deploy as a Remote MCP Server in your own See https://www.stainless.com/docs/guides/generate-an-mcp-server#deploy-a-remote-mcp-server for more information. |
instructions? | string Instructions for the MCP client on to use the MCP server. This is sent as a part of MCP server initialization, and enters the client’s context. See https://modelcontextprotocol.io/specification/2025-06-18/basic/lifecycle#initialization for more information. |
enable_jq_filter? | boolean Whether to enable the JQ filter option on appropriate tools. Defaults to true. |
oauth_resource_metadata? | { OAuth protected resource metadata to expose when running with Streamable HTTP transport. |
publish? | { |
Node - targets.node (deprecated)
Section titled “Node - targets.node (deprecated)”
Node - targets.node (deprecated)
Section titled “Node - targets.node (deprecated)”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “node.2025-10-08” |
package_name | string The name of the package in the import such as |
publish | { |
options? | { |
custom? | { } |
Python - targets.python
Section titled “Python - targets.python”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “python.2025-10-08” |
package_name | string The name of the import, e.g. |
project_name? | string The Python project name, e.g. |
publish | { |
options? | { } |
Go - targets.go
Section titled “Go - targets.go”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “go.2025-10-08” |
package_name | string The name of the root package, containing the top-level client, options, and methods. |
options? | { |
Java - targets.java
Section titled “Java - targets.java”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “java.2025-10-08” |
reverse_domain | string The reverse domain to generate the SDK under, e.g. if |
publish | { See our publishing guide for more information on how to publish your SDK. |
options? | { } |
Kotlin - targets.kotlin
Section titled “Kotlin - targets.kotlin”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “kotlin.2025-10-08” |
reverse_domain | string The reverse domain to generate the SDK under, e.g. if |
publish | { See our publishing guide for more information on how to publish your SDK. |
options? | { } |
Ruby - targets.ruby
Section titled “Ruby - targets.ruby”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “ruby.2025-10-08” |
gem_name | string The name of the gem. |
publish | { |
options? | { |
CLI - targets.cli
Section titled “CLI - targets.cli”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “cli.2025-10-08” |
binary_name? | string The name of the binary, defaults to the repository name. |
options? | { |
default_format? | “auto” | “explore” | “json” | “pretty” | “raw” | “yaml” The default output format for CLI methods. This can be overridden on each |
default_error_format? | “auto” | “explore” | “json” | “pretty” | “raw” | “yaml” The default output format for CLI error responses. This can be overridden |
publish? | { |
PHP - targets.php
Section titled “PHP - targets.php”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “php.2025-10-08” |
package_name | string The name of the root package, containing the top-level client, options, and methods. For example, Unlike the composer_package_name, this name is only used within the SDK library code. |
composer_package_name? | string The ecosystem name of the package as used by Composer & Packagist. The name should resemble ‘acme/acme-php’. |
publish? | { |
options? | { } |
C# - targets.csharp
Section titled “C# - targets.csharp”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
production_repo? | string | null The production repo that this target is linked to. For example, You can optionally add a branch target, such as |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “csharp.2025-10-08” |
package_name | string The name of the root package, containing the top-level client, options, and methods. |
publish | { |
options? | { } |
Terraform - targets.terraform
Section titled “Terraform - targets.terraform”| Key | Description |
|---|---|
readme_title? | string Title for this package, typically used to display the README header in the format |
screencast? | string URL of a screencast to showcase on the project README. Must be an .mp4, .webm, or .mov file less <10MB. |
skip? | boolean Skip generation for this target |
edition? | “terraform.2025-10-08” |
production_repo | string | null The production repo that publishes to the Terraform Registry. The Terraform Registry requires GitHub repos to be prefixed with |
provider_name | string The name of the provider that users import. This is usually a single word, and is prefixed by your org name. |
publish | { |
options? | { |
SupportedLanguage
Section titled “SupportedLanguage”nodetypescriptpythongojavakotlinrubyterraformcliphpcsharphttp
Resource - resources.*
Section titled “Resource - resources.*”| Key | Description |
|---|---|
custom? | boolean Set |
models? | Record<string, string | Model> Configure the models—named types—defined in the resource. Each key in the object is the name of the model and the value |
methods? | Record<string, string | Method> Configure the methods defined in this resource. Each key in the object is the name of the method and the value |
description? | string Add a docstring for the resource. |
terraform? | boolean | { Terraform configuration options for this resource. |
subresources? | Record<string, Resource> Define nested namespaces for accessing models and methods. For example, with a “cards” resource containing a “transactions” subresource, the |
deprecated? | string | Record<string, string> Set the deprecation message for this resource |
mcp? | boolean | { whether to generate MCP Server tools for this resource |
skip? | boolean | Array<SupportedLanguage> Skip SDK generation for a resource by specifying |
only? | Array<SupportedLanguage> Opposite of |
Method - resources.*.methods.*
Section titled “Method - resources.*.methods.*”| Key | Description |
|---|---|
type? | “http” Describes a method for a standard http endpoint. |
endpoint | string A pair of HTTP verb & path, e.g. |
unwrap_response? | string | false Response property to be unwrapped so users don’t have to access it themselves |
paginated? | boolean | string Provide Learn more: https://www.stainless.com/docs/guides/configure#pagination |
skip_test_reason? | string | Record<string, string> Skip the generated unit test in all languages / particular languages with a given a reason |
body_param_name? | string Parameter name to be used for the request parameters argument. Required when the request body is not an object (for example, an array). |
positional_params? | Array<string> When specified, this overrides the default behavior (to use the last path parameter as a positional parameter). If a parameter is in this list, it is generated as a positional parameter in the given order. |
default_request_options? | { Configure the default request options for an individual method |
docs? | { |
terraform? | { |
mcp? | boolean | { whether to generate MCP Server tools for this endpoint |
cli? | { |
skip? | boolean | Array<SupportedLanguage> Skip SDK generation for a resource by specifying |
only? | Array<SupportedLanguage> Opposite of |
deprecated? | string | Record<string, string> Set the deprecation message for this method |
| Key | Description |
|---|---|
type | ”webhook_unwrap” |
event_types? | Record<string, string> Map of webhook event types in the format [event_name]: event operation in OAS spec. If empty, it will infer the names and use all operations. |
webhook_key_opt? | string | null The name of the client option that stores the webhook key used for verifying webhooks (or null to skip verification checks). |
description? | string |
summary? | string |
discriminator? | any |
skip? | boolean | Array<SupportedLanguage> Skip SDK generation for a resource by specifying |
only? | Array<SupportedLanguage> Opposite of |
deprecated? | string | Record<string, string> Set the deprecation message for this method |
| Key | Description |
|---|---|
type | ”alias” Describes an ‘alias’ to a method in the same resource. Used mainly for renaming a method and maintaining backwards compatibility. |
to | string The name of the method that this alias should point to. This currently only supports aliasing HTTP methods within the same resource. |
skip? | boolean | Array<SupportedLanguage> Skip SDK generation for a resource by specifying |
only? | Array<SupportedLanguage> Opposite of |
deprecated? | string | Record<string, string> Set the deprecation message for this method |
Model - resources.*.models.*
Section titled “Model - resources.*.models.*”| Key | Description |
|---|---|
type? | “model” |
openapi_uri | string
All For schemas under If you need a more powerful way to match a schema, |
skip? | boolean | Array<SupportedLanguage> Skip SDK generation for a resource by specifying |
only? | Array<SupportedLanguage> Opposite of |
| Key | Description |
|---|---|
type | ”alias” |
to | string Name of the model this alias should point to. Aliases must point to a model within the same resource. |
deprecated? | string | Record<string, string> Set the deprecation message for this model |
skip? | boolean | Array<SupportedLanguage> Skip SDK generation for a resource by specifying |
only? | Array<SupportedLanguage> Opposite of |
Readme - readme
Section titled “Readme - readme”Configuration of the examples in the README.md of the generated SDKs.
Learn more: https://www.stainless.com/docs/guides/configure#readme
| Key | Description |
|---|---|
example_requests | { Configuration for the request examples used in the README.md for the various SDKs. Each example by default inherits off the default endpoint, and the default endpoint must have a response body. We suggest you use the most standard endpoint for the |
example_types? | { Configuration for the models/types to use for demonstration of how to instantiate and access different types in the SDK. |
ReadmeExampleMethod
Section titled “ReadmeExampleMethod”| Key | Description |
|---|---|
type | ”request” |
endpoint | string Endpoint to use as the example method, in the format |
params | Record<string, unknown> The request params to include in the example. e.g. params: |
response_property? | string The property on the response to log, e.g. |
assign_to? | string |
ReadmeExampleModelObject
Section titled “ReadmeExampleModelObject”| Key | Description |
|---|---|
type | ”model” |
model | string The dotted path to the model defined in the config. For example, a ‘transaction’ model defined in the ‘cards.transactions’ |
property | string The property on the model schema to use as an example |
ReadmeExampleModelEnum
Section titled “ReadmeExampleModelEnum”| Key | Description |
|---|---|
type | ”model” |
model | string The dotted path to the model defined in the config. For example, a ‘transaction’ model defined in the ‘cards.transactions’ |
option | string The enum member to reference in examples |
pagination
Section titled “pagination”PaginationScheme
Section titled “PaginationScheme”| Key | Description |
|---|---|
name | string |
description? | string |
type | ”cursor” | “cursor_id” | “cursor_url” | “fake_page” | “offset” | “page_number” |
request | Record<string, unknown> |
response | Record<string, unknown> |
param_location? | “query” | “body” |
continue_on_empty_items? | boolean If set to true, the auto pagination helpers will continue to fetch pages even if there are no items returned, and will only stop when it is impossible to fetch another page |
PaginationProperty
Section titled “PaginationProperty”key: x-stainless-pagination-property
| Key | Description |
|---|---|
is_top_level_array? | boolean Are the pagination items the direct, root-level response from the endpoint? |
from_header? | string Which header value the pagination config property should be pulled from |
purpose? | “items” | “has_next_page” | “next_cursor_param” | “next_cursor_field” | “previous_cursor_param” | “previous_cursor_field” | “cursor_item_id” | “next_cursor_id_param” | “previous_cursor_id_param” | “cursor_url_field” | “page_number_param” | “current_page_number_field” | “total_page_count_field” | “offset_total_count_field” | “offset_count_start_field” | “offset_count_param” The purpose of the pagination property. More details and examples can be found in our Pagination docs Generic:
Type:
Type:
Type:
Type:
Type:
|
required? | boolean |
Settings - settings
Section titled “Settings - settings”| Key | Description |
|---|---|
license? | ”Apache-2.0” | “MIT” | { License to use in all SDKs (defaults to Apache-2.0) |
python? | { |
disable_mock_tests? | boolean If set to true, all generated integration tests that hit the prism mock http server are marked as skipped. |
unwrap_response_fields? | Array<string> Response envelopes, like a top-level “data” field, can be described here with [data] |
positional_params? | false If specified as false, then we disable positional params for the entire SDK. |
ClientSettings - client_settings
Section titled “ClientSettings - client_settings”Settings for customizing the Client class in the SDKs.
| Key | Description |
|---|---|
opts? | Record<string, ClientOpt> Extra arguments that the client accepts, such as an API key. Learn more: https://www.stainless.com/docs/guides/configure#client-opts |
idempotency? | { Configure idempotency behaviour |
default_headers? | Record<string, string> Headers sent with every API request |
default_timeout? | string | number Configure the default timeout for client calls, in milliseconds or ISO 8601 (default is 60 seconds) |
default_retries? | { Default retry settings for all endpoints. |
ClientOpt
Section titled “ClientOpt”key: client_settings.opts.*
| Key | Description |
|---|---|
type | ”null” | “boolean” | “number” | “string” | “integer” |
description? | string Description used for this option in the generated SDKs |
example? | unknown Example value used in tests or example snippets |
default? | unknown Default value to use if no value provided by the user |
nullable? | boolean Whether this client option is required |
read_env? | string Environment variable that this option should read from |
auth? | { Configure authentication for this client option. |
server_variable? | string Links this client option to a variable in the url configured by Then |
send_in_header? | string Send the value given to this option in a header on every request |
required_in_tests? | boolean Whether to provide this argument in unit tests. Set to true if this argument is required for internal request tests to run successfully |
QuerySettings - query_settings
Section titled “QuerySettings - query_settings”| Key | Description |
|---|---|
nested_format? | “dots” | “brackets” Configures how query parameters with nested objects render in the query string. Accepted values are Example object:
|
array_format? | “comma” | “repeat” | “indices” | “brackets” Configures how query parameters with array values render in the query string. Accepted values are Example object:
|
SecurityConfig - security_config
Section titled “SecurityConfig - security_config”| Key | Description |
|---|---|
[key: string] | [Array<string>] |
SecurityScheme - security_schemes
Section titled “SecurityScheme - security_schemes”| Key | Description |
|---|---|
type | ”http” |
description? | string |
scheme | ”bearer” |
bearerFormat? | string |
x-stainless-auth? | { |
| Key | Description |
|---|---|
type | ”http” |
description? | string |
scheme | ”basic” |
x-stainless-auth? | { |
| Key | Description |
|---|---|
type | ”http” |
description? | string |
scheme | ”digest” |
x-stainless-auth? | { |
| Key | Description |
|---|---|
type | ”apiKey” |
description? | string |
in? | “header” | “query” |
name | string |
x-stainless-auth? | { |
| Key | Description |
|---|---|
type | ”oauth2” |
description? | string |
flows | { |
OpenAPIConfig - openapi
Section titled “OpenAPIConfig - openapi”Describes changes to the input OpenAPI spec and also whether or not to add code samples to the output OpenAPI spec.
| Key | Description |
|---|---|
code_samples? | { Defines automatic snippet generation directly into your OpenAPI spec. Supported providers:
|
code_sample_languages? | Record<string, boolean> Controls which languages to include in generated code samples. By default, all languages configured in |
custom_casings
Section titled “custom_casings”InitialismConfig
Section titled “InitialismConfig”| Key | Description |
|---|---|
initialism | boolean If set to true, the term is used as an initialism: treated as an abbreviation of initial letters (for example, “CPU” and “API”). By default we use |
CasingConfig
Section titled “CasingConfig”| Key | Description |
|---|---|
snake | string Term rendered with lowercase characters separated by underscores (for example, “payment_method”). |
pascal | string Term rendered with the first character of each word capitalized and joined together (for example, “PaymentMethod”). |
capital | string Term rendered with the first character of each word capitalized and separated by a space (for example, “Payment Method”). |
camel | string Term rendered with the first word in lowercase, followed by the first character of each subsequent word capitalized and joined together (for example, “paymentMethod”). |
ErrorsConfig - errors
Section titled “ErrorsConfig - errors”CodeflowConfig - codeflow
Section titled “CodeflowConfig - codeflow”Configures various codeflow (automated releases to package managers) options.
| Key | Description |
|---|---|
release_environment? | string GitHub environment to run the release workflow in. |
publish_packages? | boolean Whether publishing to package managers should be included in GitHub automations. |
reviewers? | Array<string> List of default reviewers to assign to a customer release PR |
code_owners? | Record<string, Array<string>> Github CODEOWNERS file content to add to SDK repositories Example: |
DiagnosticsConfig - diagnostics
Section titled “DiagnosticsConfig - diagnostics”Configures diagnostics that appear in builds and the Studio.
| Key | Description |
|---|---|
ignored | Record<string, true | Array<string | { Diagnostic types to ignore. |