BAGLE

Get started with BAGLE

Encode any signal into 128 coefficients with one API call

BAGLE encodes any numeric signal — biosignals, environmental data, sensor streams — into exactly 128 frequency-domain coefficients. Same math powering live dust prediction nodes and health screening models.

Prerequisites

Bagle Account

You need an active account to access the developer console.

API Key

Your unique authentication token for making requests.

Authorization: Bearer YOUR_API_KEY

Health check endpoint works without a key.

Call the API

Check API health

Verify the API is running (no key needed for health check):

bash
curl https://bagle-api.fly.dev/api/v1/health
Example Output
{
  "status": "healthy",
  "version": "1.0.0",
  "node_id": "univault-primary"
}

Encode a signal

Send any numeric array and get back 128 GLE coefficients. Needs ~16,000 samples for full 128 output:

bash
curl -X POST https://bagle-api.fly.dev/api/v1/encode \
  -H "Content-Type: application/json" \
  -d '{
    "samples": [0.456, -0.123, 0.789, 1.234, ...],
    "sample_rate": 16000
  }'
Example Output
{
  "coefficients": [0.234, -0.567, 0.123, ...],
  "dimensions": 128,
  "encoding_time_ms": 215,
  "version": "1.0.0",
  "node_id": "univault-primary"
}

Compare two encodings

Measure cosine similarity between two coefficient arrays:

bash
curl -X POST https://bagle-api.fly.dev/api/v1/similarity \
  -H "Content-Type: application/json" \
  -d '{
    "a": [0.234, -0.567, ...],
    "b": [0.238, -0.561, ...]
  }'
Example Output
{
  "similarity": 0.94,
  "match": true,
  "threshold": 0.85
}

Try It Live

Test the API directly from your browser. No setup required — uses a public sandbox key.

API SandboxTry it live
No key needed
GEThttps://bagle-api.fly.dev/api/v1/health

Next steps