Quickstart

Create an account, generate an API key, and scan your first file in minutes.

Create an account

Sign up on Threatless with email and password, or continue with Google if it is enabled on your instance. Confirm your email, then open the dashboard.

Self-hosting instead? Follow the Docker guide first, then create the first account on your own instance.

Email sign-up requires a confirmed address before you can log in. Use the confirmation link in your inbox, or request a new one from the login page.

Create an API key

Open API Key in the dashboard, name the key, and copy the value. Send it as the X-API-KEY header on every public scan request.

Treat API keys like passwords. Anyone who has a key can consume your hourly quota.

Scan a file

terminal
curl -X POST https://api.trythreatless.com/api/v1/scans \
  -H "X-API-KEY: YOUR_API_KEY" \
  -F "file=@./suspect.bin"

A successful clean scan returns JSON and rate-limit headers:

200 clean
{
  "filename": "suspect.bin",
  "extension": "bin",
  "sizeInBytes": 2048,
  "scanDurationMillis": 42,
  "infected": false,
  "virusName": null
}

When ClamAV matches a signature, the same shape comes back with infected set:

200 infected
{
  "filename": "payload.exe",
  "extension": "exe",
  "sizeInBytes": 4096,
  "scanDurationMillis": 51,
  "infected": true,
  "virusName": "Win.Test.EICAR_HDB-1"
}

Win.Test.EICAR_HDB-1 is the usual ClamAV name for the official EICAR test file. See Test with EICAR.

Handle errors early

Missing keys and exhausted quotas fail before ClamAV runs:

401
{
  "error": "X-API-KEY INVALID"
}
429
{
  "error": "Rate limit exceeded",
  "message": "Hourly scan limit reached",
  "limit": 5,
  "resetTime": 1710000000,
  "retryAfter": 842
}

Honor Retry-After (seconds). Full tables live under Errors.

Scan a URL (optional)

terminal
curl -X POST https://api.trythreatless.com/api/v1/scans \
  -H "X-API-KEY: YOUR_API_KEY" \
  -F "url=https://example.com/file.exe"

URL scans only accept http or https. Private, loopback, and cloud-metadata hosts are blocked.

Next, copy a client from Language examples, then read the Scan API for the full contract.
Previous

Test with EICAR

What the EICAR test file is, why it exists, and how to use it safely with Threatless.

Next