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

everart

v1.2.2

Published

Node SDK for the EverArt REST API

Readme

EverArt Node SDK

A TypeScript library to easily access the EverArt REST API.

Installation

Yarn

yarn add everart

NPM

npm i everart

General Usage

import EverArt from 'everart';

const everart = new EverArt(process.env.EVERART_API_KEY);

How to get a key

Log in or sign up at https://www.everart.ai/, then navigate to the API section in the sidebar.

Types

Model

type Model = {
  id: string;
  name: string;
  status: ModelStatus;
  subject: ModelSubject;
  createdAt: Date;
  updatedAt: Date;
  estimatedCompletedAt?: Date;
  thumbnailUrl?: string;
};

type ModelStatus = 'PENDING' | 'PROCESSING' | 'TRAINING' | 'READY' | 'FAILED' | 'CANCELED';
type ModelSubject = 'OBJECT' | 'STYLE' | 'PERSON';

Generation

type Generation = {
  id: string;
  model_id: string;
  status: GenerationStatus;
  image_url: string | null;
  type: GenerationType;
  createdAt: Date;
  updatedAt: Date;
};

type GenerationStatus = 'STARTING' | 'PROCESSING' | 'SUCCEEDED' | 'FAILED' | 'CANCELED';
type GenerationType = 'txt2img' | 'img2img';

API Reference

Generations (v1)

Images (v1)

Models (v1)

Generations (v1)

Create

Create a new image generation using a model.

const generation = await everart.v1.generations.create(
  '5000',  // Model ID
  'A beautiful landscape',  // Prompt
  'txt2img',  // Generation type
  { 
    imageCount: 1,  // Number of images to generate
    height: 512,    // Optional: Image height
    width: 512,     // Optional: Image width
    webhookUrl: 'https://your-webhook.com'  // Optional: Webhook URL for status updates
  }
);

Fetch

Fetch a specific generation by ID.

const generation = await everart.v1.generations.fetch('generation_id');

Fetch With Polling

Fetch a generation and wait until it's complete.

const generation = await everart.v1.generations.fetchWithPolling('generation_id');

Images (v1)

Upload

Get upload URLs for images.

const uploads = await everart.v1.images.uploads([
  {
    filename: 'image1.jpg',
    content_type: 'image/jpeg'
  },
  {
    filename: 'image2.png',
    content_type: 'image/png'
  }
]);

Supported content types:

  • image/jpeg
  • image/png
  • image/webp
  • image/heic
  • image/heif

Models (v1)

Create

Create a new fine-tuned model.

// Using URLs
const model = await everart.v1.models.create(
  'My Custom Model',  // Model name
  'OBJECT',          // Model subject type
  [
    { type: 'url', value: 'https://example.com/image1.jpg' },
    { type: 'url', value: 'https://example.com/image2.jpg' },
    // ... more training images (minimum 5)
  ],
  {
    webhookUrl: 'https://your-webhook.com'  // Optional: Webhook URL for training updates
  }
);

// Using local files
const model = await everart.v1.models.create(
  'My Custom Model',  // Model name
  'OBJECT',          // Model subject type
  [
    { type: 'file', path: '/path/to/image1.jpg' },
    { type: 'file', path: '/path/to/image2.jpg' },
    // ... more training images (minimum 5)
  ],
  {
    webhookUrl: 'https://your-webhook.com'  // Optional: Webhook URL for training updates
  }
);

The images parameter accepts an array of image inputs that can be either URLs or local files:

type URLImageInput = { type: 'url'; value: string };
type FileImageInput = { type: 'file'; path: string };
type ImageInput = URLImageInput | FileImageInput;

Supported file types:

JPEG (.jpg, .jpeg) PNG (.png) WebP (.webp) HEIC (.heic) HEIF (.heif)

Fetch

Fetch a specific model by ID.

const model = await everart.v1.models.fetch('model_id');

Fetch Many

Fetch multiple models with optional filtering.

const { models, hasMore } = await everart.v1.models.fetchMany({
  limit: 10,           // Optional: Number of models to fetch
  beforeId: 'id',      // Optional: Fetch models before this ID
  search: 'keyword',   // Optional: Search models by name
  status: 'READY'      // Optional: Filter by status
});

Public Models

EverArt provides access to several public models that you can use for generation:

| Model ID | Name | |----------|------| | 5000 | FLUX1.1 [pro] | | 9000 | FLUX1.1 [pro] (ultra) | | 6000 | SD 3.5 Large | | 7000 | Recraft V3 - Realistic | | 8000 | Recraft V3 - Vector |

Error Handling

The SDK throws typed errors for different scenarios:

type EverArtErrorName =
  | 'EverArtInvalidRequestError'    // 400: Invalid request parameters
  | 'EverArtUnauthorizedError'      // 401: Invalid API key
  | 'EverArtForbiddenError'         // 403: General forbidden access
  | 'EverArtContentModerationError' // 403: Content violates policies
  | 'EverArtRecordNotFoundError'    // 404: Resource not found
  | 'EverArtUnknownError';          // Other errors

Development and testing

Built in TypeScript, tested with Jest.

$ yarn install
$ yarn test

Road Map

  • Support local files
  • Support output to S3/GCS bucket

License

MIT