跳转到主要内容
POST
/
api
/
userdata
/
{file}
Upload or update a user data file
curl --request POST \
  --url https://cloud.comfy.org/api/userdata/{file} \
  --header 'Content-Type: application/octet-stream' \
  --header 'X-API-Key: <api-key>' \
  --data '"<string>"'
{
  "path": "<string>",
  "size": 123,
  "modified": "2023-11-07T05:31:56Z"
}

授权

X-API-Key
string
header
必填

API key authentication. Generate an API key from your account settings at https://comfy.org/account. Pass the key in the X-API-Key header.

路径参数

file
string
必填

The target file path (URL encoded if necessary).

查询参数

overwrite
enum<string>
默认值:true

If "false", prevents overwriting existing files. Defaults to "true".

可用选项:
true,
false
full_info
enum<string>
默认值:false

If "true", returns detailed file info; if "false", returns only the relative path.

可用选项:
true,
false

请求体

application/octet-stream

The body is of type file.

响应

File uploaded successfully.

path
string
size
integer
modified
string<date-time>