Run Ai Enrichment
POST /enrichment/ai/enrich
Run a saved AI enrichment config (web-research / content-gen) on records.
Delegates to AIEnrichmentHandler (the same handler the UI uses).
Unlike the waterfall endpoint - which queues an async job - this call
runs synchronously: handler.run() blocks until every record has
been processed (typical: 30-120 s for a handful of contacts on the
web-research usecase). The response therefore returns status="completed"
with the final counters inline, not a queued job_id to poll.
The job_id is still returned for audit / cross-reference - polling it
via GET /jobs/{job_id} works thanks to the DB fallback on that
endpoint, but most callers will get everything they need from this
response directly.
Credits are charged up-front at the web-research baseline
(CREDITS_AI_ENRICH_ESTIMATE). The handler does not charge
additionally, so this is the only credit deduction per call.
Authorizations
Parameters
Header Parameters
Request Body required
Run a saved AI enrichment config on specific records.
The prompt, model, outputs, and column mapping live on the config
referenced by group_id. We accept record_ids so callers can target
exactly the contacts they want enriched.
object
Group_id of a saved AI enrichment config (starts with ‘ai_enrich’)
List ID the records belong to
Contact IDs to enrich
Responses
200
Successful Response
object
object
object
object
422
Validation Error