docs: add trace-thumb endpoint to Studio handoff

This commit is contained in:
Accusys
2026-08-01 02:28:52 +08:00
parent 57f542fdad
commit 1602656fb6
@@ -15,7 +15,25 @@ Loading face groups for large files (e.g., Charade with 153 groups, 2,451 traces
These changes are already on the Core side. Studio just needs to use the new endpoints. These changes are already on the Core side. Studio just needs to use the new endpoints.
### A. Thumbnail API Now Uses Pre-Cached key_face.jpg ### A. New Simple Thumbnail Endpoint (Recommended)
**Endpoint:** `GET /api/v1/trace-thumb/{uuid}/{trace_id}`
Returns `output/{uuid}/trace_{trace_id}/key_face.jpg` directly. No query params, no ffmpeg.
| Scenario | Time |
|----------|------|
| Any request | **~8ms** (read file) |
**Studio usage:**
```typescript
// In loadTraceThumb or img src:
const url = `/api/v1/trace-thumb/${fileUuid}/${traceId}`
// or
<img :src="`/api/v1/trace-thumb/${t.file_uuid}/${t.trace_id}`">
```
### B. Thumbnail API Also Uses Pre-Cached key_face.jpg (Fallback)
**Endpoint:** `GET /api/v1/face-thumbnail?uuid={uuid}&trace_id={tid}&frame={frame}` **Endpoint:** `GET /api/v1/face-thumbnail?uuid={uuid}&trace_id={tid}&frame={frame}`
@@ -24,9 +42,8 @@ The API now checks `output/{uuid}/trace_{tid}/key_face.jpg` before falling back
| Scenario | Before | After | | Scenario | Before | After |
|----------|--------|-------| |----------|--------|-------|
| First request | ~500ms (ffmpeg) | **~8ms** (read file) | | First request | ~500ms (ffmpeg) | **~8ms** (read file) |
| All traces have key_face.jpg | Yes | ✅ Used automatically |
**Studio action:** No code change needed. Just pass `trace_id` in the thumbnail request. **Studio action:** Use endpoint A (simpler URL) when you have trace_id.
### B. Face-Groups API Supports Payload Reduction ### B. Face-Groups API Supports Payload Reduction