Developers

Developer friendly code and integrations

Get Your API Key: Sign up at sys.precheck.ai to get your API key and start integrating.
API Endpoint
Method: POST
Endpoint: /api/search
Authentication: API key via query parameter
?api_key=YOUR_API_KEY

Code Examples

Copy and paste these code snippets into your project. Replace YOUR_API_KEY with your actual API key.


          
Request Parameters
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.

Example Response

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"
Error Handling

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