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

getimg-client

v1.1.0

Published

getimg.ai JS Client

Readme

getimg-client

A TypeScript client for the getimg.ai API.
Generate stunning images with the latest AI models — fully typed, zero hassle.

npm version TypeScript License: MIT


Table of Contents


Installation

npm install getimg-client

Quick Start

import { getimg } from 'getimg-client';

getimg.config({ key: 'YOUR_GETIMG_API_KEY' });

const result = await getimg.models.seedreamV4.textToImage({
  prompt: 'A futuristic city at sunset, cinematic lighting',
  aspect_ratio: '16:9',
  response_format: 'url',
});

console.log(result.data?.url);

Models

Seedream 4.0

Generates 4K high-quality images from a text prompt.

const result = await getimg.models.seedreamV4.textToImage({
  prompt: 'Astronaut riding a horse on Mars, photorealistic',
  aspect_ratio: '16:9',
  seed: 42,
  response_format: 'url', // 'url' | 'b64'
});

Parameters

| Parameter | Type | Default | Description | |---|---|---|---| | prompt | string | — | Text description of the image (required) | | aspect_ratio | string | 1:1 | 1:1 · 16:9 · 9:16 · 3:2 · 2:3 · 3:4 · 4:3 · 21:9 | | seed | number | — | Fix seed for reproducible results | | response_format | string | b64 | url or b64 |


FLUX.1 Schnell

Fast, high-quality text-to-image generation.

const result = await getimg.models.fluxSchnell.textToImage({
  prompt: 'A serene mountain lake at dawn',
  width: 1024,
  height: 1024,
  steps: 4,
  response_format: 'url',
});

Parameters

| Parameter | Type | Description | |---|---|---| | prompt | string | Text description of the image (required) | | width | number | Output image width in pixels | | height | number | Output image height in pixels | | steps | number | Number of diffusion steps | | seed | number | Fix seed for reproducible results | | output_format | string | jpeg or png | | response_format | string | url or b64 |


API Reference

List All Models

// List all available models
const { data } = await getimg.listAllModels();

// Filter by family or pipeline
const { data } = await getimg.listAllModels({
  family: 'seedream-v4',
  pipeline: 'text-to-image',
});
[
  {
    "id": "stable-diffusion-v1-5",
    "name": "Stable Diffusion v1.5",
    "family": "stable-diffusion",
    "pipelines": ["text-to-image", "image-to-image", "controlnet"],
    "base_resolution": { "width": 512, "height": 512 },
    "price": 0.00045,
    "created_at": "2023-05-23T18:51:22.297Z"
  }
]

Retrieve a Model

const { data } = await getimg.retrieveModel({ id: 'stable-diffusion-v1-5' });
console.log(data?.name);

Account Balance

const { data } = await getimg.account.retrieveBalance();
console.log(`Balance: $${data?.amount}`);

Legacy Endpoints

[!WARNING] The following model families are deprecated legacy endpoints. They remain functional but are no longer recommended. Migrate to seedreamV4 or fluxSchnell for new projects.

StableDiffusion

textToImage · imageToImage · controlNet · inpainting · instruct

StableDiffusionXL

textToImage · imageToImage · inpainting · ipAdapter

EssentialV2

textToImage

LatentConsistency

textToImage · imageToImage

Enhancements

upscale · fixFaces

// Legacy usage example
const result = await getimg.models.stableDiffusion.textToImage({
  prompt: 'A beautiful landscape',
});

Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a new branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m 'feat: add my feature'
  4. Push and open a pull request