File size: 1,398 Bytes
4346a4c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# REST API Reference & Endpoints

The Object Intelligence Platform exposes FastAPI REST endpoints alongside the Gradio UI.

---

## Endpoints

### 1. `POST /api/detect`
Run multi-pipeline detection on an uploaded image file.

**Form Data:**
- `file`: Image file (JPG/PNG)
- `mode`: `combined` | `known` | `open_vocabulary` | `specific`
- `lock_mode`: `true` | `false`
- `lock_target`: string (optional)
- `open_vocab_prompts`: comma-separated string (optional)
- `confidence`: float (default `0.45`)

**Response:**
```json
{
  "status": "success",
  "mode": "combined",
  "lock_mode": true,
  "lock_target": "My Cup",
  "detection_count": 1,
  "detections": [
    {
      "bbox": [120, 85, 340, 410],
      "label": "My Cup",
      "category": "cup",
      "confidence": 0.94,
      "type": "specific",
      "source": "embedding"
    }
  ]
}
```

---

### 2. `GET /api/objects`
List all user-taught specific objects stored in the database.

---

### 3. `POST /api/objects`
Teach a new specific object with reference images.

---

### 4. `DELETE /api/objects/{object_id}`
Delete a taught specific object and its associated vectors.

---

### 5. `GET /api/downloads/export-db`
Download a ZIP archive containing the complete custom object database (`objects.db`) and reference image manifest.

---

### 6. `GET /api/health`
Health check status endpoint. Returns model load statuses and system state.