aiagent.club
中文
npm package

openai

Updated 2026-09-12 View source ↗

#3 of 203 by Downloads / week among npm packages

29.3M Downloads / week

The official TypeScript library for the OpenAI API

About

This library provides convenient access to the OpenAI REST API from TypeScript or JavaScript.

It is generated from our OpenAPI specification with Stainless.

To learn how to use the OpenAI API, check out our API Reference and Documentation.

These commands will make the module importable from the @openai/openai scope. You can also import directly from JSR without an install step if you're using the Deno JavaScript runtime:

The full API of this library can be found in api.md file along with many code examples.

The primary API for interacting with OpenAI models is the Responses API. You can generate text from the model with the code below.

When you manage Responses API conversation…

Excerpted from www.npmjs.com/package/openai

Latest metrics

Downloads / week 29.3M 2026-09-12