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

myth-ai

v0.1.0-beta.5

Published

OpenAPI client for @myth-design/api

Readme

myth-ai

Official TypeScript SDK for the MYTH AI Public API - Programmatic access to MYTH AI's generative design capabilities.

Installation

npm install myth-ai

Authentication

All endpoints require a Bearer token. Get your API key from the MYTH AI dashboard.

import { Configuration, ImagesApi } from 'myth-ai';

const config = new Configuration({
  basePath: 'https://api.myth-ai.com',
  accessToken: 'sk-myth-xxxxx', // Your API key
});

const images = new ImagesApi(config);

Quick Start

List Images

import { ImagesApi, Configuration } from 'myth-ai';

const config = new Configuration({
  basePath: 'https://api.myth-ai.com',
  accessToken: 'sk-myth-xxxxx',
});
const images = new ImagesApi(config);

const result = await images.listImages({
  page: 1,
  pageSize: 10,
});

console.log(`Total: ${result.total}`);
console.log('Images:', result.items);

Create Image from Image

import { ImagesApi, Configuration, RepeatMode } from 'myth-ai';
import { v4 as uuidv4 } from 'uuid';

const result = await images.createImageToImage({
  idempotencyKey: uuidv4(),
  imageToImageAdvancedRequest: {
    url: 'https://example.com/inspiration.jpg',
    width: 1024,
    height: 1024,
    sharpness: 7.5,
    repeatMode: RepeatMode.Block,
  },
});

console.log('Generation ID:', result.id);

// Poll for completion
let image = await images.getImage({ imageId: result.id });
while (image.status === 'PENDING' || image.status === 'PROCESSING') {
  await new Promise(resolve => setTimeout(resolve, 2000));
  image = await images.getImage({ imageId: result.id });
}

if (image.status === 'SUCCESS') {
  console.log('Download URL:', image.url);
}

Upload and Generate

import { UploadsApi, ImagesApi, Configuration } from 'myth-ai';
import { v4 as uuidv4 } from 'uuid';
import { readFileSync } from 'fs';

const uploads = new UploadsApi(config);
const images = new ImagesApi(config);

// Get presigned upload URL
const uploadInfo = await uploads.createUploadUrl({
  idempotencyKey: uuidv4(),
  presignedUploadRequest: {
    contentType: 'image/png',
  },
});

// Upload file to S3
const fileBuffer = readFileSync('./inspiration.png');
await fetch(uploadInfo.presignedUrl, {
  method: 'PUT',
  headers: { 'Content-Type': 'image/png' },
  body: fileBuffer,
});

// Generate pattern using uploaded image
const generation = await images.createImageToImage({
  idempotencyKey: uuidv4(),
  imageToImageAdvancedRequest: {
    url: uploadInfo.s3Url,
    artifactId: uploadInfo.artifactId,
    width: 1024,
    height: 1024,
    sharpness: 5.0,
    repeatMode: RepeatMode.HalfDrop,
  },
});

console.log('Generation ID:', generation.id);

API Endpoints

All URIs are relative to https://api.myth-ai.com

| Method | Endpoint | Description | |--------|----------|-------------| | GET | /v1/images | List images | | GET | /v1/images/{image_id} | Get image details | | POST | /v1/images | Image to Design (advanced) | | POST | /v1/images/extract | Pattern extraction | | POST | /v1/images/prompt-to-image | Image + Text to Design | | POST | /v1/images/seamless | Make seamless | | POST | /v1/images/{image_id}/export | Export image | | POST | /v1/uploads | Get upload URL |

Features

  • Full TypeScript Support - Complete type definitions included
  • ESM & CommonJS - Works in both Node.js and bundlers
  • Async/Await - Modern promise-based API
  • Idempotency - Built-in support for idempotent requests

Rate Limiting

Rate limits are enforced based on your plan:

  • Free: 100 requests/hour (GET), 10/hour (POST)
  • Pro: 1000 requests/hour (GET), 100/hour (POST)

Documentation

License

MIT