Requires API key via Authorization: Bearer <api_key> header.
POST /api/v1/verify
Submit a single document image for forgery analysis.
Authentication
Request
Three input methods are supported. Use documentUrl for files larger than 4.5MB.
Option 1: Multipart file upload
Best for small files. Max 4.5MB.
| Field | Type | Required | Description |
|---|---|---|---|
| document | File | Yes | JPEG, PNG, or PDF. Max 4.5MB. |
Option 2: JSON with document URL (recommended for large files)
Server fetches the image from your URL. Max 10MB. HTTPS required.
| Field | Type | Required | Description |
|---|---|---|---|
| documentUrl | string | Yes* | HTTPS URL pointing to a JPEG, PNG, or PDF. Max 10MB. |
Option 3: JSON with base64 document
Inline base64-encoded image. Max 4.5MB (platform limit).
| Field | Type | Required | Description |
|---|---|---|---|
| document | string | Yes* | Base64-encoded image data (optionally as data URL). |
* Provide one of document (file or base64) or documentUrl.
Example Requests
Multipart upload
bash
curl -X POST https://veriscor.io/api/v1/verify \ -H "Authorization: Bearer vsk_live_550e8400..." \ -F "document=@passport.jpg"
URL-based (recommended for large files)
bash
curl -X POST https://veriscor.io/api/v1/verify \
-H "Authorization: Bearer vsk_live_550e8400..." \
-H "Content-Type: application/json" \
-d '{"documentUrl": "https://storage.example.com/passport.jpg"}'Response (200 OK)
json
{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"forgeryScore": 0.12,
"confidence": "high",
"documentType": "passport",
"flags": [],
"latencyMs": 1847
}
}Response Fields
| Field | Type | Description |
|---|---|---|
| id | string | Unique verification ID |
| forgeryScore | number | 0.0 (authentic) to 1.0 (forged) |
| confidence | string | low, medium, or high |
| documentType | string | passport, id, drivers_license, utility_bill, financial, unknown |
| flags | string[] | Specific anomaly flags detected |
| latencyMs | number | Processing time in milliseconds |
Errors
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid request body |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 402 | TRIAL_EXHAUSTED | Free tier limit reached |
| 422 | UNSUPPORTED_FORMAT | Invalid image format |
| 422 | FILE_TOO_LARGE | File exceeds size limit (4.5MB multipart/base64, 10MB URL) |
| 422 | FETCH_FAILED | Could not fetch document from documentUrl |
| 429 | RATE_LIMITED | Too many requests |
| 429 | CAP_EXCEEDED | Monthly spend cap reached |