1.5.0 • Published 5 months ago

prodia v1.5.0

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

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.

1.2.0

7 months ago

1.1.1

8 months ago

1.1.0

8 months ago

1.5.0

5 months ago

1.4.0

6 months ago

1.3.1

6 months ago

1.3.0

6 months ago

1.0.6

9 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

0.3.0

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.0

2 years ago