Get Asset
One asset by its storage key — the address an asset is shared as.
Declared last on purpose. :path matches slashes, so this route would swallow /assets/tags
if it came first: FastAPI tries routes in the order they were added, and the specific one has
to be tried before the greedy one.
GET
/api/v1/assets/{key}Authorization
AuthorizationBearer token · headerrequiredor
AuthorizationOAuth2 access token · headerrequiredPath parameters
keystringrequiredResponses
200Successful Response
successbooleandefault: true
dataAssetDetail | anyShow propertiesHide properties
Any of:
AssetDetail
assetGeneratedAssetrequiredOne file a run produced.
The `_id` is the object's storage key, which is derived from the sha256 of the bytes — so the
same result generated twice is one asset, and a replayed run re-records what it already had
instead of duplicating it.
Show propertiesHide properties
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>includedUserIncludesPeople referenced by the payload, keyed by id — same contract as `CreativeIncludes`.
Comment authors, mentions and reactors on the comments feed, transition actors on the
history one.
Show propertiesHide properties
usersobjectany
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 GET "/api/v1/assets/string" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("/api/v1/assets/string", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"/api/v1/assets/string",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"success": true,
"data": {
"asset": {
"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"
},
"included": {
"users": {
"property1": {
"id": "string",
"name": "string",
"email": "string",
"image_url": "string"
},
"property2": {
"id": "string",
"name": "string",
"email": "string",
"image_url": "string"
}
}
}
},
"message": "string",
"errors": [
"string"
]
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}