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

getpronto-sdk

v1.3.1

Published

A JavaScript/TypeScript SDK for the GetPronto API. This SDK allows you to manage files and images on the GetPronto platform.

Readme

GetPronto SDK

A JavaScript/TypeScript SDK for the GetPronto API. This SDK allows you to manage files and images on the GetPronto platform.

Full documentation can be found in our docs area.

Installation

npm install getpronto-sdk

Usage

Initializing the Client

import GetProntoClient from "getpronto-sdk";

const client = new GetProntoClient({
  apiKey: "YOUR_API_KEY",
  baseUrl: "https://api.getpronto.io/v1", // Optional, defaults to this
});

File Operations

Uploading Files

The SDK supports multiple file input types:

1. Using a local file path

const result = await client.files.upload("./path/to/file.jpg");

2. Using a remote URL

const result = await client.files.upload("https://example.com/image.jpg");

3. Using a Buffer

const buffer = Buffer.from("Hello World");
const result = await client.files.upload(buffer, {
  filename: "hello.txt",
  mimeType: "text/plain"
});

4. Using a Data URL

const dataUrl = "data:text/plain;base64,SGVsbG8gV29ybGQ=";
const result = await client.files.upload(dataUrl);

5. Using a File object

const file = new File(["hello"], "hello.txt");
const result = await client.files.upload(file);

Custom Filename and MIME Type

You can specify a custom filename and MIME type with any upload method:

const result = await client.files.upload(file, {
  filename: "custom-name.jpg",
  mimeType: "image/jpeg"
});

List Files

const files = await client.files.list();

// With pagination
const page2 = await client.files.list({
  page: 2,
  pageSize: 10
});

Get File Details

const fileDetails = await client.files.get("file-id");

Delete a File

await client.files.delete("file-id");

Get Allowed File Types

// Get all allowed MIME types
const mimeTypes = client.files.getAllowedMimeTypes();

// Get all allowed file extensions
const extensions = client.files.getAllowedExtensions();

// Check if a specific MIME type is allowed
const isAllowed = client.files.isAllowedMimeType("image/jpeg");

Image Transformations

The SDK provides a fluent interface for transforming images. You can chain multiple transformations together and then either get a URL for the transformed image or download the transformed image directly.

Get a Transformed Image URL

// Generate a URL for the transformed image
const imageUrl = await client.images
  .transform("image-id")
  .resize(800, 600)
  .grayscale()
  .quality(90)
  .toURL();

Available Transformations

The SDK supports the following image transformations:

Resize

// Resize to specific dimensions (width, height, fit)
// Fit options: "cover", "contain", "fill", "inside", "outside"
.resize(800, 600, "cover")

// Resize to width only
.resize(800)

// Resize to height only
.resize(undefined, 600)

Quality

// Set quality (1-100)
.quality(90)

Blur

// Apply Gaussian blur (0.3-1000)
.blur(5)

Sharpening

// Apply image sharpening
.sharpen()

Grayscale

// Convert to grayscale
.grayscale()

Rotation

// Rotate image by degrees (-360 to 360)
.rotate(90)

Border

// Add a border (width in pixels, color in hex)
.border(5, "FF0000")  // 5px red border

Crop

// Crop image (x, y, width, height)
.crop(100, 100, 500, 500)

Format Conversion

// Convert to a specific format
.format("webp")  // Options: "jpeg", "png", "webp", "avif", etc.

Example: Multiple Transformations

// Chain multiple transformations
const imageUrl = await client.images
  .transform("image-id")
  .resize(800, 600)
  .quality(90)
  .grayscale()
  .blur(2)
  .format("webp")
  .toURL();

Advanced: Get the Transformed Image as a Blob

In some cases, you might need the actual image data rather than just a URL. For these scenarios, use the transform() method:

// Get the transformed image as a Blob
const imageBlob = await client.images
  .transform("image-id")
  .resize(800, 600)
  .grayscale()
  .transform();

// Example: Create an object URL from the blob
const objectUrl = URL.createObjectURL(imageBlob);

Use with AI Agents

Get Pronto works natively with AI agents like Claude Code and Cursor via the getpronto-mcp server. Agents can upload, transform, and manage images using MCP tools.

Add to your Claude Code MCP config (.mcp.json):

{
  "mcpServers": {
    "getpronto": {
      "command": "npx",
      "args": ["-y", "getpronto-mcp"],
      "env": {
        "GETPRONTO_API_KEY": "pronto_sk_..."
      }
    }
  }
}

Or omit the API key — the agent can generate a free ephemeral test key on demand (100MB storage, 7-day TTL, no signup required).

See the getpronto-mcp README for full details.

Error Handling

The SDK uses custom error classes for better error handling:

try {
  const result = await client.files.upload(file);
  console.log("Upload successful:", result);
} catch (error) {
  if (error.name === "APIError") {
    console.error(`API Error (${error.status}): ${error.message}`);
  } else {
    console.error("Upload error:", error);
  }
}

Publishing

npm login --registry https://registry.npmjs.org
npm publish --registry https://registry.npmjs.org/

License

MIT