Set Asset Tags
Replace one asset’s tags.
:path because the id is the storage key, which has slashes in it. Any writer may tag any
author’s asset — the gallery is the team’s, and enforce_write_role is the whole gate.
PATCH
/api/v1/assets/{key}/tagsAuthorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredPath parameters
keystringrequiredRequest body
requiredapplication/jsontagsstring[]requiredmax items 20
Responses
200Successful Response
successbooleandefault: true
dataGeneratedAsset | anyShow propertiesHide properties
Any of:
GeneratedAsset
idstringrequiredurlstringrequiredsha256stringrequiredkindAssetKindrequiredWhat a generated file is.
The values match the engine's media `PortType`s deliberately: the harvest that finds these
files reads the kind off a node's declared output port, and hands the value over as a plain
string so neither package has to import the other.
Allowed:
imagevideoaudionode_typestringrequirednode_idstringrequiredmodelstring | anyShow propertiesHide properties
Any of:
string
stringany
anypromptstring | anyShow propertiesHide properties
Any of:
string
stringany
anyrun_idstringrequiredrun_generationinteger | anyShow propertiesHide properties
Any of:
integer
integerany
anygraph_idstring | anyShow propertiesHide properties
Any of:
string
stringany
anyowner_idstringrequiredtagsstring[]created_atstring<date-time>any
anymessagestring | anyShow propertiesHide properties
Any of:
string
stringany
anyerrorsstring[] | anyShow propertiesHide properties
Any of:
string[]
Array of
stringstringany
any422Validation Error
detailValidationError[]Show propertiesHide properties
Array of
ValidationErrorlocstring | integer[]requiredShow propertiesHide properties
Array of
string | integerAny of:
string
stringinteger
integermsgstringrequiredtypestringrequiredinputanyctxobjectRequest
curl -X PATCH "/api/v1/assets/string/tags" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"tags": [
"string"
]
}'const response = await fetch("/api/v1/assets/string/tags", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"tags": [
"string"
]
})
});import requests
response = requests.patch(
"/api/v1/assets/string/tags",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"tags": [
"string"
]
},
)Response
{
"success": true,
"data": {
"id": "string",
"url": "string",
"sha256": "string",
"kind": "image",
"node_type": "string",
"node_id": "string",
"model": "string",
"prompt": "string",
"run_id": "string",
"run_generation": 0,
"graph_id": "string",
"owner_id": "string",
"tags": [
"string"
],
"created_at": "2019-08-24T14:15:22Z"
},
"message": "string",
"errors": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}