Crispix JavaScript SDK & Free Client API for Developers

Crispix offers a 100% free, client-side JavaScript SDK that allows developers to run state-of-the-art AI image upscaling and enhancement directly in the user’s browser.

No API keys, no monthly fees, and zero server GPU costs for your infrastructure.


Key Features


Quick Start

1. Include SDK in your Web App

You can import the SDK directly as an ES module:

import { CrispixSDK } from 'https://crispix.nibies.space/sdk.js';

// Initialize SDK pointing to Crispix model assets
const crispix = new CrispixSDK({
  baseUrl: 'https://crispix.nibies.space'
});

Or preload the AI model in the background:

// Preload model cache
await crispix.preload('general');

Usage Examples

Upscale Image from File Input / Blob

const fileInput = document.querySelector('input[type="file"]');

fileInput.addEventListener('change', async (e) => {
  const file = e.target.files[0];
  if (!file) return;

  console.log('Upscaling image...');

  const result = await crispix.enhance(file, {
    model: 'general', // 'general' | 'anime'
    scale: 4,         // 2 | 4
    filters: {
      sharpen: 15,
      denoise: 10
    },
    outputFormat: 'image/png', // 'image/png' | 'image/jpeg' | 'image/webp'
    onProgress: (percent) => {
      console.log(`Progress: ${Math.round(percent * 100)}%`);
    }
  });

  console.log(`Finished using ${result.backend} (Width: ${result.width}, Height: ${result.height})`);

  // Display or download
  const imgElement = document.getElementById('preview');
  imgElement.src = result.dataUrl;
});

API Reference

new CrispixSDK(options)

crispix.enhance(blob, options)

Returns: Promise<EnhanceResult>

interface EnhanceResult {
  blob: Blob;
  dataUrl: string;
  width: number;
  height: number;
  backend: 'webgpu' | 'wasm';
}