@todoforai/image-api 2.2.7 → 2.2.8
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, nano-banana
|
|
2132
|
+
version: "2.2.8",
|
|
2133
|
+
description: "AI image generation and editing through TODOforAI (gpt-image, nano-banana)",
|
|
2134
2134
|
type: "module",
|
|
2135
2135
|
bin: {
|
|
2136
2136
|
"tfa-imagegen": "dist/index.js"
|
|
@@ -2286,7 +2286,7 @@ async function runImageGen(content, opts) {
|
|
|
2286
2286
|
}
|
|
2287
2287
|
|
|
2288
2288
|
// src/commands/generate.ts
|
|
2289
|
-
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
|
|
2289
|
+
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) => {
|
|
2290
2290
|
await runImageGen([{ type: "input_text", text: prompt }], opts);
|
|
2291
2291
|
});
|
|
2292
2292
|
|
|
@@ -2294,7 +2294,7 @@ var generateCommand = new Command2("generate").description("Generate an image vi
|
|
|
2294
2294
|
var editCommand = new Command2("edit").description(`Edit one or more images via TODOFORAI's image generation endpoint.
|
|
2295
2295
|
|
|
2296
2296
|
` + `Pass --image multiple times to provide reference / edit-target images.
|
|
2297
|
-
` + "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
|
|
2297
|
+
` + "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) => {
|
|
2298
2298
|
const imagePaths = opts.image ?? [];
|
|
2299
2299
|
if (imagePaths.length === 0) {
|
|
2300
2300
|
console.error("Error: at least one --image is required.");
|
|
@@ -2309,7 +2309,7 @@ var editCommand = new Command2("edit").description(`Edit one or more images via
|
|
|
2309
2309
|
|
|
2310
2310
|
// src/index.ts
|
|
2311
2311
|
program.name("tfa-imagegen").description(`Image generation & editing CLI via TODOFORAI backend.
|
|
2312
|
-
` + "Models (--model): nano-banana (default, $0.02, general), gpt-image-2 (best for infographics/text-heavy), nano-banana-pro ($0.27, complex composition). Also: nano-banana-lite ($0.07, fastest, 1K only)
|
|
2312
|
+
` + "Models (--model): nano-banana (default, $0.02, general), gpt-image-2 (best for infographics/text-heavy), nano-banana-pro ($0.27, complex composition). Also: nano-banana-lite ($0.07, fastest, 1K only).").version(package_default.version);
|
|
2313
2313
|
program.addCommand(generateCommand);
|
|
2314
2314
|
program.addCommand(editCommand);
|
|
2315
2315
|
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, nano-banana
|
|
3
|
+
"version": "2.2.8",
|
|
4
|
+
"description": "AI image generation and editing through TODOforAI (gpt-image, nano-banana)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"tfa-imagegen": "dist/index.js"
|