Enrichment

Run Ai Enrichment

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.

post/enrichment/ai/enrich

Request

  • Base URL: https://be.graph8.com/api/v1
  • URL: https://be.graph8.com/api/v1/enrichment/ai/enrich
  • Auth: HTTP bearer

Headers

Authorizationstring nullable
X-Target-Org-Idstring nullable

Request body

group_idstring required

group_id of a saved AI enrichment config (starts with 'ai_enrich')

list_idinteger required

List ID the records belong to

record_idsinteger[] required

Contact IDs to enrich

max_recordsinteger nullable

Optional cap on records processed (defaults to len(record_ids)).

skip_existing_valuesboolean nullable

Override the config's skip_existing_values setting.

Response

Successful Response

Changes