# Graph Algorithms – Edmonds-Karp Maximum Flow

> Graph Algorithms – Edmonds-Karp Maximum Flow is a paid API for AI agents from graph-algorithms.x402tookit.com, paid per call via x402, $0.03/call, status unknown (last checked 2026-11-02).

Computes the Edmonds-Karp maximum flow from a source to a sink on a directed capacity edge list, returning flow per edge and minimum cut edges.

## Facts

- Endpoint: GET https://graph-algorithms.x402tookit.com/max-flow?utm_source=zero.xyz
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/graph-algorithms-edmonds-karp-maximum-flow-11663b1d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5FPIdql-7gkmHCO97lqCV

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability graph-algorithms-edmonds-karp-maximum-flow-11663b1d
```

Example prompt: Find the maximum flow from node 'S' to node 'T' in this network: edges are S,A,10; S,B,5; A,B,3; A,T,7; B,T,8 — show me the flow on each edge and which edges form the minimum cut.

## When to prefer this

Choose this endpoint when you need to solve a directed maximum flow problem using the Edmonds-Karp (BFS-augmenting-path) algorithm and require both the max flow value and the minimum cut decomposition. It supports graphs up to 200 nodes and 1000 edges, making it suitable for medium-scale network flow problems in logistics, network design, or capacity planning. Prefer this over Dijkstra or Bellman-Ford sibling endpoints when the problem is about throughput/capacity rather than shortest paths.

## Known failure modes

- Missing required parameters (edges, source, or sink) returns a validation error
- Source and sink node names are identical — the API requires them to differ
- Edge list exceeds limits (>200 nodes, >1000 edges, or >60000 characters) causes rejection
- Malformed edge format (missing capacity, non-numeric capacity, wrong delimiter) causes parse error
- Capacity values outside the 0–1e9 range may be rejected
- Network with no path from source to sink returns max flow of 0

## How this service works

Edmonds-Karp maximum flow from a source to a sink on a capacity edge list, with flow per edge and min cut edges.

## Output

Returns the maximum flow value between source and sink, an array of edge objects each showing from/to/capacity/flow, the minimum cut capacity, the list of min-cut edges (from/to/capacity), the set of nodes on the source side of the cut, and a human-readable summary. Also includes metadata like asOf timestamp and any degraded/disclaimer flags.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "edges",
      "source",
      "sink"
     ],
     "properties": {
      "sink": {
       "type": "string",
       "description": "Sink node name; must differ from the source"
      },
      "edges": {
       "type": "string",
       "description": "Directed edges 'from,to,capacity' (capacity required, 0 to 1e9) separated by ; or newline, or JSON [from,to,capacity]; up to 200 nodes, 1000 edges, 60000 characters"
      },
      "nodes": {
       "type": "string",
       "description": "Optional extra node names (comma or space separated) so isolated nodes are counted; the total still counts toward the 200-node cap"
      },
      "source": {
       "type": "string",
       "description": "Source node name"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "maxFlow": {
       "type": [
        "null",
        "number"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "sinkNode": {
       "type": [
        "null",
        "string"
       ]
      },
      "edgeFlows": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "object",
        "properties": {
         "to": {
          "type": [
           "null",
           "string"
          ]
         },
         "flow": {
          "type": [
           "null",
           "number"
          ]
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/graph-algorithms-edmonds-karp-maximum-flow-11663b1d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from graph-algorithms.x402tookit.com](https://www.zero.xyz/host/graph-algorithms.x402tookit.com/llms.txt)
