# 十万级异步 Batch API 与 Webhook

提交（词库 × 引擎 × 国家 × 重复采样次数）矩阵评测任务，享受更低异步单价、签名回调与 JSONL/Parquet 导出。

> 单批支持高达 50,000 条采集任务，内置 repeat_count 多次重复无污染采样、失败自动重试与 HMAC 签名 Webhook 回调。

## 提交矩阵批量评测任务

设置 repeat_count（1–10）即可对同一 Prompt 自动发起多次独立无缓存采集，用于衡量品牌提及率的统计方差与稳定性。

```bash
curl -X POST https://api.geoeval.com/v1/batches \
  -H "Authorization: Bearer $GEOEVAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "q4-brand-visibility-us-jp",
    "engines": ["chatgpt", "google-ai-overview", "perplexity"],
    "countries": ["us", "jp"],
    "repeat_count": 3,
    "web_search": true,
    "include_raw_html": false,
    "prompts": [
      "Best serverless Postgres for AI apps",
      "Top OpenTelemetry APM platforms for enterprise"
    ],
    "webhook_url": "https://hooks.yourcompany.com/geoeval/batch",
    "export_format": "jsonl"
  }'
```

## Webhook 签名校验

所有事件回调（batch.completed / batch.failed / credits.low_threshold）均携带基于工作区密钥计算的 HMAC-SHA256 签名头 X-GeoEval-Signature，完成后可直接下载 JSONL、CSV 或 Parquet 归档文件。
