# Delx Commerce Dependency Order API

> Delx Commerce Dependency Order API is a paid API for AI agents from commerce.delx.ai, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-01).

Performs topological sorting on a directed graph of workflow nodes, returning execution order and cycle detection results.

## Facts

- Endpoint: POST https://commerce.delx.ai/api/v1/x402/dependency-order?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/delx-commerce-dependency-order-api-98d8459e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OgrjzhcI_Fof5SKfWvl7w

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 delx-commerce-dependency-order-api-98d8459e -d '<json body>'
```

Example prompt: I have a workflow with nodes A, B, C, D and edges B→A, C→B, D→C — can you give me the correct topological execution order and tell me if there are any cycles?

## When to prefer this

Choose this endpoint when you need a lightweight, pay-per-call topological sort without standing up your own graph library or infrastructure. Ideal for AI agents orchestrating multi-step workflows that need to dynamically compute execution order at runtime. At $0.003 USDC per call with no signup required, it's well-suited for agentic pipelines that occasionally need dependency ordering without embedding a full graph algorithm library.

## Known failure modes

- Cyclic graph detected — returns cyclic:true with partial or empty order
- Malformed edge objects missing 'from' or 'to' fields — likely validation error
- Empty nodes array — may return empty order
- Disconnected graph components — unresolved nodes listed in 'unresolved' field
- Payment failure via x402 — 402 response before computation occurs

## How this service works

Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.

## Output

Returns a JSON object with an ordered array of node identifiers in safe topological execution order, a boolean 'cyclic' flag indicating whether a cycle was detected, a list of unresolved nodes, and an advisory note that cycle detection is structural only. Uses schema identifier 'delx/util-dependency-order/v1'.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "edges": {
   "type": "array",
   "description": "Directed edges as {from,to} objects among nodes."
  },
  "nodes": {
   "type": "array",
   "description": "Workflow node identifiers for topological ordering."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "order": [
   "a",
   "b",
   "c"
  ],
  "cyclic": false,
  "schema": "delx/util-dependency-order/v1",
  "advisory": "Cycle detection is structural only.",
  "unresolved": []
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/delx-commerce-dependency-order-api-98d8459e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from commerce.delx.ai](https://www.zero.xyz/host/commerce.delx.ai/llms.txt)
