A FastAPI service that exposes a YOLOv8 object detection model behind authenticated endpoints. Upload an image and get back detected objects with bounding boxes, class names, and confidence scores.
All detection endpoints require a Bearer token via the Authorization header.
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /health |
No | Health check |
| POST | /detect |
Yes | Detect all objects in an image |
| POST | /detect/classes |
Yes | Detect objects, optionally filtering by class |
uv syncuv run takk dotenvThis generates a .env file with the required configuration, including API_BEARER_TOKEN and service URLs resolved by takk.
uv run takk upThis builds the Docker image and starts the API. The health check at /health is used to verify the service is ready.
uv run takk testThis starts the application (if not already running), resolves service URLs and secrets, then runs the integration test suite against the live API.
project.py # Takk project definition (services, settings)
src/
app.py # FastAPI application with YOLO model and auth
settings.py # Pydantic settings for test configuration
tests/
test_api.py # Integration tests for all endpoints