← HumanMirror Oracle · Documentation FR

API & MCP documentation

HumanMirror Oracle provides structured analysis for text and JSON data. Responses are versioned through the version property. Errors use ok:false with a stable error.code.

Authentication

After a confirmed Stripe purchase, the success page issues a user key prefixed with hm_oracle_. Send it as a Bearer token:

Authorization: Bearer hm_oracle_YOUR_KEY

Alternative REST header: X-API-Key. Store the key as a server-side secret or protected agent credential; do not publish it in frontend code or public repositories.

GET /api/oracle

Without authentication, returns public service metadata. With a valid key, it also returns the account credit balance and account state.

curl -L https://humanmirror.fr/api/oracle \
  -H "Authorization: Bearer hm_oracle_YOUR_KEY"

POST /api/oracle/analyze

{
  "input": [12, 14, 15, 18, 55],
  "objective": "Detect anomalies",
  "context": "Daily measurements"
}

Maximum serialized input size: 100,000 JSON characters. One successful analysis consumes one credit. Invalid, unauthorized, rate-limited or zero-credit requests do not consume a credit.

Successful response

{
  "ok": true,
  "version": "2026-08-30",
  "request_id": "hmreq_…",
  "result": {
    "summary": "…",
    "profile": {},
    "signals": [],
    "recommendations": [],
    "limitations": []
  },
  "usage": {
    "credits_used": 1,
    "credits_remaining": 99
  }
}

Stable errors

400 invalid_body, 400 missing_input, 401 invalid_api_key, 402 insufficient_credits, 413 payload_too_large, 429 rate_limited, 503 service_unavailable.

JavaScript

const response = await fetch("https://humanmirror.fr/api/oracle/analyze", {
  method: "POST",
  headers: {
    "Authorization": "Bearer " + process.env.HUMANMIRROR_ORACLE_KEY,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    input: [{day: 1, value: 10}, {day: 2, value: 12}],
    objective: "Analyze the trend"
  })
});
const result = await response.json();

Python

import os, requests

r = requests.post(
    "https://humanmirror.fr/api/oracle/analyze",
    headers={"Authorization": f"Bearer {os.environ['HUMANMIRROR_ORACLE_KEY']}"},
    json={"input": [10, 11, 13, 40], "objective": "Detect anomalies"},
    timeout=20,
)
r.raise_for_status()
print(r.json())

Remote MCP

Streamable HTTP endpoint: https://humanmirror.fr/api/oracle/mcp/. Published tool: humanmirror_oracle.

{
  "mcpServers": {
    "humanmirror-oracle": {
      "url": "https://humanmirror.fr/api/oracle/mcp/",
      "headers": {
        "Authorization": "Bearer $HUMANMIRROR_ORACLE_KEY"
      }
    }
  }
}

initialize and tools/list are public. tools/call requires the same user API key and automatically consumes one credit when the analysis succeeds.

Machine-readable assets

OpenAPI 3.1 · MCP manifest · Smithery server card · llms.txt · Official MCP Registry metadata

Rate limits & logging

Operational limit: 30 calls per minute per key, with a complementary network-origin limit. Usage logs contain request identifiers, route, response status, latency and credits consumed. Raw analysis input and API keys are not stored in Oracle usage logs.