# OpenAI SDK

> OpenAI's own code kit. Your code calls its models with one short function.

**Field:** Software Development  
**Category:** AI Engineering  
**Also known as:** OpenAI Client Library, OpenAI Python Library, openai Python package, OpenAI Node SDK

## Think of it like

It is like a remote made for one TV. It knows every button on that TV.

## Definition

The OpenAI SDK is OpenAI's own code library for the OpenAI API. The main ones are for Python and for JavaScript with TypeScript. There are also kits for .NET, Java and Go. You make a client and call responses.create with a model and your input. The library adds your key, tries again on errors and can stream the reply.

## Example

Jack's help bot uses the openai package for Python. Each question goes out in one function call. The answer text comes back ready to show.

## Example code

```python
from openai import OpenAI

client = OpenAI()  # reads OPENAI_API_KEY
response = client.responses.create(
    model="gpt-6-astra",
    input="Hello there",
)
print(response.output_text)
```

The client reads your key from the environment. One call sends the input and prints the answer.

## Why it matters

Many other model makers accept the same request shape. So the same library can often reach them too, once you change the base URL.

## Common mistake

Starting a new app on chat.completions because an old tutorial did. It still works, but OpenAI points new work to the Responses API.

## Three principles

- **Python and JavaScript.** Plus .NET, Java and Go.
- **Key from the environment.** OPENAI_API_KEY by default.
- **Base URL can change.** Reach other servers that copy the format.

## Related terms

- [Client SDK](https://learn.benibix.com/term/development/client-sdk)
- [OpenAI API](https://learn.benibix.com/term/development/openai-api)
- [Anthropic SDK](https://learn.benibix.com/term/development/anthropic-sdk)
- [OpenAI Agents SDK](https://learn.benibix.com/term/development/openai-agents-sdk)
- [OpenAI-Compatible API](https://learn.benibix.com/term/ai/openai-compatible-api)
- [OpenAI](https://learn.benibix.com/term/ai/openai)

![Your code calls one function in the client SDK. The SDK adds the key, builds the web request and sends it to the model's API. The reply comes back through the SDK as a plain object. A dashed arrow from the reply back to your code is labelled: what happens next is your code's job.](https://learn.benibix.com/diagrams/dev-client-sdk.svg)

---

Source: https://learn.benibix.com/term/development/openai-sdk
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
