# HumanMirror FX Cost Optimizer

> HumanMirror FX Cost Optimizer is a paid API for AI agents from humanmirror.fr, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Analyzes available connectors and event context to recommend the lowest-cost execution path for automating a workflow or tool call.

## Facts

- Endpoint: POST https://humanmirror.fr/api/x402/automata-fx-cost-optimizer?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/humanmirror-fx-cost-optimizer-25ebcc79
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_R88XhD4jP2Rus3T_QgfdH

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 humanmirror-fx-cost-optimizer-25ebcc79 -d '<json body>'
```

Example prompt: I have connectors 'stripe', 'openai', and 'sendgrid' available — can you run the FX cost optimizer to figure out the cheapest way to handle a payment_completed event given my current context?

## When to prefer this

Choose this endpoint when an autonomous agent or workflow orchestrator has multiple connectors available and needs to determine the lowest-cost execution path before triggering an action. It is especially useful for event-driven pipelines where cost efficiency across FX or API calls matters and where the agent wants a verified, trust-stamped routing decision rather than a raw heuristic.

## Known failure modes

- Invalid or missing 'input' object returns validation error
- Unsupported HTTP method (only POST/PUT/PATCH allowed) causes rejection
- Connector names not recognized may result in suboptimal or null recommendations
- Missing body or wrong bodyType enum value causes schema validation failure
- Payment not settled via x402 results in 402 response blocking execution

## How this service works

HumanMirror est le control plane des agents autonomes : décision avant action, preuve après exécution, routage machine et gouvernance de flotte.

## Output

Returns a JSON object with an 'ok' boolean, a 'status' field indicating 'verified_success' or failure state, and a 'product' label confirming the HumanMirror FX Cost Optimizer processed the request — representing the recommended cost-optimized execution decision.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "properties": {
      "context": {
       "type": "object",
       "description": "Optional incident metadata. The paid decision call does not persist raw context."
      },
      "connectors": {
       "type": "array",
       "items": {
        "type": "string"
       },
       "description": "Connector names declared as available; this is not proof of authorization."
      },
      "event_type": {
       "type": "string",
       "description": "Optional observed event type for trigger matching."
      }
     },
     "additionalProperties": false
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "additionalProperties": false
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "status": "verified_success",
  "product": "HumanMirror FX Cost Optimizer"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/humanmirror-fx-cost-optimizer-25ebcc79/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from humanmirror.fr](https://www.zero.xyz/host/humanmirror.fr/llms.txt)
