# Compute

Every compute reward the network has paid, hour by hour and reconciled against the compute pool's balance. And the network's work in numbers: the share of tokens that served a paying request, how often Macs with different chips agree, and the speed check's baseline.

## GET /api/compute {#rewards}

```endpoint try
GET /api/compute
```

Every `compute_reward` transaction: one per settled hour, from `compute.mlx` to each wallet whose Macs worked that hour, with each payout's amount and unlock time. It also checks the books: the pool's allocation less its balance must equal the sum of the rewards listed. Newest first.

```bash tab=curl
curl https://mlx.app/api/compute
curl "https://mlx.app/api/compute?format=csv" -o mlx-compute-rewards.csv
```

```js tab=JavaScript
const d = await (await fetch("https://mlx.app/api/compute")).json();
console.log(d.reconciled ? "books balance" : "not reconciled", Number(BigInt(d.paid)) / 1e6, "MLX mined");
for (const r of d.rewards.slice(0, 3)) console.log(new Date(r.hour).toISOString(), r.payees, "wallets", Number(BigInt(r.total)) / 1e6);
```

```python tab=Python
import requests

d = requests.get("https://mlx.app/api/compute").json()
print("reconciled:", d["reconciled"], int(d["paid"]) / 10**6, "MLX mined")
for r in d["rewards"][:3]:
    print(r["hour"], r["payees"], int(r["total"]) / 10**6)
```

| Parameter | Type | Notes |
| --- | --- | --- |
| `format` | `json` or `csv` | JSON (default), or CSV with one row per payout. |

```json title="Response"
{
  "account": "compute.mlx",
  "unit": "MLX base units (1 MLX = 1,000,000)",
  "allocated": "3500000000000000",
  "balance": "3499999503946287",
  "paid": "496053713",
  "paidByTransactions": "496053713",
  "transactions": 223,
  "reconciled": true,
  "complete": true,
  "rewards": [
    {
      "hash": "153b2a7cb019ce2a2f64730635c60c564dc096a7844d10979abe062c91198f42",
      "height": 399,
      "hour": 1793113200000,
      "ts": 1793116923936,
      "total": "4298294",
      "payees": 15,
      "payouts": [
        { "to": "luca.mlx", "amount": "31306", "until": 1795651200000 }
      ]
    }
  ]
}
```

`rewards` is trimmed to one hour and its `payouts` to one wallet.

| Field | Type | Notes |
| --- | --- | --- |
| `allocated` | string | The compute pool at genesis, base units. |
| `balance` | string | What `compute.mlx` holds now. |
| `paid` | string | `allocated − balance`: everything the pool has paid. |
| `paidByTransactions` | string | The sum of every reward listed. |
| `transactions` | integer | Rewards listed. |
| `complete` | boolean | Whether the list holds every transaction `compute.mlx` has had. It is read from the account's history list, which keeps only the newest entries. |
| `reconciled` | boolean | `true` when `complete` and `paidByTransactions` equals `paid`. |
| `rewards[].hash`, `height` | | The transaction and its block. |
| `rewards[].hour` | integer | Start of the UTC hour the reward is for, ms. |
| `rewards[].ts` | integer | When the reward was signed. |
| `rewards[].total`, `payees` | | MLX paid that hour (base units) and to how many wallets. |
| `rewards[].payouts` | array | Per wallet: `to`, `amount` (base units) and `until` (when that MLX unlocks, ms). |

The CSV has the columns `tx_hash,block,hour_utc,payee,amount_mlx,unlocks_utc`, with times in ISO 8601 and amounts in whole MLX with 6 decimals:

```text title="GET /api/compute?format=csv"
tx_hash,block,hour_utc,payee,amount_mlx,unlocks_utc
153b2a7cb019ce2a2f64730635c60c564dc096a7844d10979abe062c91198f42,399,2026-10-27T15:00:00.000Z,luca.mlx,0.031306,2026-11-26T00:00:00.000Z
```

Each payout's weight and score are in the transaction's own body (`body.payouts[]`: `to`, `amount`, `weight`, `score`): read it with [`/api/tx/{hash}`](/network/transactions#tx). How weights and scores are worked out is on [Rewards](/protocol/rewards).

## GET /api/compute/work {#work}

```endpoint try
GET /api/compute/work
```

What the network's work is, in numbers anyone can check: how many tokens Macs produced over the last week and what share of them served a paying request, how often Macs give identical answers to the same job (same chip and across chips), and the baseline of the chip speed check.

No parameters.

```json title="Response"
{
  "at": 1793116790670,
  "paid": {
    "tokens7d": 55914,
    "paidTokens7d": 0,
    "share": 0,
    "note": "Paid jobs aren't live yet: every token so far is verification work.",
    "days": [
      { "day": "2026-10-27", "tokens": 55914, "paid": 0 },
      { "day": "2026-10-26", "tokens": 0, "paid": 0 }
    ]
  },
  "agreement": {
    "sameChip": { "same": 73, "diff": 0 },
    "crossChip": { "same": 329, "diff": 66 },
    "sameGroup": { "same": 129, "diff": 0 },
    "crossGroup": { "same": 273, "diff": 66 },
    "groups": "M1 | M2 | M3–M4 | M5 and newer. …",
    "pairs": [
      { "a": "M5", "b": "M6", "same": 56, "diff": 0, "agree": 1 },
      { "a": "M6", "b": "M6", "same": 55, "diff": 0, "agree": 1 }
    ]
  },
  "speedCheck": { "baseline": null, "baseMacs": 0, "floor": 0.6, "minSamples": 40, "minBaseMacs": 3 },
  "jobs": {
    "stream": "v2",
    "note": "Each job's prompt is drawn from a seed only the sequencer holds; Macs handed the same job get the same prompt."
  }
}
```

`paid.days` and `agreement.pairs` are trimmed to two entries here.

### `paid`

| Field | Type | Notes |
| --- | --- | --- |
| `tokens7d` | integer | Tokens counted by the server from finished jobs, over the last week of UTC days, today included (the `7d` in the name). |
| `paidTokens7d` | integer | The part that served a paying request. |
| `share` | number | `paidTokens7d / tokens7d`, a fraction; `0` before any tokens. Paid jobs aren't live yet, so this is `0`; see [Compute API](/compute/overview). |
| `days` | array | The same per UTC day, newest first: `day` (YYYY-MM-DD), `tokens`, `paid`. |

These counters started when this endpoint did, so days before it read `0`. For the network's tokens today as the Macs report them, see `tokensToday` on [World](/network/world).

### `agreement`

When enough Macs have answered the same job, every pair of them is compared once: did they produce identical tokens? Greedy decoding agrees within a GPU generation group but not always across groups, and this measures it.

| Field | Type | Notes |
| --- | --- | --- |
| `sameChip` | object | Pairs whose two Macs have the same chip: `same` (identical answers) and `diff`. |
| `crossChip` | object | Pairs whose chips differ. |
| `sameGroup` | object | Pairs whose chips are in one [GPU group](/protocol/jobs#gpu-groups), different chips included. Only these count for pay. |
| `crossGroup` | object | Pairs from different groups. Since jobs are shared within a group, these stop growing. |
| `groups` | string | The groups, in words. |
| `pairs` | array | Per chip pair (`a`, `b`, sorted), most compared first: `same`, `diff` and `agree` (the share that matched, or `null`). |

How answers are compared and a job's verdict is reached is on [Jobs](/protocol/jobs).

### `speedCheck`

A Mac that says it has a Pro, Max, Ultra or newest chip but runs full jobs much slower than base Macs is paid as a base Mac. The check only ever lowers a Mac's class, never raises it.

| Field | Type | Notes |
| --- | --- | --- |
| `baseline` | number or null | The median speed of base M-series Macs, tokens a second, measured by the server from hand-out to result. `null` until enough base Macs are measured. |
| `baseMacs` | integer | Base Macs in the baseline. |
| `floor` | number | A Mac claiming more than a base chip is carried as base when its median speed is under this fraction of `baseline` (60%). |
| `minSamples` | integer | Timed full jobs a Mac needs before the check applies to it (40). |
| `minBaseMacs` | integer | Base Macs needed before there is a baseline (3). |

`jobs.stream` names the job stream being handed out; `jobs.note` says how its prompts are made.

## Errors

| Status | When |
| --- | --- |
| 500 | The data couldn't be read. The message is cut to a short line. |

Neither endpoint takes input that can be wrong: an unknown `format` returns JSON.
