More like this
curl --request POST \
--url https://api.lightdrift.ai/v1/similar \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"asset_id": "inat:41290763"
}
'import requests
url = "https://api.lightdrift.ai/v1/similar"
payload = { "asset_id": "inat:41290763" }
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({asset_id: 'inat:41290763'})
};
fetch('https://api.lightdrift.ai/v1/similar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"query": "<string>",
"count": 123,
"latency_ms": 123,
"results": [
{
"asset_id": "<string>",
"score": 123,
"title": "<string>",
"source": "<string>",
"width": 123,
"height": 123,
"file": "<string>",
"thumb": "<string>",
"rights": {
"license": "<string>",
"license_verbatim": "<string>",
"commercial": true,
"attribution_required": true,
"derivatives": true,
"share_alike": true,
"attribution": "<string>",
"provenance_url": "<string>",
"basis": "<string>"
}
}
],
"applied_design": {}
}Expand from an asset you already have: pass its asset_id and get more like it, with the same design-layer filters available.
POST
/
v1
/
similar
More like this
curl --request POST \
--url https://api.lightdrift.ai/v1/similar \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"asset_id": "inat:41290763"
}
'import requests
url = "https://api.lightdrift.ai/v1/similar"
payload = { "asset_id": "inat:41290763" }
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({asset_id: 'inat:41290763'})
};
fetch('https://api.lightdrift.ai/v1/similar', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"query": "<string>",
"count": 123,
"latency_ms": 123,
"results": [
{
"asset_id": "<string>",
"score": 123,
"title": "<string>",
"source": "<string>",
"width": 123,
"height": 123,
"file": "<string>",
"thumb": "<string>",
"rights": {
"license": "<string>",
"license_verbatim": "<string>",
"commercial": true,
"attribution_required": true,
"derivatives": true,
"share_alike": true,
"attribution": "<string>",
"provenance_url": "<string>",
"basis": "<string>"
}
}
],
"applied_design": {}
}Authorizations
Your Lightdrift API key. Usage is metered per query.
Body
application/json