Developer docs
Build AI pre-trip inspections into your product
Rigsight turns a driver's photos and short videos into a structured inspection result: PASS, NEEDS_REPAIR or OUT_OF_SERVICE, with every defect located and explained. These docs describe how to run that flow from your own TMS, fleet app or driver app.
What you can build
- REST API — create inspections (PTIs), upload media through signed URLs, read results, record human review decisions, manage trucks and confirm repairs.
- Webhooks — get a signed HTTP callback the moment an inspection completes, a truck is flagged out of service, a reviewer decides, or a defect keeps coming back.
- Embed agent — drop the
<rigsight-pti>web component into any page to let drivers upload and dispatchers review results in a 3D truck view, without building the UI yourself.
AI recommends, people decide
requires_human_review: true. Rigsight never grounds or clears a truck by itself; a qualified person records the final decision through the review endpoint or the embed agent.Base URL
All API requests are made over HTTPS to a versioned base URL. Requests and responses use JSON (UTF-8).
https://api.rigsight.uz/v1Timestamps are ISO 8601 in UTC (for example 2026-11-28T09:14:03Z). Object ids are prefixed by type: pti_, trk_, def_, med_, whk_.
Quickstart
The full inspection flow is four calls. Use a test key while you build; test PTIs are analysed but never billed.
01Get an API key
Beta partners receive a secret key from the Rigsight team. Keys look like
rs_live_…(production) orrs_test_…(sandbox) and are sent as a Bearer token. See Authentication.Shell export RIGSIGHT_KEY="rs_test_…"02Create a PTI
Tell Rigsight which truck is being inspected and which media files you are about to upload. The response contains a PTI id and one signed upload URL per file.
Shell curl https://api.rigsight.uz/v1/ptis \ -H "Authorization: Bearer $RIGSIGHT_KEY" \ -H "Content-Type: application/json" \ -H "Accept-Language: en" \ -d '{ "truck": "1045", "type": "pre_trip", "media": [ { "kind": "photo", "content_type": "image/jpeg", "size_bytes": 2483021 }, { "kind": "video", "content_type": "video/mp4", "size_bytes": 48210233 } ] }'03Upload media to the signed URLs
PUT the raw bytes of each file to its
upload_urlwith the returned headers. Files go straight to storage, not through the API. URLs expire after 15 minutes.Shell curl -X PUT "https://media.rigsight.uz/u/med_01…?sig=…" \ -H "Content-Type: image/jpeg" \ --data-binary @left-front-tire.jpg04Submit and receive the webhook
Call
submitonce all uploads have finished. Analysis typically takes 1–3 minutes; Rigsight then sends apti.completedwebhook (andpti.out_of_serviceif critical defects were found). You can also pollGET /v1/ptis/{id}.Shell curl -X POST https://api.rigsight.uz/v1/ptis/pti_9f2c…/submit \ -H "Authorization: Bearer $RIGSIGHT_KEY" # → { "id": "pti_9f2c…", "state": "processing" }
Explore the docs
- Authentication →API keys, scopes, rotation, report language and tenant isolation.
- API reference →Every REST endpoint with parameters, examples and errors.
- Webhooks →Events, payloads, signature verification, retries and idempotency.
- Embed agent →The <rigsight-pti> web component, tokens, DOM events and CSP.
- Errors & limits →Error format, status codes, rate limits, idempotency and versioning.