@todoforai/image-api 2.2.3 → 2.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.js +5 -5
- package/package.json +2 -2
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2129,8 +2129,8 @@ var require_commander = __commonJS((exports) => {
|
|
|
2129
2129
|
// package.json
|
|
2130
2130
|
var package_default = {
|
|
2131
2131
|
name: "@todoforai/image-api",
|
|
2132
|
-
version: "2.2.
|
|
2133
|
-
description: "AI image generation and editing through TODOforAI (gpt-image)",
|
|
2132
|
+
version: "2.2.4",
|
|
2133
|
+
description: "AI image generation and editing through TODOforAI (gpt-image, nano-banana, mai-image)",
|
|
2134
2134
|
type: "module",
|
|
2135
2135
|
bin: {
|
|
2136
2136
|
"tfa-imagegen": "dist/index.js"
|
|
@@ -2284,7 +2284,7 @@ async function runImageGen(content, opts) {
|
|
|
2284
2284
|
}
|
|
2285
2285
|
|
|
2286
2286
|
// src/commands/generate.ts
|
|
2287
|
-
var generateCommand = new Command2("generate").description("Generate an image via TODOFORAI's image generation endpoint.").argument("<prompt>", "Image prompt").option("-o, --output <file>", "Output PNG file", "out.png").option("--model <model>", "nano-banana | gpt-image-2 | nano-banana-pro; also: nano-banana-lite", "nano-banana").option("--size <size>", "1024x1024 | 1536x1024 | 1024x1536 | 2048x2048 | 4096x4096", "1024x1024").option("--quality <quality>", "low | medium | high").option("--background <bg>", "auto | transparent | opaque").option("--output_format <fmt>", "png | webp | jpeg", "png").option("--instructions <text>", "System instructions").option("--api-url <url>", "TODOFORAI API URL (default: $TODOFORAI_API_URL or https://api.todofor.ai)").option("--api-key <key>", "TODOFORAI API key").action(async (prompt, opts) => {
|
|
2287
|
+
var generateCommand = new Command2("generate").description("Generate an image via TODOFORAI's image generation endpoint.").argument("<prompt>", "Image prompt").option("-o, --output <file>", "Output PNG file", "out.png").option("--model <model>", "nano-banana | gpt-image-2 | nano-banana-pro | mai-image-2.6 | mai-image-2.6-flash; also: nano-banana-lite, mai-image-2.5", "nano-banana").option("--size <size>", "1024x1024 | 1536x1024 | 1024x1536 | 2048x2048 | 4096x4096", "1024x1024").option("--quality <quality>", "low | medium | high").option("--background <bg>", "auto | transparent | opaque").option("--output_format <fmt>", "png | webp | jpeg", "png").option("--instructions <text>", "System instructions").option("--api-url <url>", "TODOFORAI API URL (default: $TODOFORAI_API_URL or https://api.todofor.ai)").option("--api-key <key>", "TODOFORAI API key").action(async (prompt, opts) => {
|
|
2288
2288
|
await runImageGen([{ type: "input_text", text: prompt }], opts);
|
|
2289
2289
|
});
|
|
2290
2290
|
|
|
@@ -2292,7 +2292,7 @@ var generateCommand = new Command2("generate").description("Generate an image vi
|
|
|
2292
2292
|
var editCommand = new Command2("edit").description(`Edit one or more images via TODOFORAI's image generation endpoint.
|
|
2293
2293
|
|
|
2294
2294
|
` + `Pass --image multiple times to provide reference / edit-target images.
|
|
2295
|
-
` + "Tip: state invariants in the prompt (e.g. 'change only X; keep Y unchanged').").argument("<prompt>", "Edit instruction").requiredOption("-i, --image <path>", "Input image; repeat for multiple images", (v, prev = []) => [...prev, v], []).option("-o, --output <file>", "Output PNG file", "edited.png").option("--model <model>", "nano-banana | gpt-image-2 | nano-banana-pro; also: nano-banana-lite", "nano-banana").option("--size <size>", "1024x1024 | 1536x1024 | 1024x1536 | 2048x2048 | 4096x4096", "1024x1024").option("--quality <quality>", "low | medium | high").option("--background <bg>", "auto | transparent | opaque").option("--output_format <fmt>", "png | webp | jpeg", "png").option("--instructions <text>", "System instructions").option("--api-url <url>", "TODOFORAI API URL").option("--api-key <key>", "TODOFORAI API key").action(async (prompt, opts) => {
|
|
2295
|
+
` + "Tip: state invariants in the prompt (e.g. 'change only X; keep Y unchanged').").argument("<prompt>", "Edit instruction").requiredOption("-i, --image <path>", "Input image; repeat for multiple images", (v, prev = []) => [...prev, v], []).option("-o, --output <file>", "Output PNG file", "edited.png").option("--model <model>", "nano-banana | gpt-image-2 | nano-banana-pro | mai-image-2.6 | mai-image-2.6-flash; also: nano-banana-lite, mai-image-2.5", "nano-banana").option("--size <size>", "1024x1024 | 1536x1024 | 1024x1536 | 2048x2048 | 4096x4096", "1024x1024").option("--quality <quality>", "low | medium | high").option("--background <bg>", "auto | transparent | opaque").option("--output_format <fmt>", "png | webp | jpeg", "png").option("--instructions <text>", "System instructions").option("--api-url <url>", "TODOFORAI API URL").option("--api-key <key>", "TODOFORAI API key").action(async (prompt, opts) => {
|
|
2296
2296
|
const imagePaths = opts.image ?? [];
|
|
2297
2297
|
if (imagePaths.length === 0) {
|
|
2298
2298
|
console.error("Error: at least one --image is required.");
|
|
@@ -2307,7 +2307,7 @@ var editCommand = new Command2("edit").description(`Edit one or more images via
|
|
|
2307
2307
|
|
|
2308
2308
|
// src/index.ts
|
|
2309
2309
|
program.name("tfa-imagegen").description(`Image generation & editing CLI via TODOFORAI backend.
|
|
2310
|
-
` + "Models (--model): nano-banana (default, $0.02, general), gpt-image-2 (best for infographics/text-heavy), nano-banana-pro ($0.15, complex composition). Also: nano-banana-lite ($0.04, fastest, 1K only).").version(package_default.version);
|
|
2310
|
+
` + "Models (--model): nano-banana (default, $0.02, general), gpt-image-2 (best for infographics/text-heavy), nano-banana-pro ($0.15, complex composition). Also: nano-banana-lite ($0.04, fastest, 1K only), mai-image-2.6 ($0.02, Microsoft MAI, fixed 1536\xB2, ~60s; -flash 1024\xB2, ~20s; no size/quality control).").version(package_default.version);
|
|
2311
2311
|
program.addCommand(generateCommand);
|
|
2312
2312
|
program.addCommand(editCommand);
|
|
2313
2313
|
program.parse();
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@todoforai/image-api",
|
|
3
|
-
"version": "2.2.
|
|
4
|
-
"description": "AI image generation and editing through TODOforAI (gpt-image)",
|
|
3
|
+
"version": "2.2.4",
|
|
4
|
+
"description": "AI image generation and editing through TODOforAI (gpt-image, nano-banana, mai-image)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"tfa-imagegen": "dist/index.js"
|