> ## Documentation Index
> Fetch the complete documentation index at: https://developers.getbeta.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Corroborate before write

> Pre-action verification for AI agents.

## Scenario

Your agent is about to send an outreach email, draft a report, or write to a CRM. The output includes a factual claim — *"Jensen Huang led NVIDIA's pivot to AI accelerators"* or *"Stripe acquired Bridge in late 2024."* Before the agent acts, verify the claim against BETA's structured sources.

## Pattern

```javascript theme={null}
async function verifyBeforeWrite(company, claims) {
  const res = await fetch('https://api.getbeta.io/api/v1/corroborate', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.BETA_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ company, claims })
  }).then(r => r.json());

  return res.results.map(r => {
    if (r.corroborated && r.confidence > 0.8) {
      return { action: 'use', claim_index: r.claim_index, evidence: r.evidence };
    }
    if (r.corroborated) {
      return {
        action: 'use_with_caveat',
        claim_index: r.claim_index,
        confidence: r.confidence,
        evidence: r.evidence
      };
    }
    return {
      action: 'drop',
      claim_index: r.claim_index,
      reason: r.reason,
      detail: r.detail
    };
  });
}

// Usage
const decisions = await verifyBeforeWrite('NVIDIA', [
  { type: 'role', person_name: 'Jensen Huang', role: 'CEO' },
  { type: 'event', description: 'acquisition of Mellanox' }
]);

for (const d of decisions) {
  if (d.action === 'drop') {
    console.warn('Dropping unverified claim:', d);
  }
}
```

## Claim types

| `type`   | Best for                              | Required fields                                                |
| -------- | ------------------------------------- | -------------------------------------------------------------- |
| `role`   | "Did X hold Y role at Z?"             | `person_name`, optional `role`                                 |
| `event`  | "Did event E happen?"                 | `description` (keyword-style, e.g., "acquisition of Mellanox") |
| `person` | "Was X ever at Z?" (no specific role) | `person_name`                                                  |

## Interpreting results

* `corroborated: true, confidence > 0.8` — multi-source match. Use the evidence as your citation.
* `corroborated: true, confidence 0.5 – 0.8` — single-source match (often news-only). Cite cautiously.
* `corroborated: false, reason: "no_match"` — BETA found nothing. **Do not assert this claim.** This is informational, not an error.

See [Citation Contract → What BETA refuses to assert](/citation-contract#what-beta-refuses-to-assert) for the contract details.

## Cost notes

`/corroborate` is BETA's most expensive call (\$0.10/claim during overage). **Batch up to 10 claims per request** to minimize round-trips.
