openai/openai-node

Official JavaScript / TypeScript library for the OpenAI API

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 40 minutes ago
Added to GitGenius on September 5th, 2026
Created on December 14th, 2021
Open Issues & Pull Requests: 27 (+1)
GitHub issues: Enabled
Number of forks: 1,594
Total Stargazers: 11,161 (+0)
Total Subscribers: 158 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 46.8 hours
Mean response time: 60.1 days
90th percentile: 280.5 days
Tracked items: 330

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Work labelled "openai api" is answered fastest, typically in about 6 hours, while "upstream" waits about 3 weeks. Only 10% of issues opened in the past year have been closed. Three people close 88% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 5
New in 7 days: 4
Closed in 7 days: 1
Avg open age: 5 days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 4
Closed in 7 days: 1
Comments in 7 days: 3
Events in 7 days: 4

Top labels

  • bug (197)
  • upstream (65)
  • sdk (49)
  • openai api (22)
  • enhancement (15)
  • openapi (14)
  • documentation (13)
  • question (8)

Detailed Description

openai-node is the official JavaScript and TypeScript library for accessing the OpenAI API.

The library provides a convenient interface to OpenAI's REST API, generated from the official OpenAPI specification. It handles the details of HTTP communication, request formatting, and response parsing, allowing developers to interact with OpenAI models through straightforward method calls. The library supports both the newer Responses API for advanced use cases and the established Chat Completions API, with built-in helpers like toResponseInputItems() to manage multi-turn conversation state correctly by preserving all required output items in order.

Developers building Node.js or browser-based applications that need to call OpenAI models should use this library. It suits projects ranging from simple text generation to complex multi-turn conversations and vision tasks. The library includes workload identity authentication for secure, automated environments, supporting Kubernetes service account tokens, Azure managed identity, GCP compute engine metadata, and X.509 client certificates, making it suitable for cloud-native deployments where API keys are impractical. Deno projects can import the package directly from npm.

The project maintains active development with regular updates to track OpenAI API changes. The codebase shows consistent attention to production concerns, including workload identity support across multiple cloud platforms, careful token refresh management with configurable buffers, and transport-level security features like certificate isolation and retry bounding. The library includes comprehensive examples covering conversation state management, vision capabilities, and authentication patterns across different deployment environments.