imageforge-mcp 0.5.0 → 0.6.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 +48 -44
- package/dist/externalProviders.d.ts +71 -0
- package/dist/externalProviders.js +891 -0
- package/dist/externalProviders.js.map +1 -0
- package/dist/index.js +60 -13
- package/dist/index.js.map +1 -1
- package/dist/providers.d.ts +32 -2
- package/dist/providers.js +54 -12
- package/dist/providers.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,18 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](#中文说明)
|
|
4
4
|
|
|
5
|
-
A lightweight TypeScript MCP server for image generation
|
|
5
|
+
A lightweight TypeScript MCP server for image generation across 22 first-party providers, plus OpenAI image editing.
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Provider adapters follow each vendor's documented synchronous or submit-and-poll REST contract.
|
|
8
8
|
- OpenAI image editing and reference-image generation use multipart `POST /v1/images/edits`.
|
|
9
9
|
- Generated images are returned as native MCP `image` content blocks and can optionally be saved locally.
|
|
10
10
|
|
|
11
11
|
## Features
|
|
12
12
|
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
- MiniMax models: `image-01`, `image-01-live`
|
|
16
|
-
- MCP tools: `generate_image` and `edit_image`
|
|
13
|
+
- 22 provider IDs: `openai`, `zhipu`, `minimax`, `google`, `xai`, `stability`, `ideogram`, `recraft`, `tencent`, `baidu`, `playground`, `bfl`, `luma`, `krea`, `runway`, `leonardo`, `bria`, `freepik`, `alibaba`, `volcengine`, `kling`, and `hidream`
|
|
14
|
+
- MCP tools: `generate_image`, `list_image_providers`, and `edit_image`
|
|
17
15
|
- Text-to-image generation
|
|
18
16
|
- Image generation guided by one or more reference images
|
|
19
17
|
- Zhipu text-to-image generation with optional server-side watermark control
|
|
@@ -29,16 +27,17 @@ A lightweight TypeScript MCP server for image generation with OpenAI, Zhipu BigM
|
|
|
29
27
|
|
|
30
28
|
## Provider capability matrix
|
|
31
29
|
|
|
32
|
-
|
|
|
33
|
-
| --- | --- | --- |
|
|
34
|
-
|
|
|
35
|
-
|
|
|
36
|
-
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
30
|
+
| Group | Providers | Execution |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| Existing compatibility | OpenAI, Zhipu, MiniMax | Synchronous |
|
|
33
|
+
| Additional synchronous APIs | Google Gemini, xAI, Stability AI, Ideogram, Recraft, Tencent Hunyuan, Baidu Qianfan, Playground, Volcengine Ark | Synchronous |
|
|
34
|
+
| Task APIs | Black Forest Labs, Luma, Krea, Runway, Leonardo, Bria, Freepik/Magnific, Alibaba Model Studio, Kling, HiDream | Submit once, then poll read-only status endpoints |
|
|
35
|
+
|
|
36
|
+
Call `list_image_providers` for known models, built-in default models, reference modes and limits, required environment-variable names, documentation URLs, and contract-verification state. The `models` list is informational, not exhaustive; `model_allowlist_enforced: false` means unlisted model names are accepted. New 0.6.0 adapters are implemented from official documentation and covered by mocks; they are not represented as live credential verification.
|
|
37
|
+
|
|
38
|
+
Model selection uses the first nonblank value in this order: the tool's `model` argument, the selected provider's model environment variable (for example `OPENAI_IMAGE_MODEL`), then its built-in default. To use your configured model, omit `model`. An explicit name such as `gpt-image-2.5` or a gateway alias overrides the environment and is not replaced with a known model. Model availability is decided by your provider; accepting a name does not guarantee that the model supports the adapter's API or parameters.
|
|
39
|
+
|
|
40
|
+
`generate_image` keeps the existing common fields and adds `reference_mode` (`auto`, `content`, `style`, or `character`), `aspect_ratio`, `resolution`, `negative_prompt`, and `seed`. Unsupported combinations fail before provider access. `edit_image` remains OpenAI-only.
|
|
42
41
|
|
|
43
42
|
## Zhipu BigModel support
|
|
44
43
|
|
|
@@ -87,14 +86,14 @@ Compatibility depends on the gateway implementation rather than its product name
|
|
|
87
86
|
- Text-to-image requires `POST /v1/images/generations`.
|
|
88
87
|
- Reference-image generation and editing require multipart `POST /v1/images/edits` with `image[]` file forwarding.
|
|
89
88
|
- Responses must include Base64 image data in `data[0].b64_json`.
|
|
90
|
-
- The configured model name
|
|
89
|
+
- The gateway must accept the requested/configured model name and the Images API request format. `gpt-image-2` is the built-in fallback, not a required model name.
|
|
91
90
|
|
|
92
91
|
A gateway that only implements `/v1/images/generations` can be used for text-to-image generation, but not for reference-image generation or editing.
|
|
93
92
|
|
|
94
93
|
## Requirements
|
|
95
94
|
|
|
96
95
|
- Node.js 22 or later
|
|
97
|
-
- A credential for the selected provider
|
|
96
|
+
- A credential for the selected provider; see `.env.example` or `list_image_providers`
|
|
98
97
|
|
|
99
98
|
## Install and build
|
|
100
99
|
|
|
@@ -124,7 +123,7 @@ For production use, start the published npm package with `npx`. No repository cl
|
|
|
124
123
|
}
|
|
125
124
|
```
|
|
126
125
|
|
|
127
|
-
`-y` allows `npx` to download or update the package without an interactive install prompt. Pin a specific version when reproducible deployments are required, for example `"imageforge-mcp@0.
|
|
126
|
+
`-y` allows `npx` to download or update the package without an interactive install prompt. Pin a specific version when reproducible deployments are required, for example `"imageforge-mcp@0.6.0"`.
|
|
128
127
|
|
|
129
128
|
For a Zhipu-default MCP server, use an independent credential and provider configuration:
|
|
130
129
|
|
|
@@ -133,7 +132,7 @@ For a Zhipu-default MCP server, use an independent credential and provider confi
|
|
|
133
132
|
"mcpServers": {
|
|
134
133
|
"imageforge-zhipu": {
|
|
135
134
|
"command": "npx",
|
|
136
|
-
"args": ["-y", "imageforge-mcp@0.
|
|
135
|
+
"args": ["-y", "imageforge-mcp@0.6.0"],
|
|
137
136
|
"env": {
|
|
138
137
|
"IMAGEFORGE_PROVIDER": "zhipu",
|
|
139
138
|
"ZHIPU_API_KEY": "your-zhipu-token",
|
|
@@ -153,7 +152,7 @@ For a MiniMax-default server:
|
|
|
153
152
|
"mcpServers": {
|
|
154
153
|
"imageforge-minimax": {
|
|
155
154
|
"command": "npx",
|
|
156
|
-
"args": ["-y", "imageforge-mcp@0.
|
|
155
|
+
"args": ["-y", "imageforge-mcp@0.6.0"],
|
|
157
156
|
"env": {
|
|
158
157
|
"IMAGEFORGE_PROVIDER": "minimax",
|
|
159
158
|
"MINIMAX_API_KEY": "your-minimax-token",
|
|
@@ -176,6 +175,8 @@ The value must point to the gateway's `/v1` root. ImageForge MCP appends `/image
|
|
|
176
175
|
|
|
177
176
|
`IMAGEFORGE_INPUT_CONCURRENCY` optionally controls how many local or remote input images are loaded at once. It defaults to `4`, must be a positive integer, and is capped at the per-call limit of `16` input images. The combined input size remains capped at 200 MB.
|
|
178
177
|
|
|
178
|
+
Task-based providers submit a paid generation request exactly once and then poll read-only status endpoints. `IMAGEFORGE_ASYNC_TIMEOUT_MS` defaults to `300000` and accepts 30000–600000; `IMAGEFORGE_POLL_INTERVAL_MS` defaults to `2000` and accepts 500–10000. Polling honors numeric `Retry-After` values within the same bounds. ImageForge does not use webhooks, retry a paid create call, or fall back to another provider.
|
|
179
|
+
|
|
179
180
|
DNS safety checks are enabled by default. Set `IMAGEFORGE_SKIP_DNS_SAFETY_CHECKS=true` only when private-network or DNS-proxy image URLs must be supported. This disables non-public address rejection and DNS pinning for every redirect hop, which can expose the MCP process to SSRF. HTTP(S)-only URLs, the credential restriction, redirect limit, size limits, and image signature validation remain enforced. Accepted true values are `true`, `1`, `yes`, and `on`; false values are `false`, `0`, `no`, and `off`.
|
|
180
181
|
|
|
181
182
|
Do not commit real API keys to Git or write them into shared configuration files.
|
|
@@ -222,6 +223,7 @@ For MiniMax, export `IMAGEFORGE_PROVIDER=minimax`, `MINIMAX_API_KEY`, and option
|
|
|
222
223
|
Codex loads project-scoped `.codex/config.toml` only for trusted projects. After adding or changing the MCP configuration, restart Codex or open a new task, then use `/mcp verbose` to confirm that `imageforge_dev` exposes:
|
|
223
224
|
|
|
224
225
|
- `generate_image`
|
|
226
|
+
- `list_image_providers`
|
|
225
227
|
- `edit_image`
|
|
226
228
|
|
|
227
229
|
After changing the TypeScript source, rebuild `dist/index.js` and restart the task using the MCP server:
|
|
@@ -237,7 +239,7 @@ See the [official Codex MCP documentation](https://developers.openai.com/codex/m
|
|
|
237
239
|
| Parameter | Required | Default | Description |
|
|
238
240
|
| --- | --- | --- | --- |
|
|
239
241
|
| `prompt` | Yes | - | Image description |
|
|
240
|
-
| `model` | No | Environment or provider default |
|
|
242
|
+
| `model` | No | Environment or provider default | Any provider model name; overrides the environment. Known examples: OpenAI `gpt-image-2`, Zhipu models above, MiniMax `image-01` / `image-01-live`. No model allowlist. |
|
|
241
243
|
| `base_url` | No | Provider environment variable or official default | Per-call provider API base URL override |
|
|
242
244
|
| `api_key` | No | Provider-specific API key | Per-call provider credential override; environment variables are preferred |
|
|
243
245
|
| `provider` | No | `IMAGEFORGE_PROVIDER`, then `openai` | `openai`, `zhipu`, or `minimax` |
|
|
@@ -369,18 +371,16 @@ Tests use a local HTTP mock. They do not call a real image API or incur generati
|
|
|
369
371
|
|
|
370
372
|
# 中文说明
|
|
371
373
|
|
|
372
|
-
ImageForge MCP 是一个轻量的 TypeScript MCP 图片生成与编辑服务,支持
|
|
374
|
+
ImageForge MCP 是一个轻量的 TypeScript MCP 图片生成与编辑服务,支持 22 个原厂生图 Provider,并保留 OpenAI 图片编辑能力。
|
|
373
375
|
|
|
374
|
-
-
|
|
376
|
+
- 各 Provider 按官方同步接口或“提交任务后轮询”REST 契约调用。
|
|
375
377
|
- OpenAI 图片编辑和参考图生图调用 multipart `POST /v1/images/edits`。
|
|
376
378
|
- 生成结果以原生 MCP `image` 内容块返回,也可以同时保存到本地。
|
|
377
379
|
|
|
378
380
|
## 功能
|
|
379
381
|
|
|
380
|
-
-
|
|
381
|
-
-
|
|
382
|
-
- MiniMax 模型:`image-01`、`image-01-live`
|
|
383
|
-
- MCP 工具:`generate_image`、`edit_image`
|
|
382
|
+
- 22 个 Provider ID:`openai`、`zhipu`、`minimax`、`google`、`xai`、`stability`、`ideogram`、`recraft`、`tencent`、`baidu`、`playground`、`bfl`、`luma`、`krea`、`runway`、`leonardo`、`bria`、`freepik`、`alibaba`、`volcengine`、`kling`、`hidream`
|
|
383
|
+
- MCP 工具:`generate_image`、`list_image_providers`、`edit_image`
|
|
384
384
|
- 支持纯文本生图
|
|
385
385
|
- 支持一张或多张参考图引导生图
|
|
386
386
|
- 支持 MiniMax 单张主体参考图生图
|
|
@@ -395,16 +395,17 @@ ImageForge MCP 是一个轻量的 TypeScript MCP 图片生成与编辑服务,
|
|
|
395
395
|
|
|
396
396
|
## 供应商能力矩阵
|
|
397
397
|
|
|
398
|
-
|
|
|
399
|
-
| --- | --- | --- |
|
|
400
|
-
|
|
|
401
|
-
|
|
|
402
|
-
|
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
398
|
+
| 分组 | Provider | 执行方式 |
|
|
399
|
+
| --- | --- | --- |
|
|
400
|
+
| 现有兼容 | OpenAI、智谱、MiniMax | 同步 |
|
|
401
|
+
| 新增同步接口 | Google Gemini、xAI、Stability AI、Ideogram、Recraft、腾讯混元、百度千帆、Playground、火山方舟 | 同步 |
|
|
402
|
+
| 任务型接口 | Black Forest Labs、Luma、Krea、Runway、Leonardo、Bria、Freepik/Magnific、阿里 Model Studio、Kling、HiDream | 创建一次,随后只读轮询 |
|
|
403
|
+
|
|
404
|
+
调用 `list_image_providers` 可查询已适配模型、内置默认模型、参考图模式和上限、环境变量名、官方文档地址与合约验证状态。`models` 仅为参考清单,并非完整列表;`model_allowlist_enforced: false` 表示接受清单之外的模型名称。0.6.0 新增适配器均按官方文档和 Mock 合约测试实现,不宣称已经使用真实密钥验收。
|
|
405
|
+
|
|
406
|
+
模型按第一个非空值选择,优先级为:工具传入的 `model` → 对应供应商的模型环境变量(如 `OPENAI_IMAGE_MODEL`)→ 内置默认模型。要使用已配置的模型,请省略 `model`。显式传入 `gpt-image-2.5` 或网关自定义别名时,会覆盖环境变量,不会被替换为清单内的模型。模型是否可用由供应商决定;接受模型名称不代表该模型一定兼容当前适配器使用的接口和参数。
|
|
407
|
+
|
|
408
|
+
`generate_image` 在原参数上新增 `reference_mode`(`auto`、`content`、`style`、`character`)、`aspect_ratio`、`resolution`、`negative_prompt` 和 `seed`;不支持的组合会在访问供应商前失败。`edit_image` 仍仅支持 OpenAI。
|
|
408
409
|
|
|
409
410
|
## 智谱 BigModel 支持
|
|
410
411
|
|
|
@@ -453,14 +454,14 @@ ImageForge MCP 不仅支持 OpenAI 官方接口,也支持实现了 OpenAI Imag
|
|
|
453
454
|
- 纯文本生图需要实现 `POST /v1/images/generations`。
|
|
454
455
|
- 参考图生图和图片编辑需要实现 multipart `POST /v1/images/edits`,并正确转发 `image[]` 文件。
|
|
455
456
|
- 响应需要在 `data[0].b64_json` 中返回 Base64 图片数据。
|
|
456
|
-
-
|
|
457
|
+
- 网关需要接受实际传入或配置的模型名称与 Images API 请求格式;`gpt-image-2` 是内置回退值,不是强制模型名。
|
|
457
458
|
|
|
458
459
|
如果网关只实现了 `/v1/images/generations`,仍可用于纯文本生图,但不能使用参考图生图和图片编辑。
|
|
459
460
|
|
|
460
461
|
## 环境要求
|
|
461
462
|
|
|
462
463
|
- Node.js 22 或更高版本
|
|
463
|
-
-
|
|
464
|
+
- 所选 Provider 的凭据;完整变量名见 `.env.example` 或 `list_image_providers`
|
|
464
465
|
|
|
465
466
|
## 安装与构建
|
|
466
467
|
|
|
@@ -490,7 +491,7 @@ npm run build
|
|
|
490
491
|
}
|
|
491
492
|
```
|
|
492
493
|
|
|
493
|
-
`-y` 允许 `npx` 在没有交互式安装提示的情况下下载或更新包。如果部署需要固定版本,可将包名写成 `"imageforge-mcp@0.
|
|
494
|
+
`-y` 允许 `npx` 在没有交互式安装提示的情况下下载或更新包。如果部署需要固定版本,可将包名写成 `"imageforge-mcp@0.6.0"`。
|
|
494
495
|
|
|
495
496
|
如果希望 MCP 默认使用智谱,应使用独立的智谱凭据与供应商配置:
|
|
496
497
|
|
|
@@ -499,7 +500,7 @@ npm run build
|
|
|
499
500
|
"mcpServers": {
|
|
500
501
|
"imageforge-zhipu": {
|
|
501
502
|
"command": "npx",
|
|
502
|
-
"args": ["-y", "imageforge-mcp@0.
|
|
503
|
+
"args": ["-y", "imageforge-mcp@0.6.0"],
|
|
503
504
|
"env": {
|
|
504
505
|
"IMAGEFORGE_PROVIDER": "zhipu",
|
|
505
506
|
"ZHIPU_API_KEY": "你的智谱令牌",
|
|
@@ -519,7 +520,7 @@ MiniMax 默认配置示例:
|
|
|
519
520
|
"mcpServers": {
|
|
520
521
|
"imageforge-minimax": {
|
|
521
522
|
"command": "npx",
|
|
522
|
-
"args": ["-y", "imageforge-mcp@0.
|
|
523
|
+
"args": ["-y", "imageforge-mcp@0.6.0"],
|
|
523
524
|
"env": {
|
|
524
525
|
"IMAGEFORGE_PROVIDER": "minimax",
|
|
525
526
|
"MINIMAX_API_KEY": "你的-MiniMax-令牌",
|
|
@@ -542,6 +543,8 @@ MiniMax 默认配置示例:
|
|
|
542
543
|
|
|
543
544
|
`IMAGEFORGE_INPUT_CONCURRENCY` 可选,用于控制同时加载的本地或远程输入图片数量。默认值为 `4`,必须是正整数,并直接受单次最多 `16` 张输入图片的限制。单次调用的输入图片合计大小仍固定限制为 200 MB。
|
|
544
545
|
|
|
546
|
+
任务型 Provider 只提交一次收费生图请求,之后仅轮询只读状态接口。`IMAGEFORGE_ASYNC_TIMEOUT_MS` 默认 `300000`、范围 30000–600000;`IMAGEFORGE_POLL_INTERVAL_MS` 默认 `2000`、范围 500–10000。轮询会在同一边界内遵循数值型 `Retry-After`。ImageForge 不使用 webhook、不重试收费创建请求,也不回退到其他 Provider。
|
|
547
|
+
|
|
545
548
|
DNS 安全检查默认启用。只有确实需要访问私有网络地址或 DNS 代理生成的图片地址时,才应设置 `IMAGEFORGE_SKIP_DNS_SAFETY_CHECKS=true`。启用后,每次重定向都不再执行非公网地址拦截和 DNS 地址固定,可能使 MCP 进程面临 SSRF 风险。HTTP(S) 协议限制、URL 凭据限制、重定向次数、图片大小和图片魔数校验仍然有效。真值支持 `true`、`1`、`yes`、`on`,假值支持 `false`、`0`、`no`、`off`。
|
|
546
549
|
|
|
547
550
|
不要把真实 API Key 写入 Git 或其他共享配置文件。
|
|
@@ -588,6 +591,7 @@ export ZHIPU_IMAGE_MODEL="glm-image"
|
|
|
588
591
|
Codex 只会加载已信任项目中的 `.codex/config.toml`。新增或修改 MCP 配置后,需要重新启动 Codex 或新建任务,再使用 `/mcp verbose` 确认 `imageforge_dev` 提供以下工具:
|
|
589
592
|
|
|
590
593
|
- `generate_image`
|
|
594
|
+
- `list_image_providers`
|
|
591
595
|
- `edit_image`
|
|
592
596
|
|
|
593
597
|
修改 TypeScript 源码后,需要重新构建并重启使用该 MCP 的任务:
|
|
@@ -603,7 +607,7 @@ npm run build
|
|
|
603
607
|
| 参数 | 必填 | 默认值 | 说明 |
|
|
604
608
|
| --- | --- | --- | --- |
|
|
605
609
|
| `prompt` | 是 | - | 图片描述 |
|
|
606
|
-
| `model` | 否 | 环境变量或供应商默认值 | OpenAI
|
|
610
|
+
| `model` | 否 | 环境变量或供应商默认值 | 任意供应商模型名,优先于环境变量;已适配示例:OpenAI `gpt-image-2`、智谱模型见上、MiniMax `image-01` / `image-01-live`。不设模型白名单。 |
|
|
607
611
|
| `base_url` | 否 | 供应商环境变量或官方默认值 | 单次调用覆盖对应供应商 API 地址 |
|
|
608
612
|
| `api_key` | 否 | 供应商独立密钥 | 单次调用覆盖对应供应商密钥;推荐使用环境变量 |
|
|
609
613
|
| `provider` | 否 | `IMAGEFORGE_PROVIDER`,再默认 `openai` | `openai`、`zhipu` 或 `minimax` |
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type LoadedImage } from "./imageInput.js";
|
|
2
|
+
export declare const EXTERNAL_PROVIDER_IDS: readonly ["google", "xai", "stability", "ideogram", "recraft", "tencent", "baidu", "playground", "bfl", "luma", "krea", "runway", "leonardo", "bria", "freepik", "alibaba", "volcengine", "kling", "hidream"];
|
|
3
|
+
export type ExternalProviderId = typeof EXTERNAL_PROVIDER_IDS[number];
|
|
4
|
+
export type ReferenceMode = "auto" | "content" | "style" | "character";
|
|
5
|
+
type Quality = "auto" | "low" | "medium" | "high" | "standard" | "hd";
|
|
6
|
+
type OutputFormat = "png" | "jpeg" | "webp";
|
|
7
|
+
export interface ExternalImageConfig {
|
|
8
|
+
provider: ExternalProviderId;
|
|
9
|
+
apiKey: string;
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
model: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ExternalGeneratedImage {
|
|
14
|
+
data: Buffer;
|
|
15
|
+
mimeType: "image/png" | "image/jpeg" | "image/webp";
|
|
16
|
+
}
|
|
17
|
+
interface ExternalRequestInput {
|
|
18
|
+
prompt: string;
|
|
19
|
+
config: ExternalImageConfig;
|
|
20
|
+
size: string;
|
|
21
|
+
quality: Quality;
|
|
22
|
+
outputFormat?: OutputFormat;
|
|
23
|
+
watermarkEnabled?: boolean;
|
|
24
|
+
inputImages?: LoadedImage[];
|
|
25
|
+
referenceMode?: ReferenceMode;
|
|
26
|
+
aspectRatio?: string;
|
|
27
|
+
resolution?: string;
|
|
28
|
+
negativePrompt?: string;
|
|
29
|
+
seed?: number;
|
|
30
|
+
fetchImpl?: typeof fetch;
|
|
31
|
+
downloadFetchImpl?: typeof fetch;
|
|
32
|
+
}
|
|
33
|
+
interface ProviderDefinition {
|
|
34
|
+
id: ExternalProviderId;
|
|
35
|
+
name: string;
|
|
36
|
+
docsUrl: string;
|
|
37
|
+
baseUrl: string;
|
|
38
|
+
baseUrlEnv: string;
|
|
39
|
+
apiKeyEnv: string;
|
|
40
|
+
modelEnv: string;
|
|
41
|
+
defaultModel: string;
|
|
42
|
+
models: readonly string[];
|
|
43
|
+
referenceModes: readonly ReferenceMode[];
|
|
44
|
+
maxReferences: number;
|
|
45
|
+
async: boolean;
|
|
46
|
+
}
|
|
47
|
+
export declare function isExternalProvider(value: string): value is ExternalProviderId;
|
|
48
|
+
export declare function externalProviderDefinitions(): readonly ProviderDefinition[];
|
|
49
|
+
export declare function resolveExternalConfig(input: {
|
|
50
|
+
provider: ExternalProviderId;
|
|
51
|
+
apiKey?: string;
|
|
52
|
+
baseUrl?: string;
|
|
53
|
+
model?: string;
|
|
54
|
+
}): ExternalImageConfig;
|
|
55
|
+
export declare function requestExternalImage(input: ExternalRequestInput): Promise<ExternalGeneratedImage>;
|
|
56
|
+
export declare function externalCapabilities(): {
|
|
57
|
+
provider: "google" | "xai" | "stability" | "ideogram" | "recraft" | "tencent" | "baidu" | "playground" | "bfl" | "luma" | "krea" | "runway" | "leonardo" | "bria" | "freepik" | "alibaba" | "volcengine" | "kling" | "hidream";
|
|
58
|
+
name: string;
|
|
59
|
+
default_model: string;
|
|
60
|
+
models: string[];
|
|
61
|
+
reference_modes: ReferenceMode[];
|
|
62
|
+
max_reference_images: number;
|
|
63
|
+
async: boolean;
|
|
64
|
+
credential_environment_variables: string[];
|
|
65
|
+
base_url_environment_variable: string;
|
|
66
|
+
model_environment_variable: string;
|
|
67
|
+
docs_url: string;
|
|
68
|
+
implementation_basis: string;
|
|
69
|
+
live_verified: boolean;
|
|
70
|
+
}[];
|
|
71
|
+
export {};
|