Developer friendly code and integrations
Developer friendly code and integrations
/api/search
?api_key=YOUR_API_KEY
Copy and paste these code snippets into your project. Replace YOUR_API_KEY with your actual API key.
| Parameter | Type | Required | Description |
|---|---|---|---|
imageUrl |
String (URL) | Optional* | URL of the image to verify. Use this, imageFile, or pastedImage. |
imageFile |
File | Optional* | Direct file upload (multipart/form-data). Use this, imageUrl, or pastedImage. |
pastedImage |
String (Base64) | Optional* | Base64 encoded image data. Use this, imageUrl, or imageFile. |
return_url |
Boolean | No | If true, returns only the result URL. If false or omitted, returns full response data. |
* At least one image parameter (imageUrl, imageFile, or pastedImage) is required.
Successful response when return_url is false or omitted:
{
"success": true,
"result_url": "https://precheck.ai/results/abc123",
"data": {
"matches": [...],
"confidence": 0.95
}
}
When return_url is true, only the URL is returned:
"https://precheck.ai/results/abc123"
Common error responses:
| Status Code | Error | Description |
|---|---|---|
| 400 | Bad Request | Missing or invalid parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Server Error | Internal server error |