Reeve
Services API

Services API

Python FastAPI backend providing authentication, connectors, billing, and analytics.

Services API

The Reeve Services API is a Python FastAPI application that provides the backend infrastructure for Reeve Cloud. It handles authentication, OAuth connectors, billing, analytics, and background jobs.

What It Does

The gateway handles AI agent execution. The Services API handles everything else:

DomainEndpointsPurpose
Auth/api/auth/Session management, magic links, Clerk integration
Connectors/api/connectors/, /api/oauth/OAuth flows for Meta, Google, TikTok, Shopify
Credits/api/credits/Credit balance, purchases, deductions
Dashboard/api/dashboard/Unified analytics aggregation
Brand Intel/api/brand/Brand analysis, competitors, ad intelligence
Billing/api/billing/, /api/tier/Tier metering, usage quotas
Apps/api/apps/App Store registry, reviews
Social/api/social/Social account management, trends
Connectors/api/deployment-connectors/Vercel, Railway, GitHub integrations

Tech Stack

  • Framework: FastAPI (Python 3.11+)
  • Database: PostgreSQL (via SQLAlchemy ORM)
  • Hosting: Railway
  • Auth: Clerk + session tokens
  • Payments: Stripe

Architecture

Frontend (Vercel)

    ├── /api/auth/*      ──▶ Services API (Railway)
    ├── /api/credits/*   ──▶      │
    ├── /api/connectors/*──▶      ├── PostgreSQL (RDS)
    ├── /api/brand/*     ──▶      ├── External APIs
    └── /api/dashboard/* ──▶      └── Stripe
    
Gateway (Docker)

    └── /api/credits/deduct ──▶ Services API
        X-Reeve-Services-Token

Two auth modes:

  • User requests: Authorization: Bearer <session-token>
  • Service requests: X-Reeve-Services-Token: <shared-secret> (gateway → services)

On this page