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

@imaige/sdk

v0.1.0

Published

Official TypeScript SDK for the Imaige API — image, video, and text generation over a simple HTTP client.

Readme

@imaige/sdk

Official TypeScript SDK for the Imaige API — image, video, and text generation.

Installation

npm install @imaige/sdk
# or
pnpm add @imaige/sdk

Authentication

All requests require an imk_… API key. Provide it via:

  • IMAIGE_API_KEY environment variable, or
  • apiKey option in the ImaigeClient constructor.

Quick start

import { ImaigeClient } from '@imaige/sdk';

const client = new ImaigeClient({ apiKey: process.env.IMAIGE_API_KEY });

// Text-to-image (async enqueue → poll to completion)
const result = await client.generateImageAndWait({
  prompt: 'A serene alpine landscape at sunset',
  model: 'flux-dev',
});
console.log(result.mediaUrls); // ['https://api.imaige.io/media/media/…']

// Non-blocking: get a job handle, then poll manually
const handle = await client.generateImage({ prompt: '…', model: '…' });
console.log(handle.jobId); // 'job_abc123…'
const row = await client.getJob(handle.jobId);
console.log(row.status); // 'pending' | 'processing' | 'complete' | 'error'

CLI

npx imaige --help

# Generate an image and wait for the result
npx imaige generate --prompt "A sunset" --model flux-dev --wait

# List your recent jobs
npx imaige list-jobs --limit 10

# Start the MCP server over stdio (for AI agents)
npx imaige mcp

Set IMAIGE_API_KEY in your environment or pass --api-key imk_… globally.

Available methods

| Method | Route | Description | |---|---|---| | generateImage(req) | POST /v1/images/generate | Text-to-image | | transformImage(req) | POST /v1/images/transform | Image-to-image / inpaint | | upscaleImage(req) | POST /v1/images/upscale | AI upscale | | removeBackground(req) | POST /v1/images/remove-background | Background removal | | svgTrace(req) | POST /v1/images/svg-trace | Raster → SVG vectorization | | analyzeImage(req) | POST /v1/images/analyze | VLM scene analysis | | animateVideo(req) | POST /v1/videos/animate | Image-to-video | | generateText(req) | POST /v1/text/generate | Text generation | | getJob(jobId) | GET /v1/jobs/{id} | Fetch job row | | listJobs(filter?) | GET /v1/jobs | List jobs (paginated) | | waitForJob(jobId) | polls GET /v1/jobs/{id} | Block until terminal | | streamJob(jobId) | GET /v1/jobs/{id}/events | SSE progress stream | | uploadMedia(file, type) | POST /v1/media/upload | Upload a file | | listModels() | GET /models | Available models | | checkQuota(mode?) | GET /jobs/quota | Quota info | | constructPrompt(req) | POST /prompt/construct | Build a model prompt | | listKeys() | GET /v1/keys | List API keys | | createKey(params?) | POST /v1/keys | Create an API key | | deleteKey(keyId) | DELETE /v1/keys/{keyId} | Delete an API key |

Every generation method also has an *AndWait() variant that polls to completion.

Streaming

for await (const event of client.streamJob(jobId)) {
  console.log(event.progress, event.status);
  if (event.terminal) {
    console.log(event.mediaUrls);
    break;
  }
}

MCP server

The SDK ships a stdio MCP server exposing 12 tools (same surface as the HTTP API):

# Launch manually
IMAIGE_API_KEY=imk_… imaige mcp

# Or embed in your own server
import { buildMcpServer } from '@imaige/sdk';
import { ImaigeClient } from '@imaige/sdk';
const server = buildMcpServer(new ImaigeClient({ apiKey: '…' }));

Configuration

const client = new ImaigeClient({
  apiKey: 'imk_…',
  baseUrl: 'https://api.imaige.io',  // default
  requestTimeoutMs: 60_000,          // per-request timeout (default 60 s)
  pollIntervalMs: 2_000,             // waitForJob poll interval (default 2 s)
  waitTimeoutMs: 600_000,            // waitForJob max wait (default 10 min)
});

License

MIT — Copyright (c) 2024 Black Leaf Digital