← 开源
openai

openai-openapi

OpenAPI specification for the OpenAI API

AI EngineeringAccess models
在 GitHub 打开
增长势头
+124 小时新增 Star+0.0%
2.54k
Star
527
Fork
+8
本周
41
贡献者
创建于 2021-12-14 · 更新于 2026-10-06 · 今日第 4782 名
主要开发者
README

OpenAI API · OpenAPI specification

A machine-readable description of the OpenAI REST API, authored in OpenAPI 3.1.

[Explore the spec](./openapi.yaml)
·
[API reference](https://developers.openai.com/api/reference/overview)
·
[Support](https://help.openai.com/)

OpenAI Developers Responses API reference

About

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. See the contribution policy and feedback process.

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.

Get the specification

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.yaml

The document uses OpenAPI 3.1 and can be imported into tools that support the OpenAPI ecosystem.

Generated SDKs

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

Contributing

We welcome issue reports and suggestions from everyone. Use the feedback process to contribute through issues. Pull requests are limited to OpenAI team members; external contributors should use issues, including for documentation or asset suggestions. See CONTRIBUTING.md for the full policy.

OpenAI maintainers make specification corrections in the upstream source using the internal OpenAPI authoring guide. The publication workflow updates this repository's generated YAML and JSON automatically; direct edits here do not update that source.

OpenAI team members can submit pull requests here for repository policy, documentation, and assets, subject to required review.

Feedback

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 non-security problem, include the affected revision, endpoint and HTTP method or schema, the expected behavior, and a minimal example using synthetic data. Remove credentials, customer data, and private URLs from examples and diagnostic output. The OpenAI team will make a best-effort attempt to triage and resolve spec issues.

Report suspected vulnerabilities privately using SECURITY.md, not in public issues or pull requests.

For immediate help with the OpenAI API, contact OpenAI Support.

License

This project is licensed under the MIT License.