0.2.1 • Published 4 months ago

openpixels v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 months ago

OpenPixels TypeScript/JavaScript SDK

A TypeScript SDK for accessing the OpenPixels API.

Installation

npm install openpixels
# or
yarn add openpixels
# or
pnpm add openpixels

Usage

import { OpenPixels } from 'openpixels';

const client = new OpenPixels({
  apiKey: 'sk-op-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
});

// Generate an image
async function generateImage() {
  const result = await client.run({
    model: 'flux-dev',
    prompt: 'a cat',
  });
  
  console.log(result);
}

generateImage();

API Reference

OpenPixels

The main client for making synchronous calls to the OpenPixels API.

const client = new OpenPixels({
  apiKey: "YOUR_API_KEY",
  baseUrl: "https://worker.openpixels.ai" // Optional, defaults to production API
});

Methods

  • run(payload): Submits a job and waits for the result.

Publish a New Version

  1. Bump the version in the package.json file
  2. git tag vX.Y.Z
  3. git push origin vX.Y.Z
  4. pnpm build
  5. pnpm publish

License

MIT # openpixels-node

0.2.1

4 months ago

0.2.0

4 months ago

0.1.4

4 months ago

0.1.3

4 months ago

0.1.2

4 months ago

0.1.1

4 months ago

0.1.0

4 months ago