Assess a file

Assess a single file in one call: upload it as multipart/form-data and receive the verdict in the same request. By default the call waits (long-polls) until analysis finishes; it returns 202 with a processing envelope if the wait window elapses first.
MethodPOST
Endpoint/v1/assess

Headers

Authorization: Bearer {api_key}
Content-Type: multipart/form-data; boundary={set by your HTTP client}

Header parameters

HeaderTypeDescriptionRequired
Idempotency-KeystringOptional idempotency key. Retrying a submission with the same key returns the original job instead of creating a duplicate.No

Query parameters

ParameterTypeDescriptionRequired
waitbooleanBlock until the job completes. true (the default) waits up to 30 s before falling back to the polling response; false returns immediately. Changes response timing and HTTP status only — never the result shape.No

Body parameters

ParameterTypeDescriptionRequired
filestring (binary)The file to assess.Yes
metadatastringOptional JSON-encoded object, echoed back verbatim as metadata on the result.No

Example request

curl -X POST "https://api.pixelsystems.com/v1/assess" \
  -H "Authorization: Bearer {api_key}" \
  -H "Idempotency-Key: case-123-front-photo" \
  -F "file=@photo.jpg;type=image/jpeg" \
  -F 'metadata={"customer_case_id":"case-123"}'

Response (200)

Assessment completed within the wait window

FieldTypeDescription
jobIdstring (uuid)Single job identity, shared by every path that references this job.
statusJobStatusLifecycle status of a job. verdict is present only when completed. rejected is reserved for future use and is not currently produced.
verdictobjectOverall verdict for a completed job, with per-dimension breakdown. Present only when status is completed.
verdict.assessmentstringHeadline, customer-actionable assessment (e.g. ai_generated).
verdict.confidenceConfidenceLevelQualitative confidence in an assessment.
verdict.displayobjectRendered copy for assessment. Present for every completed run.
verdict.display.labelstringShort badge or table-cell copy, e.g. Inconclusive.
verdict.display.titlestringHeadline for the main result indicator.
verdict.display.descriptionstringSupporting sentence shown under the headline.
verdict.dimensionsarray<Dimension>
verdict.dimensions[].keystringStable identifier of the dimension, e.g. ai_detection.
verdict.dimensions[].labelstringHuman-readable name of the dimension.
verdict.dimensions[].assessmentstringAggregated assessment for this dimension.
verdict.dimensions[].scorenumberAggregated numeric score in [0, 1].
verdict.dimensions[].confidenceConfidenceLevelQualitative confidence in an assessment.
errorobjectWhy a job ended in error or rejected status; present only for those statuses. Uses the same code vocabulary as endpoint errors.
error.codeErrorCodeStable machine-readable error code. The same vocabulary is used by every endpoint and by jobs in error or rejected status.
error.messagestring
metadataobjectCaller-supplied metadata, echoed back verbatim.
createdAtstring (date-time)When the job was created (ISO 8601).
completedAtstring (date-time)When processing finished (ISO 8601).

Example response

{
  "jobId": "550e8400-e29b-41d4-a716-446655440000",
  "status": "completed",
  "verdict": {
    "assessment": "ai_generated",
    "confidence": "high",
    "display": {
      "label": "AI Generated",
      "title": "AI Generated",
      "description": "AI Generated image detected"
    },
    "dimensions": [
      {
        "key": "ai_detection",
        "label": "AI generation",
        "assessment": "likely_ai",
        "score": 0.82,
        "confidence": "high"
      }
    ]
  },
  "metadata": { "customer_case_id": "case-123" },
  "createdAt": "2024-06-01T12:00:00Z",
  "completedAt": "2024-06-01T12:00:14Z"
}

Notes

The request body is multipart/form-data — not JSON. The "file" part is required (JPEG, PNG, or HEIC/HEIF, at most 25 MB); the optional "metadata" part is a JSON-encoded object echoed back on the job. The optional Idempotency-Key header (1–255 characters) makes retries safe: a repeated key returns the existing job instead of creating a duplicate. The "wait" query parameter defaults to true and long-polls up to 30 seconds — a 200 response carries a terminal status (completed or error), a 202 means still processing; poll GET /v1/jobs/{jobId} (which supports the same "wait" parameter) until the status leaves processing.
Pixel Systems - Assess a file