Documentation Index
Fetch the complete documentation index at: https://mintlify.com/MatthewSabia1/SubPirate-Pro/llms.txt
Use this file to discover all available pages before exploring further.
Base URLs
The SubPirate Pro API is available at different endpoints depending on your environment:npm run dev:all, the API server runs on port 8787. The Vite dev server on port 5173 automatically proxies /api/* requests to this server.Response Format
All API responses use JSON format with consistent patterns:Success Response
Error Response
Human-readable error message
Additional error context when available
Common Error Codes
The API uses standard HTTP status codes:Request succeeded
Invalid request parameters or malformed JSON
Missing or invalid authentication tokenor
Valid authentication but insufficient permissions, or origin not allowedor
Requested resource does not exist
Resource conflict (e.g., subscription already exists)
Server-side error occurred
Upstream service (Reddit, OpenRouter) returned an error
Rate Limiting
All/api/* endpoints are rate-limited to prevent abuse:
15 minutes
300 requests per window
429 Too Many Requests response.
CORS
The API implements CORS (Cross-Origin Resource Sharing) to allow browser-based clients:- Allowed Origins: Configurable via
CORS_ORIGINSenvironment variable (comma-separated) - Default (Development):
http://localhost:5173,http://127.0.0.1:5173 - Allowed Methods:
GET, POST, PUT, PATCH, DELETE, OPTIONS - Allowed Headers:
Content-Type, Authorization
CORS_ORIGINS, any local network origin is automatically allowed (localhost, 127.0.0.1, private IP ranges).
Health Check
Check API availability with the health endpoint:Always returns
"ok" if the server is runningISO 8601 timestamp of the response