@todoforai/image-api 2.2.0 → 2.2.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @todoforai/image-api
2
2
 
3
- Generate and edit images through the TODOforAI backend (gpt-image).
3
+ Generate and edit images through the TODOforAI backend (gpt-image, nano-banana, nano-banana-pro).
4
4
 
5
5
  ## Install
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todoforai/image-api",
3
- "version": "2.2.0",
3
+ "version": "2.2.1",
4
4
  "description": "AI image generation and editing through TODOforAI (gpt-image)",
5
5
  "type": "module",
6
6
  "bin": {
@@ -15,7 +15,7 @@ export const editCommand = new Command("edit")
15
15
  [],
16
16
  )
17
17
  .option("-o, --output <file>", "Output PNG file", "edited.png")
18
- .option("--model <model>", "Model (default: gpt-image-2)")
18
+ .option("--model <model>", "nano-banana | gpt-image-2 | nano-banana-pro; also: nano-banana-lite", "nano-banana")
19
19
  .option("--size <size>", "1024x1024 | 1536x1024 | 1024x1536 | 2048x2048 | 4096x4096", "1024x1024")
20
20
  .option("--quality <quality>", "low | medium | high")
21
21
  .option("--background <bg>", "auto | transparent | opaque")
@@ -3,19 +3,18 @@ import { runImageGen } from "../imagegen";
3
3
 
4
4
  export const generateCommand = new Command("generate")
5
5
  .description(
6
- "Generate an image via TODOFORAI's image generation endpoint.\n\n" +
7
- "Auth: TODOFORAI_API_TOKEN (bridge-injected) or TODOFORAI_API_KEY env (or --api-key)."
6
+ "Generate an image via TODOFORAI's image generation endpoint."
8
7
  )
9
8
  .argument("<prompt>", "Image prompt")
10
9
  .option("-o, --output <file>", "Output PNG file", "out.png")
11
- .option("--model <model>", "Model (default: gpt-image-2)")
10
+ .option("--model <model>", "nano-banana | gpt-image-2 | nano-banana-pro; also: nano-banana-lite", "nano-banana")
12
11
  .option("--size <size>", "1024x1024 | 1536x1024 | 1024x1536 | 2048x2048 | 4096x4096", "1024x1024")
13
12
  .option("--quality <quality>", "low | medium | high")
14
13
  .option("--background <bg>", "auto | transparent | opaque")
15
14
  .option("--output_format <fmt>", "png | webp | jpeg", "png")
16
15
  .option("--instructions <text>", "System instructions")
17
16
  .option("--api-url <url>", "TODOFORAI API URL (default: $TODOFORAI_API_URL or https://api.todofor.ai)")
18
- .option("--api-key <key>", "TODOFORAI API key (default: $TODOFORAI_API_TOKEN or $TODOFORAI_API_KEY)")
17
+ .option("--api-key <key>", "TODOFORAI API key")
19
18
  .action(async (prompt: string, opts) => {
20
19
  await runImageGen([{ type: "input_text", text: prompt }], opts);
21
20
  });
package/src/index.ts CHANGED
@@ -6,9 +6,8 @@ import { editCommand } from "./commands/edit";
6
6
  program
7
7
  .name("tfa-imagegen")
8
8
  .description(
9
- "Image generation & editing CLI via TODOFORAI backend (gpt-image).\n\n" +
10
- "Auth: TODOFORAI_API_TOKEN (bridge-injected) or TODOFORAI_API_KEY env (or --api-key).\n" +
11
- "Run `todoforai login` to store credentials."
9
+ "Image generation & editing CLI via TODOFORAI backend.\n" +
10
+ "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)."
12
11
  )
13
12
  .version("2.2.0");
14
13