Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhan1993 committed Jul 15, 2024
1 parent 4b973ee commit 019f50b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion docs/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ FastAPI 是一个现代、快速(高性能)的Web框架,用于构建APIs

和 Fooocus 相同的启动方式,使用 `--nowebui` 参数可以启动 API 而不启动 WebUI。

默认的 API 端口是 WebUI 端口加 1,即 7866,使用 `--port` 修改 WebUI 端口将同时修改 API 端口。
默认的 API 端口是 WebUI 端口加 1,即 7866

环境变量 API_PORT 用于指定 API 端口,优先级高于默认设置。

同时启动 WebUI 和 API 示例:

Expand Down
10 changes: 6 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ advantage:
- Use X-API-KEY for authentication
- all-in-one interface
- use URL provide INPUT image
- streaming output, binary image, asynchronous task and syncronous task support
- streaming output, binary image, asynchronous task and synchronous task support
- persistent task history
- enhanced task history management
- task query function
Expand All @@ -48,7 +48,9 @@ Based on Fooocus, there are several dependencies, so you can install it in the s

Same as Fooocus, use `--apikey` to specify the API authentication key.

Default API port is WebUI port plus 1, that is 7866, use `--port` to modify WebUI port to modify API port at the same time.
Default API port is WebUI port plus 1, that is 7866, use `--port` to modify WebUI port

Environment variable API_PORT is used to specify the API port. It takes precedence over the default setting.

example for WebUI and API:

Expand Down Expand Up @@ -103,10 +105,10 @@ In addition, some API-specific parameters are also included:
- `preset`, You can use this parameter to specify a preset that takes precedence over the global default and below the passed parameter, but if the passed parameter is equal to the default value, the preset parameter is used
- `stream_output`, true for streaming output, default false
- `require_base64`, not used
- `async_process`, async task, default false, a syncronous task will be returned when `stream_output` is false at the same time
- `async_process`, async task, default false, a synchronous task will be returned when `stream_output` is false at the same time
- `webhook_url`, Webhook addr, if set, the task will be sent to the address after the task is completed.

> `stream_output` has a higher priority than `async_process`, that is, when both are `true`, return streaming output. When all are false, task will be syncronously returned. when you set Accepet: image/xxx in the request header, the response will be a binary image
> `stream_output` has a higher priority than `async_process`, that is, when both are `true`, return streaming output. When all are false, task will be synchronously returned. when you set `Accept: image/xxx` in the request header, the response will be a binary image
### Stop or Skip

Expand Down

0 comments on commit 019f50b

Please sign in to comment.