API Reference
Complete API documentation for YOLO-Toys.
Available Protocols
| Protocol | Use Case | Latency |
|---|---|---|
| REST API | Single image inference, batch processing | Medium |
| WebSocket | Real-time video streaming | Low |
Quick Example
bash
# REST API
curl -X POST "http://localhost:8000/infer" \
-F "file=@image.jpg" \
-F "model=yolov8n.pt"javascript
// WebSocket
const ws = new WebSocket('ws://localhost:8000/ws');
ws.send(blob); // Send JPEG frame