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. Subscribers can generate and manage API keys via the dashboard under 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: file Binary File Data

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 "file=@capture.pcap"

JSON Response

{
  "id": "d95f1a35-e923-4e7e-bd9c-3735f4b8b3ac"
}

Check Progress

GET /api/v1/check

Poll the processing status of your upload. Smaller files are usually complete within seconds.

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/download

Retrieve the finalized AI analysis as a binary PDF stream. Note: Files are automatically deleted after 60 minutes for security.

curl -L -H "Authorization: Bearer $API_KEY" \
  -o analysis_report.pdf \
  "https://pcapai.com/api/v1/download?id=$UPLOAD_ID"
Response Headers 200 OK

Content-Type: application/pdf

Content-Disposition: attachment; filename="report.pdf"

Content-Length: 1245082