mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-07-21 23:41:28 +08:00
Improve API support
- Removed /api/v1/images because you should use your own CDN style image host and /view for maximum compatibility - The /api/v1/prompts POST application/json response will now return the outputs dictionary - Caching has been removed - More tests - Subdirectory prefixes are now supported - Fixed an issue where a Linux frontend and Windows backend would have paths that could not interact with each other correctly
This commit is contained in:
+25
-4
@@ -15,6 +15,8 @@ paths:
|
||||
description: the index.html of the website
|
||||
content:
|
||||
text/html:
|
||||
schema:
|
||||
type: string
|
||||
example: "<!DOCTYPE html>..."
|
||||
/embeddings:
|
||||
get:
|
||||
@@ -390,7 +392,7 @@ paths:
|
||||
The complete outputs dictionary from the workflow.
|
||||
|
||||
Additionally, a list of URLs to binary outputs, whenever save nodes are used.
|
||||
|
||||
|
||||
For each SaveImage node, there will be two URLs: the internal URL returned by the worker, and
|
||||
the URL for the image based on the `--external-address` / `COMFYUI_EXTERNAL_ADDRESS` configuration.
|
||||
|
||||
@@ -454,9 +456,25 @@ paths:
|
||||
type: string
|
||||
outputs:
|
||||
$ref: "#/components/schemas/Outputs"
|
||||
example:
|
||||
outputs: {}
|
||||
urls: [ "http://127.0.0.1:8188/view?filename=ComfyUI_00001_.png&type=output", "https://comfyui.example.com/view?filename=ComfyUI_00001_.png&type=output" ]
|
||||
example:
|
||||
outputs: { }
|
||||
urls: [ "http://127.0.0.1:8188/view?filename=ComfyUI_00001_.png&type=output", "https://comfyui.example.com/view?filename=ComfyUI_00001_.png&type=output" ]
|
||||
multipart/mixed:
|
||||
encoding:
|
||||
"^\\d+$":
|
||||
contentType: image/png, image/jpeg, image/webp
|
||||
schema:
|
||||
type: object
|
||||
description: |
|
||||
Each of the output nodes' binary values for images, and the "outputs" json object.
|
||||
properties:
|
||||
outputs:
|
||||
$ref: "#/components/schemas/Outputs"
|
||||
additionalProperties:
|
||||
patternProperties:
|
||||
"^\\d+$":
|
||||
type: string
|
||||
format: binary
|
||||
204:
|
||||
description: |
|
||||
The prompt was run but did not contain any SaveImage outputs, so nothing will be returned.
|
||||
@@ -489,9 +507,12 @@ paths:
|
||||
enum:
|
||||
- "application/json"
|
||||
- "image/png"
|
||||
- "multipart/mixed"
|
||||
required: false
|
||||
description: |
|
||||
Specifies the media type the client is willing to receive.
|
||||
|
||||
multipart/mixed will soon be supported to return all the images from the workflow.
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
|
||||
Reference in New Issue
Block a user