Skip to main content
Home

latest

A tiny (1.18kB), tree-shakeable OpenAI client. Optionally supports response streaming in all JavaScript runtimes.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
82%
Published
6 months ago (0.0.8)
type alias AuthOptions

Initialization options.

These settings will be normalized into Credentials, which will affect all associated HTTP requests.

Properties

OpenAI API Key

Organization ID

optional
baseURL: `https://${string}/`
optional
headers: Record<string, string>

Any custom HTTP headers to include in every request.

Any custom URL search parameters (AKA, query string) to append to every request.

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@agent/openai

Import symbol

import { type AuthOptions } from "@agent/openai";
or

Import directly with a jsr specifier

import { type AuthOptions } from "jsr:@agent/openai";

Add Package

pnpm i jsr:@agent/openai
or (using pnpm 10.8 or older)
pnpm dlx jsr add @agent/openai

Import symbol

import { type AuthOptions } from "@agent/openai";

Add Package

yarn add jsr:@agent/openai
or (using Yarn 4.8 or older)
yarn dlx jsr add @agent/openai

Import symbol

import { type AuthOptions } from "@agent/openai";

Add Package

vlt install jsr:@agent/openai

Import symbol

import { type AuthOptions } from "@agent/openai";

Add Package

npx jsr add @agent/openai

Import symbol

import { type AuthOptions } from "@agent/openai";

Add Package

bunx jsr add @agent/openai

Import symbol

import { type AuthOptions } from "@agent/openai";