Python
Official SDK- Package
openai- Install
- Install
pip install openai - Repo
- github.com/openai/openai-python
- Docs
- developers.openai.com/api/docs/libraries
From the docs
To use the OpenAI API in Python, you can use the official OpenAI SDK for Python.
OpenAI SDKs - 10 languages recorded
OpenAI ships official SDKs for Python, TypeScript, C# and Ruby. Its Go and Java SDKs are labelled beta. For PHP, Rust, Swift and Kotlin, its docs link community libraries, which are not official.
Verified against each provider's own SDK docs and package registry pages. Status labels are the provider's own; no version numbers are recorded.
OpenAI's SDK docs: developers.openai.com/api/docs/libraries. Compare every provider in the SDK grid.
openaipip install openaiTo use the OpenAI API in Python, you can use the official OpenAI SDK for Python.
openainpm install openaiTo use the OpenAI API in server-side JavaScript environments like Node.js, Deno, or Bun, you can use the official OpenAI SDK for TypeScript and JavaScript.
github.com/openai/openai-go/v3import (
"github.com/openai/openai-go/v3" // imported as openai
)OpenAI provides an API helper for the Go programming language, currently in beta.
com.openai:openai-java<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>VERSION</version>
</dependency>VERSION stands for the version the docs pin. Pin the current release from the package registry.
OpenAI provides an API helper for the Java programming language, currently in beta.
OpenAIdotnet add package OpenAIIn collaboration with Microsoft, OpenAI provides an officially supported API client for C#. You can install it with the .NET CLI from NuGet.
openaigem "openai"To use the OpenAI API in Ruby, you can use the official OpenAI SDK for Ruby.
Community library, not official. OpenAI's docs link it, but OpenAI does not ship it.
openai-php/client (also orhanerday/open-ai)Community libraries: The libraries below are built and maintained by the broader developer community. ... OpenAI does not verify the correctness or security of these projects. Use them at your own risk!
Community library, not official. OpenAI's docs link it, but OpenAI does not ship it.
async-openaiCommunity libraries: The libraries below are built and maintained by the broader developer community. ... OpenAI does not verify the correctness or security of these projects. Use them at your own risk!
Community library, not official. OpenAI's docs link it, but OpenAI does not ship it.
MacPaw/OpenAI (also AIProxySwift, OpenAIKit)Community libraries: The libraries below are built and maintained by the broader developer community. ... OpenAI does not verify the correctness or security of these projects. Use them at your own risk!
Community library, not official. OpenAI's docs link it, but OpenAI does not ship it.
openai-kotlinCommunity libraries: The libraries below are built and maintained by the broader developer community. ... OpenAI does not verify the correctness or security of these projects. Use them at your own risk!
Newsletter
One email per week. New models, new SDKs and the API changes that break your client, and what they mean for your stack.