OpenAI OpenAPI Specification

repository·main·Indexed 25 days ago

https://github.com/openai/openai-openapi

The machine-readable OpenAPI 3.1 specification for the OpenAI REST API. This repository serves as the single source of truth for endpoints, authentication, and request/response schemas used to power official SDKs and developer tools.

Tokens
337
Snippets
1
Records
3
Agent score
32%

What's inside openai-openapi

  1. Get the OpenAI API OpenAPI specification

    main

    The OpenAI API is described using an OpenAPI 3.1 specification. You can use this specification to generate typed clients, build API explorers, configure testing tools, or integrate with any OpenAPI-compatible workflow. You can browse the specification directly in the repository or download the latest version using curl.

    curl -L https://raw.githubusercontent.com/openai/openai-openapi/master/openapi.yaml \
      -o openai-openapi.yaml
  2. Use official OpenAI generated SDKs

    main

    OpenAI provides official SDKs for several languages, which are generated directly from this OpenAPI specification. Instead of manually using the spec, you can use these maintained libraries:

    • Python: openai-python
    • JavaScript / TypeScript: openai-node
    • .NET: openai-dotnet
    • Go: openai-go
    • Java: openai-java
    • Ruby: openai-ruby
  3. Report issues with the OpenAPI specification

    main

    If you find an incorrect schema, a missing field, or any other problem within the OpenAPI specification, you should report it via GitHub issues. When reporting, include:

    • The affected endpoint or schema.
    • A minimal example of the problem if possible.

    For general API usage help (not related to the spec itself), contact OpenAI Support.