Libraries

Explore language-specific libraries for using the OpenAI API.

Official REST API libraries

OpenAI provides officially supported libraries that are continually updated with the latest features available in the REST API. These libraries provide types for API inputs and outputs, and helpers for making HTTP requests, handling streaming, and in some cases communicating with the Realtime API over a WebSocket in server-to-server scenarios.

Azure OpenAI libraries

Microsoft's Azure team maintains libraries that are compatible with both the OpenAI API and Azure OpenAI services. Read the library documentation below to learn how you can use them with the OpenAI API.


Community libraries

The libraries below are built and maintained by the broader developer community. You can also watch our OpenAPI specification repository on GitHub to get timely updates on when we make changes to our API.

Please note that OpenAI does not verify the correctness or security of these projects. Use them at your own risk!

C# / .NET

C++

Clojure

Crystal

Dart/Flutter

Delphi

Elixir

Go

Java

Julia

Kotlin

Node.js

PHP

Python

R

Ruby

Rust

Scala

Swift

Unity

Unreal Engine

Other OpenAI repositories

  • tiktoken - counting tokens
  • simple-evals - simple evaluation library
  • mle-bench - library to evaluate machine learning engineer agents
  • gym - reinforcement learning library
  • swarm - educational orchestration repository