A zero dep TypeScript client library for interacting with the OpenAI API.
This client provides methods for calling the OpenAI API's endpoints for text completion,
language generation, and other tasks.
To create an OpenAiClient, use the create method.
The OpenAiClient's methods return Promises that resolve to the JSON response
returned by the OpenAI API. If the OpenAI API returns an error, the Promise will be rejected
with an instance of an HttpError that includes the error message and HTTP status code.
Overview
A zero dep TypeScript client library for interacting with the OpenAI API.
This client provides methods for calling the OpenAI API's endpoints for text completion, language generation, and other tasks.
To create an
OpenAiClient
, use thecreate
method.The
OpenAiClient
's methods return Promises that resolve to the JSON response returned by the OpenAI API. If the OpenAI API returns an error, the Promise will be rejected with an instance of anHttpError
that includes the error message and HTTP status code.See
https://beta.openai.com/docs/quickstart