Field name | Type | Required | Sample value | Comments |
---|---|---|---|---|
fileUniqueId | string | Yes | ENthMCy_5zr5zN3GRJseM | File UID Required |
filename | string | yes | example-new.png | new filename required |
purpose | integer | no | 0 | file purpose |
is_public | boolean | no | true | Is it public |
tags | array | No | ["tag1", "tag2"] | New file Tag |
expires_at | string | No | 2024-12-31T23:59:59 | Expiration time |
unset_expires_at | boolean | No | false | Whether to unset the expiration time |
file-v1
permissions.purpose
definition:{
COMMON = 0,
FINETUNE = 1,
CHAT = 2,
LLM_TMP = 3,
OPENAI_BATCH = 4,
ANTHROPIC_BATCH = 5,
}
curl --location --request POST 'https://cn2us02.opapi.win/api/v1/user/files/update' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"fileUniqueId": "ENthMCy_5zr5zN3GRJseM",
"filename": "new-pic.jpg",
"purpose": "0",
"is_public": true,
"tags": [
"t1",
"t2"
],
"expires_at": "2024-11-29T22:14:53+08:00",
"unset_expires_at": false
}'
{
"statusCode": 200,
"message": "File info updated successfully",
"data": {
"affectedRows": 1
}
}