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

@printcart/sdk-core

v0.1.0

Published

Typed API client for Printcart AI Services (background removal, preflight, image upscale, face crop, bulk QR, face matching). Requires a Printcart API key — see https://printcart.com.

Readme

@printcart/sdk-core

Typed TypeScript client for Printcart's AI Services API — background removal, preflight (DPI score, full checks, AI fix jobs), image upscale, face crop, bulk QR, and AI face matching.

Requires a Printcart API key. This package will run against the real api.printcart.com endpoints, but every request needs a valid sk_acc_live_* key from a real Printcart account — get one from Dashboard → Settings → API Keys at https://www.printcart.com/en/settings.

⚠️ License not finalized yet — see the repo root LICENSE file before distributing this package publicly.

Install

npm install @printcart/sdk-core

Quickstart

import { createPrintcartClient } from '@printcart/sdk-core'

const printcart = createPrintcartClient({ apiKey: process.env.PRINTCART_API_KEY! })

const job = await printcart.backgroundRemoval.run({
  imageUrl: 'https://example.com/photo.jpg',
  subjectType: 'product',
})

console.log(job.output_url) // presigned URL, valid 24h

Server-side proxy pattern (recommended for production)

Never ship your API key in client-side JS shipped to a browser — anyone can read it out of the bundle and spend your token wallet. In a real app, proxy calls through your own backend:

// app/api/bg-remove/route.ts (Next.js Route Handler)
import { createPrintcartClient } from '@printcart/sdk-core'

const printcart = createPrintcartClient({ apiKey: process.env.PRINTCART_API_KEY! })

export async function POST(request: Request) {
  const body = await request.json()
  const job = await printcart.backgroundRemoval.run(body)
  return Response.json(job)
}

Your frontend then calls your own /api/bg-remove, never Printcart directly. See examples/nextjs-app-router (once published) for the full pattern.

Error handling

import { InsufficientTokensError, PrintcartAuthError, PollTimeoutError } from '@printcart/sdk-core'

try {
  await printcart.backgroundRemoval.run({ imageUrl })
} catch (err) {
  if (err instanceof InsufficientTokensError) {
    // err.balance, err.shortfall, err.topUpUrl
  } else if (err instanceof PrintcartAuthError) {
    // bad/revoked/scope-insufficient API key
  } else if (err instanceof PollTimeoutError) {
    // job may still finish server-side; this just means we stopped waiting
  }
}

Modules

| Module | Backend endpoints | Docs | |---|---|---| | backgroundRemoval | /v1/services/bg-remove* | doc-site → AI Services | | preflight | /v1/services/preflight/* | doc-site → AI Services | | upscale | /v1/services/preflight/ai-jobs (convenience wrapper) | doc-site → AI Services | | studio.faceCrop | /v1/services/studio/face-crop* | doc-site → Studio AI | | studio.bulkQr | /v1/services/studio/qr/generate | doc-site → Studio AI | | studio.faceMatching | /v1/services/studio/matching/* | doc-site → Studio AI |

Full field-level reference lives in Printcart's own API docs — this SDK's types are the living version of those tables, not a replacement for them.