uz_AutoShot
HTTP API
REST API reference for uz_AutoShot — manifest endpoints, image serving, and photo existence checks.
HTTP API
The Node.js backend runs on http://127.0.0.1:3959. All endpoints return JSON (except image serving) and include CORS headers for direct NUI access.
Endpoints
GET /api/manifest
Returns all captured photos.
GET http://127.0.0.1:3959/api/manifestResponse:
{
"generatedAt": 1711234567890,
"total": 1240,
"items": [
{
"url": "http://127.0.0.1:3959/shots/male/11/5_0.png",
"file": "male/11/5_0.png",
"gender": "male",
"type": "component",
"id": 11,
"drawable": 5,
"texture": 0
}
]
}GET /api/manifest/:gender
Filter by gender.
GET http://127.0.0.1:3959/api/manifest/male
GET http://127.0.0.1:3959/api/manifest/femaleGET /api/manifest/:gender/:type/:id
Filter by specific category. type is component or prop.
# All male tops (component 11)
GET http://127.0.0.1:3959/api/manifest/male/component/11
# All female hats (prop 0)
GET http://127.0.0.1:3959/api/manifest/female/prop/0Response:
{
"generatedAt": 1711234567890,
"total": 55,
"items": [
{ "url": "http://127.0.0.1:3959/shots/male/11/0.png", "drawable": 0, "texture": 0 },
{ "url": "http://127.0.0.1:3959/shots/male/11/1.png", "drawable": 1, "texture": 0 },
{ "url": "http://127.0.0.1:3959/shots/male/11/2.png", "drawable": 2, "texture": 0 }
]
}GET /api/exists
Check if a specific photo has been captured.
GET http://127.0.0.1:3959/api/exists?gender=male&type=component&id=11&drawable=5&texture=0Response:
{ "exists": true }GET /api/stats
Summary statistics for all captured photos.
GET http://127.0.0.1:3959/api/statsResponse:
{
"total": 1240,
"byGender": { "male": 800, "female": 440 },
"byType": { "component": 1100, "prop": 140 }
}GET /shots/...
Serves the actual image files. Supports .png, .webp, and .jpg.
# Direct image URL
GET http://127.0.0.1:3959/shots/male/11/5_0.png
GET http://127.0.0.1:3959/shots/female/prop_0/3.pngImages are served with Cache-Control: no-cache to ensure fresh content after re-captures.
Directory Structure
Photos are organized in the shots/ directory:
shots/
├── male/
│ ├── 1/ # Mask (component 1)
│ │ ├── 0.png # drawable 0, texture 0
│ │ ├── 1.png # drawable 1, texture 0
│ │ └── 2_1.png # drawable 2, texture 1
│ ├── 11/ # Tops (component 11)
│ └── prop_0/ # Hats (prop 0)
└── female/
├── 11/
└── prop_0/Naming convention:
- Components:
{gender}/{componentId}/{drawableId}.pngor{gender}/{componentId}/{drawableId}_{textureId}.png - Props:
{gender}/prop_{propId}/{drawableId}.pngor{gender}/prop_{propId}/{drawableId}_{textureId}.png - Texture suffix is omitted when
textureIdis0
GTA V Category Reference
Components (clothing)
| Component ID | Label | Camera Preset |
|---|---|---|
| 1 | Mask | head |
| 3 | Arms / Gloves | torso |
| 4 | Pants | legs |
| 5 | Bags | bags |
| 6 | Shoes | shoes |
| 7 | Accessories | accessories |
| 8 | Undershirt | torso |
| 9 | Body Armor | torso |
| 10 | Decals | torso |
| 11 | Tops | torso |
Props (accessories)
| Prop ID | Label | Camera Preset |
|---|---|---|
| 0 | Hats | hats |
| 1 | Glasses | glasses |
| 2 | Ears | ears |
| 6 | Watches | watches |
| 7 | Bracelets | bracelets |