// readme

Sogni SDK for JavaScript & Node.js

This library provides an easy way to interact with the Sogni Supernet - a DePIN protocol for creative AI inference. It is written in TypeScript and can be used in both TypeScript and JavaScript projects such as backend Node.js and browser environments.

Behind the scenes this SDK uses a WebSocket connection for communication between clients, server, and workers. It harnesses an event-based API to interact with Supernet to make things super efficient.

Optional Priority mode

Paid Unlimited members can opt a media generation into earlier Fast queue placement with priorityMode: true, network: 'fast', tokenType: 'spark', and billingMode: 'subscription' in projects.create(). It uses 1.5ร— the usual daily and monthly usage credits, behind Premium Spark priority. Existing caps and concurrency stay the same. It changes queue placement, not render speed or quality; no GPU or start time is guaranteed. Leave it off to preserve usage. Pass priorityMode to image, video and audio estimate helpers to include the weighted share in dailyFairUsePct.

Omitting the option preserves standard behavior. Trials,โ€ฆ