HTTP API
REST API reference for uz_AutoShot. Manifest endpoints, filtering, photo existence checks, and directory structure.
HTTP API
The Node.js backend runs on http://127.0.0.1:3959 for API endpoints and upload processing. Photos are served via FiveM's native cfx-nui protocol, no port forwarding needed.
Endpoints
GET /api/manifest
Returns all captured photos.
GET http://127.0.0.1:3959/api/manifestResponse:
{
"generatedAt": 1711234567890,
"total": 2480,
"items": [
{
"url": "https://cfx-nui-uz_AutoShot/shots/male/11/5_0.png",
"file": "male/11/5_0.png",
"gender": "male",
"type": "component",
"id": 11,
"drawable": 5,
"texture": 0
},
{
"url": "https://cfx-nui-uz_AutoShot/shots/vehicles/adder.png",
"file": "vehicles/adder.png",
"gender": "unisex",
"type": "vehicle",
"id": 0,
"drawable": 0,
"texture": 0,
"model": "adder"
}
]
}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 can be component, prop, or overlay.
# 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/0
# All male facial hair (overlay 1)
GET http://127.0.0.1:3959/api/manifest/male/overlay/1Response:
{
"generatedAt": 1711234567890,
"total": 55,
"items": [
{ "url": "https://cfx-nui-uz_AutoShot/shots/male/11/0_0.png", "drawable": 0, "texture": 0 },
{ "url": "https://cfx-nui-uz_AutoShot/shots/male/11/1_0.png", "drawable": 1, "texture": 0 },
{ "url": "https://cfx-nui-uz_AutoShot/shots/male/11/2_0.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": 2480,
"byGender": { "male": 1200, "female": 980, "unisex": 300 },
"byType": { "component": 1600, "prop": 280, "overlay": 200, "vehicle": 250, "object": 150 }
}Photo URLs (cfx-nui)
Photos are served via FiveM's native cfx-nui protocol, no HTTP server needed for image delivery.
https://cfx-nui-uz_AutoShot/shots/male/11/5_0.png
https://cfx-nui-uz_AutoShot/shots/female/prop_0/3.png
https://cfx-nui-uz_AutoShot/shots/male/overlay_1/3.png
https://cfx-nui-uz_AutoShot/shots/vehicles/adder.png
https://cfx-nui-uz_AutoShot/shots/objects/prop_bench_01a.pngAfter generating new photos, restart the resource (ensure uz_AutoShot) so FiveM indexes the new files. Photos are cached on the client automatically.
Directory Structure
Photos are organized in the shots/ directory:
shots/
├── male/
│ ├── 2/ # Hair (component 2)
│ │ ├── 0_0.png # drawable 0, texture 0
│ │ ├── 1_0.png # drawable 1, texture 0
│ │ └── 2_1.png # drawable 2, texture 1
│ ├── 11/ # Tops (component 11)
│ ├── prop_0/ # Hats (prop 0)
│ └── overlay_1/ # Facial Hair (overlay 1)
│ ├── 0.png # drawable 0
│ └── 1.png # drawable 1
├── female/
│ └── ...
├── vehicles/
│ ├── adder.png
│ ├── zentorno.png
│ └── ...
└── objects/
├── prop_bench_01a.png
├── prop_laptop_01a.png
└── ...Naming convention:
- Components:
{gender}/{componentId}/{drawable}_{texture}.png - Props:
{gender}/prop_{propId}/{drawable}_{texture}.png - Overlays:
{gender}/overlay_{overlayIndex}/{drawable}.png(no texture suffix) - Vehicles:
vehicles/{modelName}.png - Objects:
objects/{modelName}.png
GTA V Category Reference
Components (clothing)
| Component ID | Label | Camera Preset |
|---|---|---|
| 2 | Hair | hair |
| 1 | Mask | mask |
| 3 | Arms / Gloves | arms_gloves |
| 4 | Pants | legs |
| 5 | Bags | decals |
| 6 | Shoes | shoes |
| 7 | Accessories | accessories |
| 8 | Undershirt | tops |
| 9 | Body Armor | body |
| 10 | Decals | decals |
| 11 | Tops | tops |
Props (accessories)
| Prop ID | Label | Camera Preset |
|---|---|---|
| 0 | Hats | hats |
| 1 | Glasses | glasses |
| 2 | Ears | ears |
| 6 | Watches | watches |
| 7 | Bracelets | bracelets |
Head Overlays (appearance)
| Overlay Index | Label | Camera Preset | Color Type |
|---|---|---|---|
| 0 | Blemishes | face_overlay | Hair |
| 1 | Facial Hair | face_overlay | Hair |
| 2 | Eyebrows | face_overlay | Hair |
| 3 | Ageing | face_overlay | Hair |
| 4 | Makeup | face_overlay | Makeup |
| 5 | Blush | face_overlay | Makeup |
| 6 | Complexion | face_overlay | Hair |
| 7 | Sun Damage | face_overlay | Hair |
| 8 | Lipstick | face_overlay | Makeup |
| 9 | Moles & Freckles | face_overlay | Hair |
| 10 | Chest Hair | chest_overlay | Hair |
| 11 | Body Blemishes | chest_overlay | Hair |
Vehicle Classes (auto-detected)
| Class ID | Label |
|---|---|
| 0 | Compacts |
| 1 | Sedans |
| 2 | SUVs |
| 3 | Coupes |
| 4 | Muscle |
| 5 | Sports Classics |
| 6 | Sports |
| 7 | Super |
| 8 | Motorcycles |
| 9 | Off-Road |
| 10-22 | Industrial, Utility, Vans, Boats, Aircraft, Service, Emergency, Military, etc. |