Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
metadata
title: RewardPilot API
emoji: π³
colorFrom: green
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
RewardPilot API
FastAPI backend for the RewardPilot mobile app β the deterministic credit-card scoring engine plus an OpenAI-powered, no-hallucination "why this card" narration.
Endpoints
GET /healthβ status + whether the LLM key is configuredGET /cardsβ card cataloguePOST /recommendβ optimal card for a text/structured query (+ LLM narration)POST /voiceβ audio β transcript β recommendation (needs OpenAI key)POST /statements/parseβ upload PDF/CSV β normalized transactionsPOST /transactions/analyzeβ were optimal cards used? how much lost?GET /discover/{card_id}β apply-for details + extra benefits
Configuration
Set OPENAI_API_KEY as a Space secret (Settings β Variables and secrets).
The key is used only for the natural-language reasoning; the engine computes all
numbers and the ranking deterministically. Without the key the API still works
and returns the deterministic explanation.
The numbers and ranking are never produced by the LLM β the model is constrained to rephrase the engine's facts, forbidden from stating figures or naming cards not in the input, and any violating output is discarded server-side.