> For AI agents: the complete documentation index is available at https://surowan.com/llms.txt, the full documentation bundle is available at https://surowan.com/llms-full.txt.

文档对应源码提交： [`55e5d96b5634`](https://github.com/tuuject/surowan/commit/55e5d96b56340db24cbc51dea010617b57b40d8b)。请先与自己的部署版本核对。

# 配置字段参考：`image`

本页由同一提交的 ConfigSchema 自动生成，属于[配置字段参考](https://surowan.com/docs/reference/fields.md)。
**必填是相对于所在对象而言**；可选对象未启用时不要求它的子字段。
可选不等于有默认值，类型合法也不等于通过跨字段语义校验。默认行为、热更新与覆盖关系请读[配置说明](https://surowan.com/docs/reference/config.md)。

## `image`

类型：`object`；可选。

### `image.credentials`

类型：`object`；必填。

#### `image.credentials.<名称>`

类型：`object / object / object`；可选。

#### `image.credentials.<名称>（分支 1）`

类型：`object`；可选。

#### `image.credentials.<名称>（分支 1）.jar`

类型：`string`；必填。

限制：`pattern: "^[A-Za-z0-9_-]{1,64}$"`。

#### `image.credentials.<名称>（分支 2）`

类型：`object`；可选。

#### `image.credentials.<名称>（分支 2）.env`

类型：`string`；必填。

限制：`pattern: "^[A-Za-z_][A-Za-z0-9_]*$"`。

#### `image.credentials.<名称>（分支 3）`

类型：`object`；可选。

#### `image.credentials.<名称>（分支 3）.command`

类型：`array`；必填。

限制：`minItems: 1`。

#### `image.credentials.<名称>（分支 3）.command[]`

类型：`string`；必填。

### `image.models`

类型：`array`；必填。

限制：`maxItems: 64`。

#### `image.models[]`

类型：`object`；必填。

#### `image.models[].id`

类型：`string`；必填。

限制：`pattern: "^[a-zA-Z0-9_-]{1,80}$"`。

#### `image.models[].name`

类型：`string`；必填。

限制：`minLength: 1`。

#### `image.models[].description`

类型：`string`；可选。

#### `image.models[].provider`

类型：`string`；必填。

限制：`minLength: 1`。

#### `image.models[].upstreamModel`

类型：`string`；必填。

限制：`pattern: "^[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+$"`。

#### `image.models[].credentialRef`

类型：`string`；必填。

限制：`pattern: "^[a-zA-Z0-9_-]{1,80}$"`。

#### `image.models[].providerTag`

类型：`string`；必填。

限制：`pattern: "^[a-zA-Z0-9_-]{1,80}(?:\\/[a-zA-Z0-9_-]{1,80})?$"`。

#### `image.models[].capabilities`

类型：`object`；必填。

#### `image.models[].capabilities.imageInput`

类型：`boolean`；必填。

#### `image.models[].capabilities.maxInputImages`

类型：`integer`；必填。

限制：`minimum: 0`，`maximum: 16`。

#### `image.models[].capabilities.maxOutputs`

类型：`integer`；必填。

限制：`minimum: 1`，`maximum: 10`。

#### `image.models[].capabilities.aspectRatios`

类型：`array`；必填。

限制：`minItems: 1`。

#### `image.models[].capabilities.aspectRatios[]`

类型：`string`；必填。

#### `image.models[].capabilities.resolutionClasses`

类型：`array`；必填。

限制：`minItems: 1`。

#### `image.models[].capabilities.resolutionClasses[]`

类型：`string`；必填。
