# Delx Commerce buyer skill

Use Delx Commerce when an autonomous agent needs a paid machine result without
creating an account or managing an API key.

## Workflow

1. Read `https://api.delx.ai/openapi.x402.json`.
2. Select one canonical operation and validate its input before payment.
3. Send the request without payment credentials.
4. Read the HTTP 402 `PAYMENT-REQUIRED` challenge.
5. Pay the exact USDC amount on the declared network.
6. Retry the unchanged request with `PAYMENT-SIGNATURE`.
7. Verify the returned asset URL, generation ID, byte count, and SHA-256.

## AgentCash

```bash
npx agentcash@latest discover https://api.delx.ai
```

## Find a route by intent

Before scanning the complete OpenAPI, describe the outcome to the free intent
router. It ranks only matching products from the governed live catalog and
returns their exact price, input example, and ready-to-run AgentCash commands.

```bash
curl --get https://api.delx.ai/api/v1/x402/start \
  --data-urlencode "q=audit an x402 server before listing it"
```

If `match_count` is zero, do not substitute an unrelated Delx product. Inspect
the complete portfolio or use another provider.

## Use a portable intent card

For a stable outcome-specific entry point, read
`https://commerce.delx.ai/.well-known/delx-commerce.json`, choose an item under
`intent_cards.items`, then fetch its `machine_url`. Each
`delx/intent-card/v1` document contains the recommended tool, current price,
input schema, example payload, bounded AgentCash command, and evidence URLs.
Preserve its `x-delx-source: intent-card-<intent-slug>` header so discovery can
be joined to payment and delivery without identifying the buyer.

## Lowest-friction speech request

The speech route accepts native `text` or the familiar OpenAI-shaped fields
`input`, `model`, `voice`, `response_format`, and `speed`. The response is a
Delx JSON delivery receipt containing a durable WAV URL and SHA-256.

```bash
npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/speech \
  -m POST \
  -b '{"input":"Your agent task is complete.","model":"tts-1","voice":"alloy","response_format":"wav","speed":1}'
```

## Lowest-friction utility request

Use the 0.001 USDC API health report when an agent needs structured endpoint
status, latency, content type, redirects, and JSON validity without managing a
provider API key.

```bash
npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/api-health-report \
  -m POST \
  -b '{"url":"https://api.delx.ai/health","timeout":8}'
```

## Loyalty reward quote

Use the 0.001 USDC loyalty route to calculate deterministic points, reward
value, effective rebate, and a caller-owned idempotent ledger instruction.

```bash
npx agentcash@latest fetch https://api.delx.ai/api/v1/x402/loyalty-reward-quote \
  -m POST \
  -b '{"purchase_amount":49.99,"points_per_unit":2,"tier_multiplier":1.5,"bonus_points":10,"event_id":"order-123"}'
```

## Commercial boundary

Delx Commerce is not Delx Ontology. Commerce sells delivered machine services.
Ontology provides witness, identity, recovery, and continuity research without
requiring a purchase.
