{"uid":"cap_pR86wczgjRX1vo-q73Itb","slug":"gig-worker-finance-api-finance-pack-x402-a23b90d9","name":"Gig Worker Finance API – Finance Pack (x402)","description":"Pay-per-call finance tools for US gig workers, paid in USDC on Base via x402. Not tax or financial advice.","url":"https://safe-weekly-spend-api-production.gigfinancetools.workers.dev/v1/gig-finance-pack?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"tax":{"type":"object","oneOf":[{"required":["gross_income"]},{"required":["payouts"]}],"title":"GigTaxEstimateRequest","required":["tax_year","filing_status"],"properties":{"state":{"type":"string","pattern":"^[A-Za-z]{2}$","description":"Echoed only; state tax is not computed"},"payouts":{"type":"array","description":"Alternative to gross_income; only payouts dated in tax_year are summed"},"expenses":{"type":"number","minimum":0,"description":"Deductible Schedule C business expenses (e.g. mileage)"},"tax_year":{"enum":[2025,2026]},"w2_wages":{"type":"number","minimum":0,"description":"Other W-2 wages (reduce remaining SS wage base)"},"withholding":{"type":"number","minimum":0,"description":"Federal income tax withheld this year"},"gross_income":{"type":"number","minimum":0,"description":"Projected annual 1099/gig gross income"},"other_income":{"type":"number","minimum":0,"description":"Other ordinary taxable income"},"filing_status":{"enum":["single","mfj","mfs","hoh"]},"prior_year_agi":{"type":"number","minimum":0,"description":"Prior-year AGI; > $150k ($75k MFS) triggers 110% safe harbor"},"prior_year_tax":{"type":"number","minimum":0,"description":"Prior-year total tax (Form 1040 line 24) for safe harbor"}},"description":"Projected FULL-YEAR amounts. Send gross_income or payouts (not both). Federal only.","additionalProperties":false},"budget":{"type":"object","title":"BudgetReportPremiumRequest","required":["payouts","bills"],"properties":{"as_of":{"type":"string","format":"date","description":"Forecast start (default: day after last payout)"},"bills":{"type":"array","description":"Fixed bills / bare-bones essentials."},"payouts":{"type":"array","description":"Recent gig payouts (gross + tips). Ideally 2-6 months."},"settings":{"type":"object"}},"additionalProperties":false},"invoice":{"type":"object","title":"InvoiceRequest","required":["invoice_number","due_date","from","to","line_items"],"properties":{"to":{"type":"object"},"from":{"type":"object"},"notes":{"type":"string","maxLength":2000},"output":{"type":"object"},"currency":{"type":"string","default":"USD","pattern":"^[A-Z]{3}$"},"discount":{"type":"number","minimum":0,"description":"Flat pre-tax discount"},"due_date":{"type":"string","format":"date","description":"YYYY-MM-DD"},"tax_rate":{"type":"number","maximum":1,"minimum":0,"description":"Default tax rate for items without one"},"issue_date":{"type":"string","format":"date","description":"YYYY-MM-DD"},"line_items":{"type":"array"},"payment_terms":{"type":"string","maxLength":2000},"invoice_number":{"type":"string","maxLength":64,"minLength":1},"payment_instructions":{"type":"string","maxLength":2000}},"additionalProperties":false}}},"responseSchema":{"type":"json","example":{"tax":{"flags":["state_tax_not_included"],"state":"TX","income":{"agi":46467.61,"expenses":10000,"w2_wages":0,"net_profit":50000,"gross_income":60000,"other_income":0},"figures":{"sources":["IRS Rev. Proc. 2024-40"],"verified":true},"tax_year":2026,"total_tax":9732.07,"deductions":{"half_se_tax":3532.39,"qbi_deduction":6073.52,"standard_deduction":16100},"disclaimer":"Estimate only, not tax advice. Federal o…","income_tax":{"total":2667.29,"brackets":[{"to":12400,"tax":1240,"from":0,"rate":0.1,"taxable_in_bracket":12400}],"marginal_rate":0.12,"taxable_income":24294.09},"safe_harbor":{"basis":"prior_year","prior_year_pct":1,"prior_year_amount":8000,"current_year_90pct":8758.86,"required_annual_payment":8000},"withholding":0,"filing_status":"single","quarterly_payments":[{"amount":2000,"quarter":1,"due_date":"2026-04-15"}],"self_employment_tax":{"total":7064.78,"medicare":1339.08,"ss_wage_base":184500,"net_se_earnings":46175,"social_security":5725.7,"additional_medicare_tax":0},"recommended_set_aside_pct":0.17,"estimated_payments_required":true,"effective_rate_on_net_profit":0.194641},"notes":["budget.settings.tax_set_aside_pct defaul…"],"budget":{"forecast":{"weeks":[{"week":1,"savings":77.27,"bills_due":104.62,"buffer_end":3294.48,"net_income":564.09,"week_start":"2026-10-19","buffer_start":2835,"tax_set_aside":131.36,"projected_income":772.73,"low_case_buffer_end":2730.38}],"start_date":"2026-10-19","ending_buffer":5298.18,"lowest_buffer":2583.95,"weeks_of_history":11,"income_volatility_cv":0.99,"low_case_weekly_income":0,"projected_weekly_income":772.73},"breakdown":{"monthly":[{"extra":0,"month":"2026-07","income":2700,"savings":270,"surplus":347.67,"available":1971,"to_buffer":347.67,"buffer_end":1847.67,"from_buffer":0,"unfunded_gap":0,"steady_salary":1623.33,"tax_set_aside":459}],"savings_pct":0.1,"buffer_target":4870,"buffer_balance":2835,"avg_monthly_income":2833.33,"months_with_income":3,"safe_monthly_spend":445,"avg_monthly_savings":283.33,"fixed_bills_monthly":1623.33,"avg_monthly_available":2068.33,"buffer_months_covered":1.75,"steady_salary_monthly":1623.33,"avg_monthly_tax_set_aside":481.67},"disclaimer":"Projection from past payouts; not financ…","risk_flags":[{"code":"low_case_buffer_negative","message":"In a low-income week scenario (25th perc…","severity":"medium"}],"buffer_days":53,"buffer_score":{"score":64,"explanation":["Buffer coverage: 1.75 of 3 target months…"]},"safe_weekly_spend":102.69,"tax_set_aside_pct":0.17},"invoice":{"to":{"name":"Acme Co.","email":"ap@acme.example","address":"500 Market St, San Francisco, CA 94105"},"tax":99.8,"from":{"name":"Acme Design LLC","email":"billing@example.com","address":"123 Main St, Austin, TX 78701"},"html":"<!doctype html><html><head><meta charset…","lines":[{"tax":67.86,"amount":850,"quantity":1,"tax_rate":0.0825,"unit_price":850,"description":"Logo design (3 concepts, 2 revision rounds)"}],"total":1599.8,"currency":"USD","discount":50,"due_date":"2026-10-30","subtotal":1550,"pdf_bytes":3825,"issue_date":"2026-10-16","pdf_base64":"JVBERi0xLjcKJYGBgYEKCjEgMCBvYmoKPDwKL1R5…","invoice_number":"INV-2026-0042"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.75","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.75/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.75","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.75","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ESjK6n54UGf9foQC8A9SY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.75","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates US federal taxes, generates a weekly cash-flow budget forecast, and creates professional invoices for gig/1099 workers in a single pay-per-call API, billed in USDC via x402.","exampleAgentPrompt":"I'm filing as single for tax year 2025, I made $60,000 gross from gig work, spent $10,000 on deductible expenses like mileage, and had no W-2 income — can you estimate my federal taxes, tell me my quarterly payment amounts, and show what percentage I should set aside?","exampleUseCases":[{"title":"Quarterly tax planning for Uber driver","prompt":"I drove for Uber this year and brought in about $48,000 gross with $8,500 in deductible mileage and car expenses. I'm filing single for 2025 with no W-2 job. Can you estimate my federal taxes and tell me exactly how much I owe each quarter and when?"},{"title":"Weekly spending budget from gig payouts","prompt":"Here are my DoorDash payouts from the last 3 months — can you build me a weekly budget forecast showing how much I can safely spend each week, how much to set aside for taxes, and what my cash buffer looks like, given my monthly bills of $1,200 rent, $200 car, and $100 phone?"},{"title":"Invoice generation for freelance client","prompt":"I need to send an invoice to my client Acme Corp for a web design project — invoice number 2025-042, due in 30 days, from my business Jane Smith Design, for 10 hours of design work at $85/hour and a $150 software fee. Can you create that invoice for me?"}],"resultDescription":"Returns a JSON object with up to three sections depending on which request objects were provided: (1) tax: full federal tax breakdown including income tax by bracket, self-employment tax (SS + Medicare), QBI deduction, standard deduction, safe harbor calculation, recommended set-aside percentage, and quarterly payment schedule; (2) budget: week-by-week forecast of projected income, bills due, tax set-aside, savings, and buffer balance with low-case scenarios; (3) invoice: a formatted invoice document with line items, totals, and due date. Includes flags and disclaimers noting federal-only scope and that estimates are not tax advice.","failureModes":["Missing required fields (e.g., tax_year or filing_status for tax module) returns a 400 validation error","Providing both gross_income and payouts simultaneously violates the oneOf constraint and returns a schema error","Invalid state code pattern (not two alpha characters) causes a 400 error","Insufficient USDC balance or failed x402 payment results in 402 Payment Required before computation runs","Payouts array spanning multiple years may produce unexpected results if not filtered to the target tax year","Truncated or malformed bills/payouts arrays may produce a degenerate budget forecast","Invoice missing required fields (invoice_number, due_date, from, to, line_items) returns a validation error"],"whenToPreferThis":"Choose this endpoint when you need gig-worker-specific federal tax estimation, irregular-income budgeting, or invoice generation in a single call without building your own financial calculation engine. It is purpose-built for 1099/gig workers (Uber, DoorDash, freelancers) and handles self-employment tax, QBI deduction, safe harbor, and income-volatility-aware budgeting — capabilities not offered by generic tax APIs. Prefer it over generic financial APIs when the user is a US gig worker needing actionable quarterly payment amounts and weekly spend limits. Not suitable for state tax calculation, business entity returns, or non-US income.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:40:24.868Z","isFirstParty":false,"canonicalSlug":"gig-worker-finance-api-finance-pack-x402-a23b90d9"}