SpyBara
Go Premium

libraries.md 2026-05-06 00:01 UTC to 2026-05-07 21:57 UTC

22 added, 60 removed.

2026
Fri 29 06:38 Thu 28 06:37 Wed 27 06:42 Sun 24 06:25 Fri 22 06:33 Thu 21 06:36 Wed 20 06:35 Tue 19 11:58 Mon 18 22:01 Thu 14 21:00 Tue 12 18:57 Thu 7 21:57 Wed 6 00:01 Tue 5 23:00 Sat 2 05:57

SDKs and CLI

This page covers the main ways to build with the OpenAI API: official SDKs for application code, the OpenAI CLI for shell-native workflows, the Agents SDK for orchestration, or your own preferred HTTP client.

Create and export an API key

Before you begin, create an API key in the dashboard, which you'll use to securely access the API. Store the key in a safe location, like a .zshrc file or another text file on your computer. Once you've generated an API key, export it as an environment variable in your terminal.

Export an environment variable on macOS or Linux systems
export OPENAI_API_KEY="your_api_key_here"

OpenAI SDKs are configured to automatically read your API key from the system environment.

Install an official SDK

Use the Agents SDK

Use the official OpenAI SDKs above for direct API requests. Use the Agents SDK when your application needs code-first orchestration for agents, tools, handoffs, guardrails, tracing, or sandbox execution.

Build your first agent with the Agents SDK.

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!

Clojure

Dart/Flutter

Delphi

Elixir

Kotlin

PHP

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