{
 "id": "8.9",
 "title": "Costs and quotas",
 "department": "Ops and infrastructure",
 "department_slug": "ops-and-infrastructure",
 "direction": null,
 "branded": false,
 "status": "needs-you",
 "owner": "Param",
 "last_verified": "Mon Oct 26",
 "holds": "Cloud, AI, data, credits, monthly spend",
 "urls": {
  "html": "https://handbook.joinsquareup.com/ops-and-infrastructure/costs-and-quotas",
  "markdown": "https://handbook.joinsquareup.com/ops-and-infrastructure/costs-and-quotas.md",
  "json": "https://handbook.joinsquareup.com/ops-and-infrastructure/costs-and-quotas.json"
 },
 "other_directions": [],
 "tldr": {
  "headline": "Caps are set in code, but no monthly spend figure exists anywhere",
  "points": [
   {
    "icon": "money",
    "text": "Google credit left was $20,763 of $25,000 on 16 Oct, ending 2028-05-19."
   },
   {
    "icon": "lock",
    "text": "Caps cover texts, images, videos, builds, treg and Apify, per day and per brand."
   },
   {
    "icon": "warn",
    "text": "No monthly spend figure exists for any vendor in any source we read."
   },
   {
    "icon": "flag",
    "text": "Production's caps are staging's numbers copied, not tuned for five partners."
   },
   {
    "icon": "chart",
    "text": "One store read through treg costs about $6."
   }
  ],
  "stat": {
   "value": "$250",
   "label": "Daily cap on all builds"
  },
  "decide": "Who checks spend, how often, and what is the monthly ceiling?",
  "mood": "waiting"
 },
 "sources": [
  "brew origin/main a559de6: deploy.sh:21-22, deploy.sh:41, tools/prod-env.sh:9, tools/deploy-demo.sh:16, budget.js:1-17, build.js:113-114, build.js:1070-1076, treg.js:45, moves-cadence.js:406, drafts-bg.js:142, social-feed.js:274, alerts.js:7, listen-watch.js:1-10",
  "memory brew-gemini-provider, brew-pro-switch-and-flush, brew-apify-watch, treg-usage-rules, brew-move-freshness, brew-lean-pipeline, feed-for-all-brands, brew-jam-v2, no-spend-while-building, brew-prod-backend"
 ],
 "open_questions": [
  "**Who checks spend, and how often?** Proposal: Param, on the 1st of each month, copying each vendor's last-month total into Numbers; Claude drafts the table from the billing pages he opens.",
  "**What is the monthly ceiling while we are pre-revenue?** Proposal: the ceilings proposed in [budget](/finance/budget): a Google Cloud budget alert at $1,000 a month, its cloud $400 plus AI $600, and $220 for treg and Apify together, both emailing hello@.",
  "**Do the production caps fit five partners?** The caps are the staging numbers copied. Proposal: keep them until the first month's spend is known, then set production's from real use.",
  "**Which vendors are we paying today, on which card?** Not recorded. Proposal: Param lists them once in Finance, and this page links there."
 ],
 "parts": {
  "Answer": "This page lists every spend cap set in code and every credit balance our notes record, and says plainly that no monthly spend figure exists anywhere we read, so Param can decide how cost is tracked and capped.",
  "Today": "### Credits and balances\n\n| Account | What our notes say | Date | Source |\n|---|---|---|---|\n| Google Cloud billing \"SquareUp HQ\" | Credit \"2024 GFS Cloud Program\": $20,763 of $25,000 left, ends 2028-05-19, covers Vertex AI and the Gemini API | 16 Oct | [src: memory brew-gemini-provider] |\n| Google Cloud | Credit \"GenAI App Builder\": ₹95,700, Agent Builder and Search only | 16 Oct | [src: memory brew-gemini-provider] |\n| Google Cloud | Cloud SQL runs on Google credits | 25 Oct | [src: memory brew-prod-backend] |\n| Anthropic | Out of credit at 07:50 IST | 20 Oct | [src: memory brew-pro-switch-and-flush] |\n| treg, team squareup | Balance checked live, never assumed; the key is capped at 20k calls a day | 23 Oct | [src: memory treg-usage-rules] [src: memory brew-apify-watch] |\n| Apify | Starter plan bought; price not recorded | 23 Oct | [src: memory brew-apify-watch] |\n| Sloosh | Paid per final | 23 Oct | [src: memory brew-jam-v2] |\n\nWhether the Google credits cover Claude on Vertex is unknown; it has never been used. [src: memory brew-gemini-provider]\n\n### Caps in code\n\n| Cap | Production and staging | Demo | What it limits | Source |\n|---|---|---|---|---|\n| `DAILY_TEXT_CAP` | 1,500 | 1,500 | AI writing calls a day, whole site | [src: brew/tools/prod-env.sh:9] [src: brew/tools/deploy-demo.sh:16] |\n| `DAILY_IMAGE_CAP` | 1,500, about $58 a day at worst | 120 | Pictures a day | [src: brew/deploy.sh:21-22] |\n| `DAILY_VIDEO_CAP`, `BRAND_VIDEO_CAP` | 60, 20 a brand | 15 | Videos a day | [src: brew/tools/prod-env.sh:9] |\n| Brand share | a third of each daily cap unless set | same | One brand cannot take the whole day | [src: brew/budget.js:1-4] [src: brew/budget.js:14] |\n| `BUILD_CAP_USD` | $45 a build | $120 | One brand's full set of Plays | [src: brew/tools/prod-env.sh:9] [src: brew/build.js:113] |\n| `DAILY_BUILD_CAP_USD` | $250 | $200 | All builds in a day | same |\n| `TREG_DAY_CAP_USD` | $40 | $15 | treg a day | [src: brew/tools/prod-env.sh:9] [src: brew/tools/deploy-demo.sh:16] |\n| `APIFY_BRAND_MONTH_CAP_USD` | $10 a brand a month | | Apify | [src: brew/tools/prod-env.sh:9] |\n| `CONNECT_CAP_USD` | $40 | | Rewrite after a first connect | [src: brew/build.js:1070] |\n| `LEARN_CAP_USD`, `LIVE_CAP_USD` | $30 each | | Rewrites after learnings, after account changes | [src: brew/build.js:1075-1076] |\n| Weekly rewrite pot | about $10 a brand a week on Flash, $40 on Pro | | Automatic refreshes | [src: memory brew-move-freshness] [src: memory brew-pro-switch-and-flush] |\n| Weekly families | $3 a brand a week | | Listening and automation Plays | [src: brew/moves-cadence.js:406] |\n| Background drafts, social | $4 and $3 a brand a day | | Drafts and listening | [src: brew/drafts-bg.js:142] [src: brew/social-feed.js:274] |\n| Listening run | $0.60 a run | | Paid listening sources | [src: brew/listen-watch.js:684] |\n\n### Unit costs our notes record\n\n| Item | Cost | Source |\n|---|---|---|\n| A draft picture on Flash | about $0.039 | [src: brew/deploy.sh:21] |\n| Gemini 3.1 Pro | $2 in, $12 out per million tokens | [src: memory brew-pro-switch-and-flush] |\n| One store read through treg | about $6 | [src: brew/alerts.js:7] |\n| A full build, old pipeline | about $80 a brand | [src: memory feed-for-all-brands] |\n| One Play, old pipeline | about $1.51, mostly thinking tokens | [src: memory brew-lean-pipeline] |\n\n### What does not exist\n\nNo monthly spend figure, budget or cost report for Google Cloud, Anthropic, OpenAI, treg, Apify, Sloosh, Higgsfield, Resend, Cloudflare or Firebase appears in any source we read. [src: memory brew-gemini-provider] [src: memory brew-prod-backend]",
  "Tomorrow": "| Item | Version | Tag |\n|---|---|---|\n| Caps per day, per brand and per run, in code | v1 | Stays |\n| One monthly spend line per vendor, recorded here | v1 | New, see Open |\n| A Google Cloud budget alert on the billing account | v1 | New |\n| Cost per partner per month, from the spend ledger | v2 | New |\n| Cost feeds pricing once plans start | v2 | Changes, see Finance |",
  "How we do it": "1. Before any paid generation while building, ask Param; test with free local runs. [src: memory no-spend-while-building]\n2. Check the treg balance live before blaming treg. [src: memory treg-usage-rules]\n3. Read Google spend in Billing, Reports, filtered to Vertex AI. [src: memory brew-gemini-provider]\n4. Raise a cap by environment at deploy, never in code, for example:\n\n```bash\nBUILD_CAP_USD=80 ./deploy.sh\n```\n\n5. Every proposed new model or source states its cost per brand per month before it ships.",
  "Numbers": "| Metric | Definition | Where measured |\n|---|---|---|\n| Monthly spend by vendor | Money charged or credit used, per vendor per calendar month | Proposed: vendor billing pages, copied here on the 1st |\n| Google credit left | Remaining \"2024 GFS Cloud Program\" credit | Billing, credits; $20,763 on 16 Oct |\n| Cost per brand per month | AI, data and media spend booked to one brand | Proposed: the spend ledger |\n| Cap hits | Days a site or brand hit a daily cap | Proposed: logs |",
  "Open": "1. **Who checks spend, and how often?** Proposal: Param, on the 1st of each month, copying each vendor's last-month total into Numbers; Claude drafts the table from the billing pages he opens.\n2. **What is the monthly ceiling while we are pre-revenue?** Proposal: the ceilings proposed in [budget](/finance/budget): a Google Cloud budget alert at $1,000 a month, its cloud $400 plus AI $600, and $220 for treg and Apify together, both emailing hello@.\n3. **Do the production caps fit five partners?** The caps are the staging numbers copied. Proposal: keep them until the first month's spend is known, then set production's from real use.\n4. **Which vendors are we paying today, on which card?** Not recorded. Proposal: Param lists them once in Finance, and this page links there."
 }
}