POST /api/v1/verify

Submit a single document image for forgery analysis.

Authentication

Requires API key via Authorization: Bearer <api_key> header.

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.

FieldTypeRequiredDescription
documentFileYesJPEG, 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.

FieldTypeRequiredDescription
documentUrlstringYes*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).

FieldTypeRequiredDescription
documentstringYes*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

FieldTypeDescription
idstringUnique verification ID
forgeryScorenumber0.0 (authentic) to 1.0 (forged)
confidencestringlow, medium, or high
documentTypestringpassport, id, drivers_license, utility_bill, financial, unknown
flagsstring[]Specific anomaly flags detected
latencyMsnumberProcessing time in milliseconds

Errors

StatusCodeDescription
400VALIDATION_ERRORInvalid request body
401UNAUTHORIZEDMissing or invalid API key
402TRIAL_EXHAUSTEDFree tier limit reached
422UNSUPPORTED_FORMATInvalid image format
422FILE_TOO_LARGEFile exceeds size limit (4.5MB multipart/base64, 10MB URL)
422FETCH_FAILEDCould not fetch document from documentUrl
429RATE_LIMITEDToo many requests
429CAP_EXCEEDEDMonthly spend cap reached