Pcap AI REST API
Automate PCAP analysis, scale your security workflows, and generate professional PDF reports programmatically.
Authentication
All requests must include a Bearer token.
API access is exclusively available for Advanced subscribers. Generate and manage your keys in My Account → API Settings.
# Authentication Header
Authorization: Bearer YOUR_API_KEY
Upload PCAP
POST /api/v1/upload
Submit a .pcap or .pcapng file for analysis.
This endpoint returns a unique job ID used for status tracking.
Request Body
-
Content-Type
multipart/form-data -
Field:
fileBinary File Data -
Field:
mode(optional)security(default),troubleshooting,compliance,forensic,shadow-it
Every analysis includes the network diagnosis (network_diagnostics: verdict, problems with
fault domain, evidence and fix steps). mode sets the focus and layout of the PDF report.
Responses
- 200 OK Success
- 413 Payload Too Large Exceeds limits
cURL Example
curl -X POST https://pcapai.com/api/v1/upload \
-H "Authorization: Bearer $API_KEY" \
-F "[email protected]" \
-F "mode=troubleshooting"
JSON Response
{
"id": "d95f1a35-e923-4e7e-bd9c-3735f4b8b3ac"
}
Check Progress
GET /api/v1/checkPoll the processing status of your upload. The analysis and the PDF usually take a few minutes.
| Parameter | Type | Description |
|---|---|---|
| id | UUID | Job ID returned from the upload endpoint |
curl -H "Authorization: Bearer $API_KEY" \
"https://pcapai.com/api/v1/check?id=$UPLOAD_ID"
Pro Tip: We recommend exponential backoff for polling (e.g., 2s, 5s, 10s) to optimize resource usage.
Download Report
GET /api/v1/downloadRetrieve the finalized AI analysis as a binary PDF stream. Note: Files are automatically deleted 24 hours after upload for security.
curl -L -H "Authorization: Bearer $API_KEY" \
-o analysis_report.pdf \
"https://pcapai.com/api/v1/download?id=$UPLOAD_ID"
Content-Type: application/pdf
Content-Disposition: attachment; filename="report.pdf"
Content-Length: 1245082
Ready to automate?
Integrate Pcap AI into your incident response pipeline or CI/CD workflows for instant threat intelligence at scale.