Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

prodia

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prodia

Official TypeScript integration for Prodia's AI inference API.

latest
npmnpm
Version
1.6.0
Version published
Maintainers
2
Created
Source

Prodia

npm version Validate Formatting & Types

Official TypeScript library for Prodia's AI inference API.

Usage

[!NOTE] Requires Node >= 18 or Deno >= 2

npm install prodia --save

v2

As of October 2024, we require users to have a Pro+ or Enterprise subscription with us to use our v2 API. This is to ensure quality of service. However, we expect to revisit this by EOY and make it available more broadly.

import fs from "node:fs/promises";
import { createProdia } from "prodia/v2"; // v2 :)

const prodia = createProdia({
	token: process.env.PRODIA_TOKEN, // grab a token from https://app.prodia.com/api
});

(async () => {
	// run a flux dev generation
	const job = await prodia.job({
		type: "inference.flux.dev.txt2img.v1",
		config: {
			prompt: "puppies in a cloud, 4k",
			steps: 25,
		},
	});

	const image = await job.arrayBuffer();

	await fs.writeFile("puppies.jpg", new Uint8Array(image));

	// open puppies.jpg
})();

v1 Legacy API

import { createProdia } from "prodia";

const prodia = createProdia({
	apiKey: "...",
});

(async () => {
	const job = await prodia.generate({
		prompt: "puppies in a cloud, 4k",
	});

	const { imageUrl, status } = await prodia.wait(job);

	// check status and view your image :)
})();

help

Email us at hello@prodia.com.

FAQs

Package last updated on 22 Apr 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts