# Nova Company Intelligence & Agent Reliability API

Version 0.4.0. Protocol: x402 v2, scheme exact, network eip155:8453. There is no API key.

## When to use each tool

Use POST `https://nova-agent-output-recovery.onrender.com/api/agent-output-recovery` ($0.01) when an LLM or tool call returns prose, Markdown, or broken JSON and the next step needs one JSON value. Send `rawOutput`. Include a JSON Schema when the caller needs validation, coercion, or a retry prompt.

Use POST `https://nova-agent-output-recovery.onrender.com/api/company-snapshot` ($0.03) when the agent has a public company website and needs a cheap, fast profile: name, what the company does, offerings, 3 to 5 source URLs, and confidence. Headquarters and size are included only when a retrieved company page states them. Send `website`. Use the $0.25 company intelligence report instead when external signals and a longer profile are required.

Use POST `https://nova-agent-output-recovery.onrender.com/api/company-intelligence-report` ($0.25) when the agent has a public company website and needs an official profile, external signals, source URLs, confidence, and limitations. Send `website`. Optional `focus` is a list of short research priorities.

Use POST `https://nova-agent-output-recovery.onrender.com/v1/research-brief` ($0.99) when the agent needs a cited decision memo: executive answer, 5 to 8 public URLs, a claim/evidence matrix, conflicting evidence, confidence, risks, and three next research actions. Send `question`. Optional fields are `company`, `domain`, `time_window`, and `depth`.

The same four products are MCP tools on POST `https://nova-agent-output-recovery.onrender.com/mcp`: `recover_agent_output` ($0.01), `company_snapshot` ($0.03), `company_intelligence_report` ($0.25), and `cited_research_brief` ($0.99). Call `nova_catalog` first. It is free and returns prices plus example inputs. An unpaid paid tool returns a payment-required tool result (`isError: true`, `structuredContent` is PaymentRequired). Pay that challenge and retry with `params._meta["x402/payment"]`. The tool runs only after that payment is verified and settled.

Do not send private-person dossiers, requests to invent citations, or questions that ask for a trading signal or an automated medical, legal, financial, employment, or insurance decision. Do not use a company snapshot, company report, or research memo as the sole basis for those decisions.

## Payment

1. Send the request with no payment header.
2. Read HTTP 402 and base64-decode `PAYMENT-REQUIRED`.
3. Pay `accepts[0]` (exact USDC). The header amount is atomic units, not decimal dollars.
4. Retry with `PAYMENT-SIGNATURE`.

The published production recipient is `0x7cBe177F14f9eA34F80033a79f064B49C15EEe6f`. The 402 challenge wins if it differs. Machine-readable prices and the challenge schema are in `https://nova-agent-output-recovery.onrender.com/openapi.json`.

## Agent output recovery example

```json
{
  "rawOutput": "The result is:\n```json\n{name: 'Alice', active: True, tags: ['ai',],}\n```",
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string"
      },
      "active": {
        "type": "boolean"
      },
      "tags": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    },
    "required": [
      "name",
      "active"
    ],
    "additionalProperties": false
  },
  "options": {
    "coerceTypes": true,
    "applyDefaults": false,
    "removeAdditional": false
  }
}
```

A successful body looks like:

```json
{
  "status": "recovered-and-valid",
  "data": {
    "name": "Alice",
    "active": true,
    "tags": [
      "ai"
    ]
  },
  "repairedJson": "{\"name\":\"Alice\",\"active\":true,\"tags\":[\"ai\"]}",
  "repairApplied": true,
  "extractedFrom": "embedded-json-candidate",
  "schemaProvided": true,
  "schemaValid": true,
  "validationErrors": [],
  "retryPrompt": null,
  "diagnostics": {
    "candidateCount": 2,
    "selectedCandidate": 1,
    "failedAttemptsBeforeSuccess": 1,
    "processingMs": 2
  }
}
```

HTTP 422 means the output was unrecoverable. That response is still the recovery result, with `status` set to `unrecoverable`.

## Company snapshot example

```json
{
  "website": "https://www.example.com"
}
```

A completed snapshot includes `snapshot.name`, `snapshot.whatTheyDo`, `snapshot.offerings`, `snapshot.headquarters`, `snapshot.size`, `snapshot.confidence`, and 3 to 5 `sources`. `headquarters` and `size` are null when the retrieved company pages do not state them. Every `sourceUrl` is one of those sources.

```json
{
  "status": "complete",
  "generatedAt": "2026-07-26T00:00:00.000Z",
  "company": {
    "website": "https://www.example.com",
    "domain": "example.com"
  },
  "snapshot": {
    "name": {
      "value": "Example",
      "sourceUrl": "https://www.example.com/about"
    },
    "whatTheyDo": {
      "value": "Example builds checkout software for retailers.",
      "sourceUrl": "https://www.example.com/about"
    },
    "offerings": [
      {
        "value": "card checkout",
        "sourceUrl": "https://www.example.com/product"
      }
    ],
    "headquarters": {
      "value": "Seattle, Washington",
      "sourceUrl": "https://www.example.com/about"
    },
    "size": {
      "value": "120 employees",
      "sourceUrl": "https://www.example.com/about"
    },
    "confidence": "medium",
    "limitations": "Headquarters and size appear only when a retrieved company page states them. This is not a full company-intelligence report."
  },
  "sources": [
    {
      "sourceType": "company-owned",
      "title": "Example | About",
      "url": "https://www.example.com/about",
      "snippet": "Example builds checkout software for retailers. The company is headquartered in Seattle, Washington and has 120 employees.",
      "score": 0.9,
      "publishedDate": null
    },
    {
      "sourceType": "company-owned",
      "title": "Products | Example",
      "url": "https://www.example.com/product",
      "snippet": "Products include card checkout, invoicing, and payouts.",
      "score": 0.82,
      "publishedDate": null
    },
    {
      "sourceType": "company-owned",
      "title": "Customers | Example",
      "url": "https://www.example.com/customers",
      "snippet": "Example helps retail merchants run online checkout across stores.",
      "score": 0.74,
      "publishedDate": null
    }
  ],
  "research": {
    "provider": "Tavily",
    "searches": 1,
    "creditsUsed": 1,
    "responseTimeMs": 700,
    "cacheHit": false,
    "sourceCount": 3,
    "requestIds": []
  }
}
```

## Company intelligence example

```json
{
  "website": "https://www.example.com",
  "focus": [
    "products",
    "recent partnerships",
    "growth signals"
  ]
}
```

A successful body includes `report`, `sources`, and `research`:

```json
{
  "status": "complete",
  "generatedAt": "2026-07-26T00:00:00.000Z",
  "company": {
    "website": "https://www.example.com",
    "domain": "example.com"
  },
  "requestedFocus": [
    "products",
    "recent partnerships",
    "growth signals"
  ],
  "report": {
    "officialProfile": "Company-owned source summary.",
    "externalSignals": "External public-source summary.",
    "confidence": "medium",
    "limitations": "Public-web research may be incomplete or outdated."
  },
  "sources": [
    {
      "sourceType": "company-owned",
      "title": "Example Company",
      "url": "https://www.example.com/about",
      "snippet": "Example source excerpt.",
      "score": 0.82,
      "publishedDate": null,
      "favicon": null
    }
  ],
  "research": {
    "provider": "Tavily",
    "searches": 2,
    "creditsUsed": 2,
    "responseTimeMs": 1800,
    "officialSourceCount": 4,
    "externalSourceCount": 3,
    "requestIds": []
  }
}
```

## Cited research decision memo example

```json
{
  "question": "What public evidence describes Northwind's payments product and its Contoso partnership?",
  "company": "Northwind",
  "domain": "https://www.northwind.example",
  "time_window": "year",
  "depth": "standard"
}
```

A completed memo includes `executiveAnswer`, `markdown`, 5 to 8 `sources`, `claimEvidenceMatrix`, `conflictingEvidence`, `confidence`, `risksAndUnknowns`, and exactly three `nextResearchActions`. Every cited URL was returned by retrieval for that request.
