npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@robinpath/openai

v0.1.2

Published

OpenAI module for RobinPath.

Downloads

139

Readme

@robinpath/openai

OpenAI module for RobinPath.

Category Functions Auth License

Why use this module?

The openai module lets you:

  • Send a chat completion request to OpenAI
  • Send a legacy completion request
  • Generate images using DALL-E
  • Edit an image using DALL-E with an optional mask
  • Create a variation of an existing image

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

npm install @robinpath/openai

Quick Start

1. Set up credentials

openai.setApiKey "sk-..."

2. Send a chat completion request to OpenAI

openai.chat "Hello, how are you?" {"model": "gpt-4o"}

Available Functions

| Function | Description | |----------|-------------| | openai.setApiKey | Set the OpenAI API key for authentication | | openai.chat | Send a chat completion request to OpenAI | | openai.complete | Send a legacy completion request | | openai.generateImage | Generate images using DALL-E | | openai.editImage | Edit an image using DALL-E with an optional mask | | openai.createImageVariation | Create a variation of an existing image | | openai.transcribe | Transcribe audio to text using Whisper | | openai.translate | Translate audio to English text using Whisper | | openai.speak | Convert text to speech using TTS | | openai.createEmbedding | Generate text embeddings | | openai.createModeration | Check text for content policy violations | | openai.listModels | List all available OpenAI models | | openai.getModel | Get details of a specific model | | openai.uploadFile | Upload a file to OpenAI | | openai.listFiles | List uploaded files | | openai.deleteFile | Delete an uploaded file | | openai.getFileContent | Get the content of an uploaded file | | openai.createFineTune | Create a fine-tuning job | | openai.listFineTunes | List fine-tuning jobs | | openai.getFineTune | Get details of a fine-tuning job | | openai.cancelFineTune | Cancel a running fine-tuning job | | openai.createBatch | Create a batch processing request | | openai.getBatch | Get details of a batch request | | openai.listBatches | List batch requests | | openai.cancelBatch | Cancel a batch request |

Examples

Send a chat completion request to OpenAI

openai.chat "Hello, how are you?" {"model": "gpt-4o"}

Send a legacy completion request

openai.complete "Once upon a time"

Generate images using DALL-E

openai.generateImage "A sunset over mountains" {"model": "dall-e-3", "size": "1024x1024"}

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/openai";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  openai.setApiKey "sk-..."
  openai.chat "Hello, how are you?" {"model": "gpt-4o"}
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

Related Modules

License

MIT