# OpenAI API

CreateWithAI Hub page: https://createwithaihub.com/apis-sdks/openai-api
Latest version of this file: https://createwithaihub.com/apis-sdks/openai-api.md

- Type: API / SDK · Category: APIs & SDKs
- Publisher: OpenAI
- Pricing: Paid
- Runs on: API (cloud)

OpenAI's developer API for GPT, image, audio and embedding models, with official SDKs in several languages.

The OpenAI API gives programmatic access to OpenAI's models through the Responses and Chat Completions APIs, plus endpoints for realtime voice, image generation and editing, text-to-speech, transcription and embeddings. It supports function calling and structured outputs constrained by JSON Schema, and the Agents SDK builds on it. Official SDKs cover Python, TypeScript/JavaScript, .NET, Java, Go and Ruby.

Useful for: Building chat or agent features, generating images, adding voice or transcription, or creating embeddings for search in an application.

## Key features

- Responses API and Chat Completions API
- Realtime API for voice agents
- Image generation and editing
- Text-to-speech, transcription and embeddings
- Function calling and JSON Schema structured outputs
- Official SDKs: Python, TypeScript/JS, .NET, Java, Go, Ruby

## Connection

- Modality: Text, Image, Audio, Multimodal
- SDK language: Python, TypeScript / JS, Go, Java, C#, Ruby

## Before you start

- OpenAI platform account
- API key

## Install steps from the official documentation

Python SDK:

```
pip install openai
```

TypeScript/JavaScript SDK:

```
npm install openai
```

.NET SDK:

```
dotnet add package OpenAI
```

## Official links

- Website: https://openai.com/api/
- Source repository: https://github.com/openai/openai-python
- Documentation: https://developers.openai.com/api/docs
- Source: https://developers.openai.com/api/docs (API capabilities: Responses, Chat Completions, Realtime, images, audio, embeddings, function calling, structured outputs)
- Source: https://developers.openai.com/api/docs/libraries (Official SDK languages and install commands)
- Source: https://github.com/openai/openai-python (Python 3.10+; Apache-2.0)
- Source: https://openai.com/api/ (API Platform page; states simple pay-as-you-go pricing)
- Source: https://developers.openai.com/api/docs/pricing (Per-token rates; no free credits listed (only moderation is free))
- Source: https://developers.openai.com/api/docs/guides/rate-limits (Usage tiers: Free (allowed geography, $100/month cap), Build, Launch, Grow by credit purchases)
