---
title: "lingua"
url: https://services.dev/docs/examples/lingua
captured: [api-offer.txt, apps.txt, pool-register.txt, suite.txt]
---
# lingua

URL: https://services.dev/docs/examples/lingua

> The example brand the docs run on: four translation Services, three of them delivered by AI alone, one signed by a sworn translator.

lingua sells translation. Three of its Services are AI alone, and one adds a sworn translator's signature. It proves the default: no person, no account, a paid job on localhost from the first command. The Start, Service and Money tabs all run it.

## The files

Each file below, from four lines to seven, with what `check` read back from it: its price, who delivers it, its steps, and what it leaves you.

```bash
npx services.dev check
```

```txt title="captured"
services/certified-translation.ts · 7 lines · $189 per job, within 3 days, charged on delivery.
  who     A sworn translator in the job's country signs before the certify step.
  steps   translate · Translation → review · ai · adversarial · then a person signs → certify · ai
  agent   order_job · 27 of 30 words · job_7Hq2 waits on signature
  ledger  +$189.00 · AI $0.84 (example) · your Translation $49.00 · sworn translator $60.00 · you $79.16
  margin  at least $81.40 a job (43%) with your Translation · a job that stops costs you at most $107.60
  apps    customer portal · delivery portal · owner console

services/store-listing.ts · 5 lines · $29 per job, within 48 hours, charged on delivery.
  who     AI delivers every job.
  steps   draft · ai → review · ai · adversarial
  agent   order_job · 24 of 30 words · bought job_7Hq2 · $29.00 · no person
  ledger  +$29.00 · AI $0.84 (example) · you $28.16
  margin  at least $23.20 a job (80%) · a job that stops costs you at most $5.80
  apps    customer portal · owner console

services/translated-summary.ts · 6 lines · $79 per job, within 48 hours, charged on delivery.
  who     AI delivers every job.
  steps   translate · Translation → summarize · ai → review · ai · adversarial
  agent   order_job · 23 of 30 words · bought job_7Hq2 · $79.00 · no person
  ledger  +$79.00 · AI $0.84 (example) · your Translation $49.00 · you $29.16
  margin  at least $53.40 a job (68%) with your Translation · a job that stops costs you at most $25.60
  apps    customer portal · owner console

services/translation.ts · 4 lines · $49 per job, within 48 hours, charged on delivery.
  who     AI delivers every job.
  steps   draft · ai → review · ai · adversarial
  agent   order_job · 24 of 30 words · bought job_7Hq2 · $49.00 · no person
  ledger  +$49.00 · AI $0.84 (example) · you $48.16
  margin  at least $39.20 a job (80%) · a job that stops costs you at most $9.80
  apps    customer portal · owner console

mcp     13 buyer tools · 4,490 of 8,000 tokens · 9 more with ?toolset=sandbox
✓ ready to sell · 4 Services · AI delivers 3 alone · each keeps at least 43% of every job
  next    npx services.dev dev

AI and money are simulated until you wire them. $0.42 a call is an example.
```

## Build it

[Your first paid job](https://services.dev/docs.md) writes the first file and sells it. [Your own Service](https://services.dev/docs/own.md) adds the next. Grow takes Translation from four lines to a filing: [a review](https://services.dev/docs/grow/review.md), [an ask](https://services.dev/docs/grow/ask.md), [a signer](https://services.dev/docs/grow/role.md) and [a submit step](https://services.dev/docs/grow/submit.md).

## One job, every side

The same order on four surfaces, the same job and the same body on each:

```bash title="API"
curl -X POST http://localhost:8787/jobs -H 'content-type: application/json' -d '{"service":"translation","document":{"url":"https://example.com/lease.pdf","name":"lease.pdf"},"to":"fr-CA","key":"lease-fr-CA"}'
```

```json title="402 · magic values: none"
{
  "type": "OFFER",
  "object": "offer",
  "service": "translation",
  "title": "Translation",
  "price": {
    "usd": 49,
    "sentence": "$49 per job, within 48 hours, charged on delivery."
  },
  "eta": "48h",
  "terms": "Charged on delivery. Cancel at $0 until it ships. Send it back with a note and the AI redoes it, or you pay $0. Final 7 days after delivery.",
  "next": {
    "do": "order",
    "service": "translation",
    "arguments": {
      "document": {
        "url": "https://example.com/lease.pdf",
        "name": "lease.pdf"
      },
      "to": "fr-CA",
      "max_usd": 49,
      "key": "lease-fr-CA",
      "service": "translation"
    },
    "tool": "order_job",
    "http": "POST http://localhost:8787/jobs {\"service\":\"translation\"}"
  },
  "simulated": true
}
```

## Every branch

lingua's own suite runs every branch its files write, each by the magic value that produces it, over HTTP and MCP:

```bash
npx services.dev verify
```

```txt title="magic values: metadata.sandbox.outside = { reject: [missing_certificate] }, metadata.sandbox.outside = { reject: [a_code_no_route_names] }, metadata.sandbox.review = pass, metadata.sandbox.review = flag_once, metadata.sandbox.outside = ack, metadata.sandbox.outside = reject_once, metadata.sandbox.outside = never, metadata.sandbox.outside = alerts, metadata.sandbox.talk = open, watch.url = https://fails-once.example.test/suite, watch.url = https://down.example.test/suite, watch.url = https://hooks.example.test/suite"
lingua · 121 HTTP cases and 23 MCP cases from 42 rows: each row by its live credentials and magic values, with its auth, audience, replay and next cases · http://localhost:8787/verify/suite.json
121 passed · 0 failed · 54 skipped
```

## The money

Every ledger line is in the check above: what a job charges, what the AI costs, what a person earns, and what you keep. [Money](https://services.dev/docs/money.md) explains each.

## On site: interpreting

lingua also sells interpreting on site, from a Pool in the [work register](https://services.dev/docs/people/pool/register.md). The teaser names the window and the distance, never the address:

```txt
→ GET /tasks/tsk_7Hq2   # as mbr_eligible: the teaser
```

```json title="captured/pool-register.txt · 200 · tsk_7Hq2 · open · magic values: client.email = signs@example.test, member = mbr_eligible"
{
  "id": "tsk_7Hq2",
  "object": "task",
  "livemode": false,
  "pool": "interpreters",
  "role": "interpreter",
  "register": "work",
  "status": "open",
  "fields": {
    "act": "attend",
    "region": "FR",
    "fee_usd": 90
  },
  "window": {
    "from": "2026-11-03T14:00:00+01:00",
    "to": "2026-11-03T15:00:00+01:00"
  },
  "site": {
    "area": "75004 Paris",
    "distance_km": 4.2,
    "within_m": 250
  },
  "est": {
    "minutes": 60,
    "from": "window"
  },
  "hourly_usd": 90,
  "simulated": true
}
```

```txt
→ POST /tasks/tsk_7Hq2/claim   # as mbr_eligible
```

```txt title="200 · tsk_7Hq2 · claimed · 3 Nov 14:00 to 15:00 is yours · reminders 24h and 1h before · the address opens on the packet · magic values: client.email = signs@example.test, member = mbr_eligible"
← 200 · tsk_7Hq2 · claimed · 3 Nov 14:00 to 15:00 is yours · reminders 24h and 1h before · the address opens on the packet
```

A check-in 2.9 km away is refused, and one from the door counts:

```txt
→ POST /tasks/tsk_7Hq2/arrive {"fix":{"lat":48.8791,"lng":2.3554,"accuracy_m":15}}   # as mbr_eligible, 3 Nov 13:48
```

```txt title="captured/pool-register.txt · magic values: client.email = signs@example.test, member = mbr_eligible"
← 403 not_on_site: The check-in is 2.9 km from the site, and a check-in counts within 250 m. Check in from the site.
```

```txt
→ POST /tasks/tsk_7Hq2/arrive {"fix":{"lat":48.8556,"lng":2.3605,"accuracy_m":12}}   # as mbr_eligible, 3 Nov 13:56
```

```txt title="200 · tsk_7Hq2 · on_site · 38 m from the site · 4 min before the window · magic values: client.email = signs@example.test, member = mbr_eligible"
← 200 · tsk_7Hq2 · on_site · 38 m from the site · 4 min before the window
```

```txt
→ POST /tasks/tsk_7Hq2/complete {"check_out":{"fix":{"lat":48.8557,"lng":2.3604,"accuracy_m":10}},"sign_off":"ask_7Hq4"}   # as mbr_eligible, 3 Nov 15:04
```

```txt title="200 · tsk_7Hq2 · done · completed · sha256:5be1c0a7d29e · magic values: client.email = signs@example.test, member = mbr_eligible"
  15:04 · step.committed · attend · person · certified interpreter · FR · mbr_eligible
  15:04 · pay.accrued · mbr_eligible · complete · $90.00
  15:04 · job.charged · job_7Hq2 · $140.00 · released on the client's sign-off
```

```txt
→ GET /owner/jobs/job_7Hq2   # the owner: record[9].completed, the artifact the gate froze
```

```json title="captured/pool-register.txt · 200 · completed · magic values: client.email = signs@example.test, member = mbr_eligible"
{
  "member": "mbr_eligible",
  "credential": "certified interpreter",
  "region": "FR",
  "rules": "2026-10",
  "site": { "address": "14 Rue de Rivoli, 75004 Paris", "within_m": 250 },
  "window": { "from": "2026-11-03T14:00:00+01:00", "to": "2026-11-03T15:00:00+01:00" },
  "evidence": [
    { "kind": "check_in", "at": "2026-11-03T13:56:10+01:00", "distance_m": 38, "accuracy_m": 12 },
    { "kind": "check_out", "at": "2026-11-03T15:02:41+01:00", "distance_m": 31, "accuracy_m": 10 },
    { "kind": "sign", "ask": "ask_7Hq4", "by": "signs@example.test", "at": "2026-11-03T15:03:58+01:00" }
  ],
  "hash": "sha256:5be1c0a7d29e4f0b8a61c3e27d95f4a0c8b1e6d3f2a7094c5e8b16d0a3f7c29e"
}
```

A client who never came still pays, and the interpreter is paid in full. A no-show reopens the Task:

```txt
→ POST /tasks/tsk_7Hr6/complete {"party_absent":true,"check_out":{"fix":{"lat":48.8662,"lng":2.3411,"accuracy_m":11}}}   # as mbr_eligible, 4 Nov 10:16: on site since 09:58, and no one came to the door
```

```txt title="captured/pool-register.txt · 200 · tsk_7Hr6 · done · party_absent · sha256:91c4e2d07b3a · magic values: client.email = signs@example.test, member = mbr_eligible"
  10:16 · step.committed · attend · person · certified interpreter · FR · mbr_eligible · party_absent after site.grace 15min
  10:16 · pay.accrued · mbr_eligible · complete · party_absent · $90.00
  10:16 · job.charged · job_7Hr6 · $140.00 · released on party_absent
```

```txt
→ GET /tasks/tsk_7Hr5   # a visit nobody checked in to, 10 minutes after its window opened
```

```txt title="200 · tsk_7Hr5 · open · no-show by mbr_7Hq4 · offered again to members who can reach the site by 14:40 · the client is asked whether to wait or move the window · magic values: client.email = signs@example.test, member = mbr_eligible"
← 200 · tsk_7Hr5 · open · no-show by mbr_7Hq4 · offered again to members who can reach the site by 14:40 · the client is asked whether to wait or move the window
```

## The apps

The sworn translator's delivery portal, and the owner console, from one run:

```bash
open http://localhost:8787/sworn-translators
```

```txt title="magic values: member = mbr_eligible"
Certified Translation · you earn $60.00 of each $189 job
```

```bash
open http://localhost:8787/console
```

```txt title="magic values: member = mbr_eligible"
lingua · 5 jobs · +$297.00 · AI $4.20 · people $60.00 · you $232.80
Certified Translation: a sworn translator signed 1 of 1 job unchanged, at $60.00 in payouts.
```

---

- Up: [Examples](https://services.dev/docs/examples.md)
- Previous: [Examples](https://services.dev/docs/examples.md)
- Next: [The legal example](https://services.dev/docs/examples/legal.md)
