curl --request GET \
--url https://patch.gg/api/v1/assets/searchconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/assets/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/assets/search"
response = requests.get(url)
print(response.text){
"total": 123,
"hits": [
{
"id": "polyhaven:wooden_crate_02",
"type": "<string>",
"title": "<string>",
"title_by": "upstream",
"source": "<string>",
"source_id": "<string>",
"license": "<string>",
"ai": true,
"thumbnail_url": "<string>",
"prep": {
"state": "indexed",
"eta_s": 123,
"error": "<string>"
},
"fit": {
"variant": "<string>",
"mb": 123,
"est": true
},
"capabilities": {
"runtime": "<string>",
"keeps": [
"<string>"
],
"dropped": [
{
"capability": "<string>",
"reason": "<string>"
}
]
},
"traits": [
"<string>"
],
"group": {
"key": "<string>",
"alternatives": 123
},
"warn": [
"<string>"
]
}
],
"interpreted": {
"q": "<string>",
"runtime": "<string>",
"types": [
"<string>"
],
"filters": [
{
"f": "<string>",
"op": "=",
"v": "<string>"
}
],
"license": [
"<string>"
],
"cap": [
"<string>"
]
},
"unapplied": [
"<string>"
],
"relax": [
{
"drop": "<string>",
"adds": 123,
"why": "<string>"
}
],
"next_cursor": "<string>",
"untrusted_fields": [
"<string>"
]
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Search the asset library
Full-text search, ranked, with ties going to prepared assets. One hit per group of alternatives unless group=false. unapplied lists filters that weren’t used and why; with few hits, relax says what to drop.
curl --request GET \
--url https://patch.gg/api/v1/assets/searchconst options = {method: 'GET'};
fetch('https://patch.gg/api/v1/assets/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://patch.gg/api/v1/assets/search"
response = requests.get(url)
print(response.text){
"total": 123,
"hits": [
{
"id": "polyhaven:wooden_crate_02",
"type": "<string>",
"title": "<string>",
"title_by": "upstream",
"source": "<string>",
"source_id": "<string>",
"license": "<string>",
"ai": true,
"thumbnail_url": "<string>",
"prep": {
"state": "indexed",
"eta_s": 123,
"error": "<string>"
},
"fit": {
"variant": "<string>",
"mb": 123,
"est": true
},
"capabilities": {
"runtime": "<string>",
"keeps": [
"<string>"
],
"dropped": [
{
"capability": "<string>",
"reason": "<string>"
}
]
},
"traits": [
"<string>"
],
"group": {
"key": "<string>",
"alternatives": 123
},
"warn": [
"<string>"
]
}
],
"interpreted": {
"q": "<string>",
"runtime": "<string>",
"types": [
"<string>"
],
"filters": [
{
"f": "<string>",
"op": "=",
"v": "<string>"
}
],
"license": [
"<string>"
],
"cap": [
"<string>"
]
},
"unapplied": [
"<string>"
],
"relax": [
{
"drop": "<string>",
"adds": 123,
"why": "<string>"
}
],
"next_cursor": "<string>",
"untrusted_fields": [
"<string>"
]
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "version_exists",
"message": "<string>",
"details": "<unknown>"
}
}Query Parameters
Text to search for
200"crate"
Asset types (repeat or comma-separate)
"model"
Source ids or names, e.g. polyhaven
SPDX ids, or "safe" (every license in the registry; the default)
Capabilities the asset must keep on the runtime, e.g. collision (a higher one counts)
Runtime the capabilities and variants are for
"patch-web@1"
indexed, converting, ready or failed (failed is hidden by default)
Filters on facets, fieldvalue: "triangles<=5000", "texture_px between 512,2048", "cap has collision". Repeat for several.
Only AI-generated, or none
true, false One hit per group (default true)
true, false 1 <= x <= 100