API
The browser talks through the BFF; producer workers connect to the BFF with a service token.
BFF
Protected by the session (Auth.js). The browser only talks to these endpoints.
| Method | Path | Description |
|---|---|---|
| POST | /api/bff/uploads | Upload image → image_url |
| POST | /api/bff/jobs | Create job |
| GET | /api/bff/jobs/:id | Job status |
| GET | /api/bff/jobs/:id/result | Result GLB |
| GET | /api/bff/me | Session + account + wallet |
| POST | /api/bff/billing/checkout | Stripe Checkout session |
| POST | /api/bff/billing/webhook | Stripe webhook |
| GET | /api/bff/health | Service health |
Producer
Accessed through the BFF proxy with the X-Service-Token header; there is no direct access to core-service.
| Method | Path | Description |
|---|---|---|
| GET | /api/v1/models/best-fit | Hardware-matched model |
| GET | /api/v1/models/download | Model file |
| POST | /api/v1/resources | GPU resource offer |
| POST | /api/v1/resources/:id/heartbeat | Liveness |
| POST | /api/v1/resources/:id/status | Status |
| GET | /api/v1/jobs | Queue query |
| POST | /api/v1/jobs/:id/assign | Claim job |
| POST | /api/v1/jobs/:id/complete | Complete job |
| PUT | /api/v1/jobs/:id/result | Upload GLB |
| GET | /api/v1/uploads/:id | Input image |