A machine-readable description of the OpenAI REST API, authored in OpenAPI 3.1.
This repository publishes the OpenAPI specification for the OpenAI API. The spec describes the API's endpoints, authentication, parameters, and request and response schemas.
openapi.yaml and openapi.json are generated artifacts synchronized automatically from upstream source. For specification corrections, follow the contribution workflow.
Use it to generate typed clients, build API explorers, configure testing tools, or work with the OpenAI API in any OpenAPI-compatible workflow.
Note
Looking for human-readable documentation, guides, and examples? Visit the OpenAI API docs.
Browse openapi.yaml or openapi.json directly, or download the latest YAML version:
curl -L https://raw.githubusercontent.com/openai/openai-openapi/main/openapi.yaml \
-o openai-openapi.yamlThe document uses OpenAPI 3.1 and can be imported into tools that support the OpenAPI ecosystem.
OpenAI publishes the following official SDKs generated from this specification:
| Language or platform | Repository |
|---|---|
| Python | openai-python |
| JavaScript / TypeScript | openai-node |
| .NET | openai-dotnet |
| Go | openai-go |
| Java | openai-java |
| Ruby | openai-ruby |
Make specification changes in the upstream source so they persist through the next publication. Direct edits to this repository's generated YAML or JSON do not update that source.
OpenAI contributors with monorepo access: Follow the internal OpenAPI authoring guide and its package guidance to locate the editable definition, generate the specification, and validate the change. The publication workflow updates this repository's spec files automatically.
Contributors without monorepo access: Use the feedback process below. Include proposed wording or a schema snippet in the issue when helpful so maintainers can apply the correction upstream.
Changes to this README and repository assets can be submitted as pull requests here.
Found an incorrect schema, a missing field, or another problem with the specification? Search the existing issues and, if it has not already been reported, open a new issue.
When reporting a problem, include the affected endpoint and HTTP method or schema, the expected behavior, and a minimal example when possible. The OpenAI team will make a best-effort attempt to triage and resolve spec issues.
For immediate help with the OpenAI API, contact OpenAI Support.
This project is licensed under the MIT License.
