Search
curl --request POST \
--url https://api.lightdrift.ai/v1/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "a spanish shawl nudibranch on a reef"
}
'import requests
url = "https://api.lightdrift.ai/v1/search"
payload = { "query": "a spanish shawl nudibranch on a reef" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'a spanish shawl nudibranch on a reef'})
};
fetch('https://api.lightdrift.ai/v1/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"query": "a spanish shawl nudibranch on a reef",
"count": 1,
"latency_ms": 96,
"results": [
{
"asset_id": "inat:41290763",
"score": 0.83214,
"title": "Spanish shawl (Flabellina iodinea)",
"file": "https://assets.lightdrift.ai/inat/41290763.jpg",
"license": "cc-by-4.0",
"rights": {
"license": "cc-by-4.0",
"license_version": "4.0",
"license_url": "https://creativecommons.org/licenses/by/4.0/",
"as_declared_by": "iNaturalist",
"commercial": true,
"derivatives": true,
"share_alike": false,
"attribution_required": true,
"ai_training": null,
"delivery": "host",
"attribution": "\"Spanish shawl (Flabellina iodinea)\" by anudibranchmom, iNaturalist, CC BY 4.0",
"provenance": "iNaturalist research-grade observations",
"note": null,
"basis": "Rights shown as declared by the source, not verified by Lightdrift."
},
"cv": {
"palette": [
"#5a2d82",
"#f26d3d",
"#1b3a4d"
],
"luminance": 0.31,
"neg_space": [
"top"
],
"faces": 0,
"aspect": 1.5
}
}
]
}Text query over the corpus, with optional design-layer filters and a negative constraint. Returns ranked results, each with a machine-readable rights answer.
POST
/
v1
/
search
Search
curl --request POST \
--url https://api.lightdrift.ai/v1/search \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "a spanish shawl nudibranch on a reef"
}
'import requests
url = "https://api.lightdrift.ai/v1/search"
payload = { "query": "a spanish shawl nudibranch on a reef" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'a spanish shawl nudibranch on a reef'})
};
fetch('https://api.lightdrift.ai/v1/search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"query": "a spanish shawl nudibranch on a reef",
"count": 1,
"latency_ms": 96,
"results": [
{
"asset_id": "inat:41290763",
"score": 0.83214,
"title": "Spanish shawl (Flabellina iodinea)",
"file": "https://assets.lightdrift.ai/inat/41290763.jpg",
"license": "cc-by-4.0",
"rights": {
"license": "cc-by-4.0",
"license_version": "4.0",
"license_url": "https://creativecommons.org/licenses/by/4.0/",
"as_declared_by": "iNaturalist",
"commercial": true,
"derivatives": true,
"share_alike": false,
"attribution_required": true,
"ai_training": null,
"delivery": "host",
"attribution": "\"Spanish shawl (Flabellina iodinea)\" by anudibranchmom, iNaturalist, CC BY 4.0",
"provenance": "iNaturalist research-grade observations",
"note": null,
"basis": "Rights shown as declared by the source, not verified by Lightdrift."
},
"cv": {
"palette": [
"#5a2d82",
"#f26d3d",
"#1b3a4d"
],
"luminance": 0.31,
"neg_space": [
"top"
],
"faces": 0,
"aspect": 1.5
}
}
]
}Authorizations
Your Lightdrift API key. Usage is metered per query.
Body
application/json
Natural-language description of what you need.
Required range:
x <= 100Vector-lane candidate depth. Raise for vibe/aesthetic queries.
Required range:
x <= 1000Keyword-lane candidate depth. Raise for precise subjects and names.
Required range:
x <= 1000All filters are hard constraints applied before ranking.
Show child attributes
Show child attributes
Optional session id; link related queries for better results over time.