canonical: https://jentic.com/apis/api.lytx.com/lytx

# Lytx DriveCam API

Jentic publishes the only available OpenAPI specification for Lytx DriveCam API, keeping it validated and agent-ready. Lytx DriveCam is a fleet video telematics platform that records driving events, tracks vehicles via GPS, and surfaces unsafe driving behaviour. The API exposes 15 endpoints covering authentication, devices, vehicles, GPS, safety events, video, Hours of Service, trips, DVIR, ECM, geofences, distances, groups, and users. Fleet operators use it to feed safety dashboards, driver scorecards, and compliance reports without scraping the Lytx web portal.

## For AI agents

Pull fleet telematics from Lytx DriveCam: list vehicles and devices, retrieve GPS history, safety events, video, Hours of Service, trips, DVIR reports, geofences, and driver assignments.

## Scope

Does not handle fleet maintenance scheduling, fuel card data, or insurance claim processing - use for fleet video telematics and driver behaviour data only.

## Capabilities

- Authenticate against Lytx and obtain a bearer token for downstream calls
- List every vehicle and device enrolled in a Lytx fleet account
- Retrieve GPS breadcrumbs for a vehicle over a chosen time window
- Pull safety events such as harsh braking, distracted driving, and collisions for review
- Fetch video clips associated with a triggered safety event
- Read Hours of Service logs and DVIR (driver vehicle inspection report) data for compliance
- Query trips, distances, geofences, ECM data, groups, and driver assignments to power scorecards

## Use cases

### Driver Safety Scorecard

Build per-driver safety scorecards by pulling /safety events and /trips data, then weighting harsh braking, speeding, and distraction events against miles driven. Fleets typically combine /vehicles, /driverassignments, and /safety to attribute events to the right driver. Integration takes 3 to 5 days to wire up daily refresh and historical backfill.

Example prompt: Authenticate via `/auth/user`, then fetch /safety events for the past 7 days, join with /driverassignments to map events to driverId, and compute a per-driver score weighted by /distances data.

### Hours of Service Compliance

Pull /hos data and /dvir reports nightly to feed FMCSA compliance dashboards and flag drivers approaching their daily or weekly driving limits. The Lytx API provides the raw status changes so compliance officers can audit logs without using the Lytx portal. Most teams build this in a week.

Example prompt: Pull /hos for all drivers for the last 24 hours and flag any driver whose accumulated drive time exceeds 10 hours, then attach the matching /dvir record.

### Incident Video Retrieval

When a safety event is triggered or a customer complaint is filed, retrieve the matching video clip via /video using the safety event ID. Risk and claims teams use this to review collisions and unsafe behaviour before sharing with insurers. Setup is straightforward - under a day for a basic clip retrieval workflow.

Example prompt: Look up safety event SE-9921 from /safety, then call /video with that event ID to retrieve the associated clip URL and store it against the incident record.

### AI Agent Fleet Operations Assistant

An ops manager can ask an AI agent 'which drivers had harsh braking events yesterday' or 'pull the dashcam video for the 3pm incident on truck 412' and have the agent call Lytx through Jentic. Jentic isolates the bearer token in your Jentic One instance and surfaces operations by intent. Setup is under an hour.

Example prompt: Use Jentic to search for 'list safety events for a driver', load the /safety operation schema, execute it with driverId 4421 for the last 24 hours, and summarise the events in a Slack message.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/auth/user` | Authenticate and obtain bearer token |
| GET | `/vehicles/all` | List all vehicles in the fleet |
| GET | `/safety` | Get safety events such as harsh braking and collisions |
| GET | `/video` | Retrieve video clips for safety events |
| GET | `/gps` | Get GPS breadcrumbs for vehicles |
| GET | `/hos` | Get Hours of Service data for drivers |
| GET | `/dvir` | Retrieve DVIR inspection reports |
| GET | `/trips` | List completed trips with distance and duration |

## Key resources

- **Vehicles** — List every vehicle enrolled in the fleet with metadata
- **Devices** — List DriveCam and ECM devices installed across the fleet
- **GPS** — Retrieve GPS breadcrumbs and current location data
- **Safety** — Pull safety events including harsh braking, distraction, and collision triggers
- **Video** — Retrieve video clips associated with safety events
- **HOS and DVIR** — Access Hours of Service status and Driver Vehicle Inspection Reports
- **Trips and Distances** — Query completed trips and distance totals per vehicle and driver
- **Geofences** — Manage and query geofence definitions and entry/exit events

## Why Jentic

- **Setup:** Wiring the Lytx DriveCam API by hand means running its auth/user login for a bearer token and coding your own reads of the vehicles, safety, gps, and trips endpoints. Through Jentic you install once, import the Lytx DriveCam API from the API Directory, store the credential once, and your agent calls it.
- **Permission scoping:** Lytx query filters travel as request parameters rather than as ids in the URL path, and its data endpoints are read-only, so limit the agent to the read operations it needs, such as vehicles/all, safety, or trips. Every operation you grant is your explicit choice.
- **Credential handling:** Your Lytx credential is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'list fleet vehicles' or 'read driver safety events', and Jentic returns the matching Lytx operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Samsara API** — Connected operations platform with fleet telematics, video, and IoT sensors
- **HERE Maps API** — Mapping and geospatial service used to visualise fleet GPS data
- **TomTom Routing API** — Routing engine for fleet route planning with traffic awareness

## FAQ

### Why is there no official OpenAPI spec for Lytx DriveCam API?

Lytx does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Lytx DriveCam API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Lytx DriveCam API use?

The API uses HTTP bearer authentication. Call POST `/auth/user` with your Lytx credentials to obtain a bearer token, then send it on every subsequent request. Through Jentic, Lytx credentials live in your Jentic One instance - the agent never sees the raw username, password, or token.

### Can I retrieve dashcam video clips with the Lytx DriveCam API?

Yes. The /video endpoint returns clip metadata and URLs associated with safety events. Look up the event in /safety first to get its event ID, then call /video to retrieve the clip.

### What are the rate limits for the Lytx DriveCam API?

Lytx does not publish a public rate limit policy. Limits are tied to your account contract - your Lytx implementation manager can confirm the per-second and per-day caps.

### How do I build a driver safety scorecard with the Lytx DriveCam API through Jentic?

Run pip install jentic, then search for 'list safety events'. Jentic returns the /safety operation schema. Execute it for the relevant time window and join the results to /driverassignments and /distances to compute per-driver scores.

### Does the Lytx DriveCam API expose Hours of Service data?

Yes. GET /hos returns Hours of Service status and duty changes for drivers. Pair it with /dvir for a complete FMCSA-style compliance feed for nightly reporting.

### Can I limit what my agent is allowed to do with the Lytx DriveCam API?

Yes. Because Jentic One is self-hosted, you decide which Lytx operations and which credential the agent may use, and it can only call what you grant. The Lytx DriveCam data endpoints are read-only, so you can restrict the agent to just the reads it needs, such as vehicles/all, safety, or trips, and withhold the rest. Since Lytx query filters travel as request parameters rather than path ids, every operation the agent can reach is one you have explicitly allowed.
