Hardware API
A capability-based device integration system. Devices declare what they can do, exercises declare what capabilities they can use, and the system matches them automatically.
Quick Start
GET /api/devices/registry — Browse device descriptors
GET /api/devices/registry/schema — Descriptor JSON schema + capabilities
POST /api/devices/registry/propose — Submit a new device
GET /api/devices/registry/stats — Registry statistics
Core Concepts
Device Descriptor
What a device IS and CAN DO — its capabilities, params, metrics, and connection protocol.
Hardware Enhancement
What an exercise CAN USE — capabilities it benefits from (e.g. variable_resistance, force_measurement).
Device Program
Timed command sequences for interval/ramp workouts — steps with triggers, actions, and params.
Capability Vocabulary
24 standard capabilities across 4 categories. Devices and exercises reference these by ID.
Load
variable_resistanceeccentric_controlisometric_holdspeed_controlincline_controlresistance_controlTracking
force_measurementposition_trackingvelocity_trackingpower_trackingcadence_trackingdistance_trackingpace_trackingheart_rate_monitorheart_rate_passthroughstep_countergps_trackingaccelerometerbalance_measurementFeedback
haptic_feedbackaudio_feedbackvisual_feedbackControl
programmable_sequencerow_simulationDevice Tiers
Full OWS protocol support. Real-time WebSocket communication, zero-latency control, full metrics streaming.
BLE FTMS, ANT+ FE-C. Industry-standard protocols for treadmills, bikes, rowers, heart rate monitors.
Manual/limited. Custom JSON descriptors, HTTP polling, or user-entered data.
API Endpoints
/api/devices/registryList all built-in device descriptors. Add ?include=community to include approved community contributions.
include (string) — "community" to include approved community descriptorsDeviceDescriptor[]/api/devices/registry/schemaReturns the JSON schema for device descriptors, the capability vocabulary, and an example descriptor.
{ schema, capabilities, example }/api/devices/registry/statsRegistry statistics: built-in count, community count, breakdown by category.
{ builtIn: { total, byCategory }, community: { total, approved, pending, rejected, byCategory } }/api/devices/registry/proposeRequires userId in bodySubmit a new device descriptor for community review. Validates against the schema and checks for duplicates.
descriptor (DeviceDescriptor) — Full device descriptor objectsubmittedBy (string) — User ID of the submittercitations (Citation[]) — Optional supporting links (manufacturer docs, teardowns, etc.)context (string) — Optional notes about the submission{ decision, reasoning, entryId, descriptorId }/api/devices/registry/feedback?registryEntryId=...Get community votes for a registry entry.
{ feedback, upCount, downCount, total }/api/devices/registry/feedbackVote on a device descriptor (up/down).
registryEntryId (string) — Registry entry IDuserId (string) — Voter user IDvote ("up" | "down") — Vote directioncomment (string) — Optional comment{ feedbackId, newConfidence }Contributing Devices
Tell the AI about your device and it will suggest hardware enhancements for your exercises automatically.
- Connect your device on the Connections page
- Ask the AI to create an exercise using your device
- The AI will include hardware enhancements based on your device capabilities
Create a JSON descriptor for your device following the schema. Paste it in the "Custom Device" tab on the Connections page.
- Fetch the schema from /api/devices/registry/schema
- Create a JSON file following the schema
- Open Connections → Add Device → Custom Device tab
- Paste your JSON and validate
Submit your device descriptor to the public registry so other users can benefit.
- Create and validate your descriptor (Custom Device tab)
- Click "Submit to Registry" to propose it
- The submission goes through validation and admin review
- Once approved, it appears in the Compatible Devices list for all users
Vote on pending device descriptors to help the community. Your votes affect the confidence score.
- Browse pending descriptors on the Connections page
- Review the descriptor details and capabilities
- Vote up if accurate, down if incorrect
- Optionally leave a comment with details
Example Descriptor
{
"id": "garmin-forerunner-965",
"name": "Garmin Forerunner 965",
"manufacturer": "Garmin",
"category": "sensor",
"capabilities": [
"heart_rate_monitor",
"gps_tracking",
"cadence_tracking",
"pace_tracking",
"distance_tracking"
],
"controllableParams": {},
"reportedMetrics": {
"heart_rate_bpm": { "unit": "bpm", "rate_hz": 1 },
"cadence_spm": { "unit": "spm", "rate_hz": 1 },
"pace_min_km": { "unit": "min/km", "rate_hz": 1 },
"distance_km": { "unit": "km", "rate_hz": 1 }
},
"connection": {
"discovery": ["ble"]
},
"notes": "GPS multisport watch with optical HR, running dynamics."
}The Hardware API is open. Device descriptors include provenance tracking, contributor history, and confidence scores. No account required to browse the registry.