API Processing

Learn how to process requests with PerceptOS APIs and optimize your integration for performance.

Image Input Formats

You can submit images to the API in multiple formats:

URL-based

Pass a publicly accessible image URL. Supports HTTP/HTTPS.

Base64 Encoded

Encode the image in base64 format for direct upload without storing on external servers.

Form Multipart

Upload raw image files using form-data for large binary files.

Supported formats: JPEG, PNG, WebP, and GIF (max 50MB)

Processing Parameters

Fine-tune API behavior with these common parameters:

confidence

float

Minimum confidence score for detections (0.0 - 1.0, default: 0.5)

"confidence": 0.75

max_results

int

Maximum number of results to return (1-100, default: 10)

"max_results": 25

format

string

Output format: json or xml (default: json)

"format": "json"

Processing Time

Processing time depends on image size and complexity:

  • Small images (<1MB):100-300ms average
  • Medium images (1-10MB):300-800ms average
  • Large images (>10MB):800ms-2s average

Example Request

json
{
  "image": "https://example.com/photo.jpg",
  "confidence": 0.7,
  "max_results": 20,
  "format": "json"
}