Vehk SDKs Overview
Official vehk-axle SDKs v2.0 for Vehk Axle: telemetry, ML predictions, GPS tracking (registered devices), and device listing via the External API (/api/external/*).
Quick Install
- Python
- JavaScript/TypeScript
pip install vehk-axle
npm install vehk-axle
Features (v2.0)
| Feature | Python SDK | JavaScript SDK |
|---|---|---|
| Send telemetry | ✅ | ✅ |
| Batch telemetry | ✅ | ✅ |
| ML predict | ✅ | ✅ |
| List predictions | ✅ | ✅ |
| List vehicles | ✅ | ✅ |
| GPS track (per device) | ✅ | ✅ |
| Batch track | ✅ | ✅ |
| Device locations (fleet / single) | ✅ | ✅ |
| List devices | ✅ | ✅ |
| TypeScript types | N/A | ✅ |
| Automatic retries (Python) | ✅ | — |
| Health check (no auth) | ✅ | ✅ |
API keys & scopes
Create keys in Dashboard → Settings → API Keys. Each key carries scopes that gate External API access (examples):
| Scope | Used for |
|---|---|
telemetry:write | POST /api/external/telemetry, batch |
tracking:write | POST /api/external/track, track batch |
predict | POST /api/external/predict, list predictions |
vehicles:read | GET /api/external/vehicles |
devices:read | GET /api/external/devices, locations |
Use header X-API-Key. The public health endpoint is unauthenticated: GET /api/external/health.
Device tracking: register the device in Axle first (Device Configurator), then send points with that device’s ID or IMEI—see Tracking in the language guides.
Billing & limits
The External API expects an active or trialing subscription for your tenant (strict billing in production). Without it, protected routes may return 403 with guidance to subscribe or upgrade.
- Rate limits: key
rate_limitmerges with plan caps (requests per minute). - Predict: usage may be metered against prediction token quotas.
- Responses may include
X-Subscription-Status(e.g. grace). Ops-only bypass: server flagEXTERNAL_API_BYPASS_BILLING(not for production tenants).
See Pricing for plans and caps.
Base URL
Packages default to the deployed Container Apps host:
https://vehk-api.bravedune-34ccdec3.centralindia.azurecontainerapps.io
Override in code if your tenant uses a different API host (self-hosted or custom domain).
Authentication
# Python
from vehk_axle import VehkClient
client = VehkClient(api_key="vehk_your_api_key_here")
// JavaScript/TypeScript
import { VehkClient } from 'vehk-axle';
const client = new VehkClient('vehk_your_api_key_here');
Quick Example
- Python
- JavaScript/TypeScript
from vehk_axle import VehkClient
client = VehkClient(api_key="vehk_your_key")
# Telemetry (vehicle-scoped)
client.telemetry.send(
vehicle_id="TRUCK-001",
sensor_data={"speed": 65, "rpm": 2500, "coolant_temp": 92},
)
# GPS track (device must exist in Device Config)
client.tracking.send(
device_id="862061048760001",
latitude=12.9716,
longitude=77.5946,
speed=45.2,
ignition=True,
)
# ML prediction
prediction = client.predict("TRUCK-001", {"speed": 65, "rpm": 2500})
print(f"Health: {prediction.health_score}% — {prediction.health_status.value}")
import { VehkClient } from 'vehk-axle';
const client = new VehkClient('vehk_your_key');
await client.telemetry.send({
vehicle_id: 'TRUCK-001',
sensor_data: { speed: 65, rpm: 2500, coolant_temp: 92 },
});
await client.tracking.send({
device_id: '862061048760001',
latitude: 12.9716,
longitude: 77.5946,
speed: 45.2,
ignition: true,
});
const prediction = await client.predictions.get('TRUCK-001', {
speed: 65,
rpm: 2500,
});
console.log(`Health: ${prediction.health_score}%`);
Package Links
Next Steps
- Python SDK Reference — telemetry, predict, tracking, devices, errors
- JavaScript SDK Reference — same, plus TypeScript types
- Device Configurator — register devices before
tracking.send - API Reference — REST details alongside the SDK