price_below_cost

The running jobjob_7Hq2 · delivered · document.fr-CA.pdf · $49.00 charged

A delivered job could lose money: payout, nested Services and the AI cap add up to more than the price.

FixFails inExit
Raise price.usd, or lower payout.services/translation.ts1

Owned by Service(): the page that explains what this gate holds.

npx services.dev check
  ✗ A delivered job could lose money: payout, nested Services and the AI cap add up to more than the price. Raise price.usd, or lower payout.
    https://services.dev/docs/reference/check/price_below_cost
✗ 1 to fix
services/translation.ts
import { Service } from 'services.dev'

export default Service({
  name: 'Translation',
  input: { document: 'file', to: 'language: a BCP 47 tag, such as fr-CA' },
  output: { document: 'file' },
  human: { sign: 'sworn-translator' },
  price: { usd: 49, payout: 60 },
})
git add -A && git diff --staged
diff --git a/services/translation.ts b/services/translation.ts
index 773b4ad..337cbfd 100644
--- a/services/translation.ts
+++ b/services/translation.ts
@@ -5,5 +5,5 @@ export default Service({
   input: { document: 'file', to: 'language: a BCP 47 tag, such as fr-CA' },
   output: { document: 'file' },
   human: { sign: 'sworn-translator' },
-  price: { usd: 49, payout: 60 },
+  price: { usd: 89, payout: 60 },
 })
npx services.dev check
✓ ready to sell · 1 Service · it keeps at least 13% of every job
npx services.dev check --json · the price_below_cost failure
{
  "code": "price_below_cost",
  "reason": "A delivered job could lose money: payout, nested Services and the AI cap add up to more than the price.",
  "next": "Raise price.usd, or lower payout.",
  "doc_url": "https://services.dev/docs/reference/check/price_below_cost"
}
The whole document check --json prints
npx services.dev check --json
{
  "ai": {
    "cents_per_call": 42,
    "simulated": true
  },
  "mcp": {
    "tools": 13,
    "tokens": 4491,
    "sandbox": 9,
    "budget": 8000
  },
  "services": [
    {
      "path": "services/translation.ts",
      "lines": 5,
      "steps": "draft · ai → review · ai · adversarial · then a person signs",
      "ok": false,
      "price": "$49 per job, within 48 hours, charged on delivery.",
      "who": "A sworn translator signs before delivery.",
      "agent": {