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

@genwave/svgmaker-sdk

v1.0.0

Published

Official Node.js SDK for SVGMaker API

Downloads

246

Readme

SVGMaker SDK for Node.js

Official Node.js SDK for the SVGMaker API, providing a clean, type-safe interface for generating, editing, and converting SVG graphics using AI.

npm version License

Upgrading to v1.0.0

v1.0.0 includes breaking changes. If you're upgrading from v0.x, see the Migration Guide for full details. Top breaking changes:

  • Base URL changed — now targets api.svgmaker.io (automatic if using defaults)
  • client.convert restructured — old client.convert.configure(...) is now client.convert.aiVectorize.configure(...), plus new sub-clients for tracing, format conversion, and batch operations
  • styleParams redesigned — new style values (flat, line_art, engraving, ghibli, ...), advanced block removed, new text field added
  • Aspect ratio wide/tall removed — only auto, portrait, landscape, square remain
  • model parameter: New option on generate and edit — mutually exclusive with quality
  • Cloud storage no longer default — generate, edit, and AI vectorize no longer store results to cloud by default; pass storage: true to persist

Features

  • Complete API Coverage: Generate, edit, convert, optimize, and manage SVGs
  • TypeScript Native: Full type safety with comprehensive type definitions
  • Automatic Retries: Built-in retry logic with exponential backoff
  • Streaming Support: Real-time progress updates via Server-Sent Events
  • Input Validation: Zod-based schema validation for all requests
  • Dual Package: ESM and CommonJS support

Installation

npm install @genwave/svgmaker-sdk

Requires Node.js 18.0.0 or higher.

Quick Start

import { SVGMakerClient } from '@genwave/svgmaker-sdk';

const client = new SVGMakerClient('your-api-key');

// Generate an SVG
const result = await client.generate
  .configure({
    prompt: 'A minimalist mountain landscape',
    quality: 'high',
    svgText: true,
  })
  .execute();

console.log('SVG URL:', result.svgUrl);
console.log('Credits used:', result.creditCost);

// Edit an existing image
const edited = await client.edit
  .configure({
    image: './input.png',
    prompt: 'Add a red border',
    quality: 'medium',
  })
  .execute();

// AI-powered vectorization
const vectorized = await client.convert.aiVectorize
  .configure({ file: './photo.jpg', svgText: true })
  .execute();

// Stream progress for long operations
const stream = client.generate
  .configure({ prompt: 'A detailed cityscape', quality: 'high' })
  .stream();

for await (const event of stream) {
  if (event.status === 'complete') console.log('Done:', event.svgUrl);
}

Available Clients

| Client | Access | Description | |--------|--------|-------------| | generate | client.generate | Create SVGs from text prompts | | edit | client.edit | Modify existing images/SVGs with AI | | convert.aiVectorize | client.convert.aiVectorize | AI-powered raster to SVG conversion | | convert.trace | client.convert.trace | Algorithmic raster to SVG tracing | | convert.svgToVector | client.convert.svgToVector | SVG to vector formats (PDF, EPS, DXF, AI, PS) | | convert.rasterToRaster | client.convert.rasterToRaster | Convert between raster formats | | convert.batch | client.convert.batch | Batch convert up to 10 files | | enhancePrompt | client.enhancePrompt | Improve text prompts using AI | | optimizeSvg | client.optimizeSvg | Optimize SVG files using SVGO | | generations | client.generations | Manage your generations (list, download, share, delete) | | gallery | client.gallery | Browse and download public gallery items | | account | client.account | Account info and usage statistics |

Most clients use the configure().execute() pattern. generations, gallery, and account use direct methods (e.g., client.generations.list(), client.account.getInfo()).

Error Handling

import { SVGMakerClient, Errors } from '@genwave/svgmaker-sdk';

try {
  const result = await client.generate
    .configure({ prompt: 'A landscape' })
    .execute();
} catch (error) {
  if (error instanceof Errors.RateLimitError) {
    console.error('Rate limited. Retry after:', error.retryAfter, 'seconds');
  } else if (error instanceof Errors.InsufficientCreditsError) {
    console.error('Insufficient credits. Required:', error.creditsRequired);
  } else if (error instanceof Errors.AuthError) {
    console.error('Authentication failed:', error.message);
  } else if (error instanceof Errors.APIError) {
    console.error('API error:', error.message, error.statusCode);
  }
}

See the SDK Documentation for the full list of error types.

Documentation

Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

License

MIT License - see the LICENSE file for details.

Support