Batch Processing

Batch processing endpoints for multiple files

Batch Image Inference

post
/batch_image

Batch image inference - Process multiple images in a single request for improved efficiency.

Maximum 50 images per request. Optimized for throughput and resource utilization.

mTLS (optional): If your client requires mTLS, include X-Client-Cert header.

Authorizations
AuthorizationstringRequired

Primary authentication method - Required for all endpoints except /health.

Three Authentication Methods:

1. OAuth 2.0 Client Credentials (Recommended)

Get token:

curl -X POST https://enterprise.bitmind.ai/v1/oauth/token \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_ID" \
  -d "client_secret=YOUR_SECRET"

Use token:

Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...
  • Token lifetime: 1 hour
  • Fast local JWT verification (<1ms)
  • Recommended for all M2M integrations

2. OAuth + mTLS (High Security)

Get token (certificate replaces secret):

curl -X POST https://enterprise.bitmind.ai/v1/oauth/token \
  -H "X-Client-Cert: $(base64 -w 0 client.crt)" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_ID"

Use token + certificate:

Authorization: Bearer eyJhbGc...
X-Client-Cert: LS0tLS1CRUdJTi...
  • Certificate authenticates token request (no client_secret)
  • Certificate also required on all API calls
  • Required for government/healthcare/financial clients
  • Complies with RFC 8705

3. Organization API Key (Legacy)

Authorization: Bearer enterprise-YOUR_API_KEY
  • Long-lived until revoked
  • No token refresh needed
  • Simple but less secure than OAuth
Header parameters
X-Client-Certstring · byteOptional

For mTLS clients only: Base64-encoded client certificate.

Body
imagesstring · binary[] · max: 50Required

Multiple image files (JPEG, PNG, WebP)

Responses
200

Batch image inference results

application/json
post
/batch_image
POST /batch_image HTTP/1.1
Host: enterprise.bitmind.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 21

{
  "images": [
    "binary"
  ]
}
{
  "batch_results": [
    {
      "isAI": true,
      "confidence": 0.8234,
      "processingTime": 0.043,
      "batch_position": 0
    },
    {
      "isAI": false,
      "confidence": 0.2891,
      "processingTime": 0.041,
      "batch_position": 1
    }
  ],
  "batch_count": 2,
  "total_time": 0.156,
  "request_id": "batch_img_1234567890"
}

Batch Video Inference

post
/batch_video

Batch video inference - Process multiple videos in a single request.

Maximum 20 videos per request. Optimized for processing multiple videos with improved throughput.

mTLS (optional): If your client requires mTLS, include X-Client-Cert header.

Authorizations
AuthorizationstringRequired

Primary authentication method - Required for all endpoints except /health.

Three Authentication Methods:

1. OAuth 2.0 Client Credentials (Recommended)

Get token:

curl -X POST https://enterprise.bitmind.ai/v1/oauth/token \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_ID" \
  -d "client_secret=YOUR_SECRET"

Use token:

Authorization: Bearer eyJhbGciOiJSUzI1NiJ9...
  • Token lifetime: 1 hour
  • Fast local JWT verification (<1ms)
  • Recommended for all M2M integrations

2. OAuth + mTLS (High Security)

Get token (certificate replaces secret):

curl -X POST https://enterprise.bitmind.ai/v1/oauth/token \
  -H "X-Client-Cert: $(base64 -w 0 client.crt)" \
  -d "grant_type=client_credentials" \
  -d "client_id=YOUR_ID"

Use token + certificate:

Authorization: Bearer eyJhbGc...
X-Client-Cert: LS0tLS1CRUdJTi...
  • Certificate authenticates token request (no client_secret)
  • Certificate also required on all API calls
  • Required for government/healthcare/financial clients
  • Complies with RFC 8705

3. Organization API Key (Legacy)

Authorization: Bearer enterprise-YOUR_API_KEY
  • Long-lived until revoked
  • No token refresh needed
  • Simple but less secure than OAuth
Header parameters
X-Client-Certstring · byteOptional

For mTLS clients only: Base64-encoded client certificate.

Body
videosstring · binary[] · max: 20Required

Multiple video files (MP4, AVI, MOV)

Responses
200

Batch video inference results

application/json
post
/batch_video
POST /batch_video HTTP/1.1
Host: enterprise.bitmind.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 21

{
  "videos": [
    "binary"
  ]
}
{
  "batch_results": [
    {
      "isAI": false,
      "confidence": 0.1234,
      "processingTime": 1.416,
      "batch_position": 0
    }
  ],
  "batch_count": 1,
  "total_time": 1.416,
  "request_id": "batch_vid_1234567890"
}

Last updated