docs(social): credit pricing (5 + posts) + auth on scrape endpoints

Merged
SW
4mo ago
+114-1

Summary

Contract PR for the credit-gate item on recoupable/chat#1836 (pricing per the cost research). Merge before the api PR.

  • Both scrape endpoints: "Costs 5 credits, plus 1 credit per post requested via posts" (bulk: per social profile scraped).
  • Both: new 402 response, schema mirroring ResearchInsufficientCreditsResponse (matches buildInsufficientCreditsResponse exactly: error/remaining_credits/required_credits/checkoutUrl/declineReason?).
  • POST /api/artist/socials/scrape: adds security (apiKeyAuth/bearerAuth) + 401/403 responses — the endpoint gains auth in the api PR (it currently has none, flagged in the credits audit).

Verification

Both OpenAPI files re-parse; diff is additive.

šŸ¤– Generated with Claude Code


Summary by cubic

Moved social scrape pricing to credits.mdx (5 credits + 1 per posts per profile) and documented credit-gating and auth. Both scrape endpoints now include 402 insufficient-credits responses; POST /api/artist/socials/scrape adds API-key/Bearer auth with 401/403.

  • Migration
    • Handle HTTP 402 from both endpoints; use checkoutUrl to guide top-ups.
    • For POST /api/artist/socials/scrape, include API key or Bearer token and handle 401/403.