Prepare one reference
Choose a JPEG, PNG or WebP image you are authorized to submit. The documented input limits are 5 MiB and 20 megapixels. Images are resized to a maximum 1024-pixel edge before embedding. Check pixel dimensions in your image editor; the script below only checks file size and extension. SetLIGHTDRIFT_API_KEY through your environment’s secret controls. Save this as reference_search.py:
query. To use a public HTTPS image instead of a local file, send image_url instead of image_base64; do not send both image fields. See Search for the supported controls.
A successful search currently costs 5 per 1,000), including a successful response with degraded ranking. Returning five candidates is one search. The script does not retry automatically. Confirm the current price before running it.
Read the response before using an image
The saved JSON retains the whole response, includingquery_id, candidate metadata and any relaxed or degraded fields. Inspect the previews, actual dimensions and source pages. Keep the full rights object with a selected asset; saving only the file URL loses the information needed to carry credits into your workflow.
Check source-declared permission flags and attribution. Unknown values remain unresolved. Lightdrift reports the source’s rights declarations, rather than clearing every use of a person’s likeness, a logo, a building or an artwork. See Rights answers.
File URLs can redirect to signed downloads. Follow redirects when fetching a selected file and don’t treat the final signed URL as a permanent asset address. Keep the asset ID and source metadata so your application can retrieve current details later.
Reference search or similar-image lookup?
Similar-image lookup excludes its seed and does not use text reranking. An asset outside the current index is not a valid similarity seed, even if its metadata remains retrievable. Use the reference workflow when your starting point is an external image.
Try Lightdrift with one visual brief. Record whether a result fits the brief and can be used with its required credit, or what prevented that decision.
Request fields and limits were checked against the live API schema and documentation on September 26, 2026. The script has not been run against an authenticated paid search; no retrieval-quality or latency result is claimed.