Data catalog / ai
AI enrichment
Run a prompt over a record and get text or structured JSON back, using OpenAI, Anthropic, Gemini or Perplexity, without a separate account with each. Classify a company, score a lead against your ICP, summarise a profile or a page, for a flat rate per call.
In short: RichAPI POST /ai_enrich runs a prompt through OpenAI, Anthropic, Gemini or Perplexity (the provider field) and returns the model's output with the provider, model and token counts. The prompt can contain {{placeholder}} variables filled from a context object. output_type is text or json, and output_schema guides structured JSON output. Optional fields: system_prompt, model, temperature (default 0.3), max_tokens (default 4096), use_web_search, and for Perplexity search_domain_filter and search_recency_filter. Billing is a flat 2 credits per call, billed on any 2xx response.
Last updated November 4, 2026
A model call inside your enrichment pipeline
POST /ai_enrich sends a prompt to the model provider you name in provider (openai, anthropic, gemini or perplexity) and returns what the model wrote. You call it with your RichAPI key and pay from the same credits as every other endpoint, so you need no separate account with each model provider.
Write the prompt as a template. {{company}} in the prompt is replaced with context.company, so one prompt runs over every row of a list. Each row only changes the context.
The response carries the output in content, plus provider, model, input_tokens, output_tokens and finish_reason. A finish_reason other than stop usually means the answer hit max_tokens and was cut off.
Get JSON you can write to a column
Set output_type to json and pass a JSON schema as output_schema, as in the example above. The model is steered to return an object with those fields, so a score or a yes/no answer lands in a CRM field without parsing free text.
Keep temperature low for classification. The default is 0.3. Set it to 0 for the most repeatable labels. Use system_prompt for the rules that apply to every row, such as your ICP definition, and keep prompt for the row itself.
Rate
| Endpoint | What it does | Credits | Billed |
|---|---|---|---|
/ai_enrich |
Enrich, classify, extract, or summarize text using OpenAI, Anthropic, Gemini, or Perplexity. | 2 | per call |
Rates are read from the live OpenAPI spec. Credits are prepaid and never expire, and the price of a credit depends on your package: see pricing.
What AI enrichment costs
A flat 2 credits per call, whatever the provider, model or prompt length. Scoring 1,000 companies costs 2,000 credits.
The call bills on any 2xx response, including an answer you did not want, so test the prompt on 20 rows before you run 2,000. The rate is the same for a 50-word prompt and a 3,000-word one, so put the full record in context rather than trimming it to save credits.
Jobs people run with it
- ICP filter with AI enrich enriches a company with company enrichment, then scores it with this endpoint against your ICP. Two calls per account.
- Summarise a website before outreach: scrape it with the web scraping endpoints, then pass the markdown in
context. - With
provider: "perplexity"anduse_web_search: true, the model can look things up. Narrow it withsearch_domain_filter(a list of domains) andsearch_recency_filter(day,week,monthoryear). Those two fields only apply to Perplexity.
Reference
| Name | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Prompt template; use {{fieldName}} placeholders for dynamic values |
provider | string | Yes | AI provider: openai, anthropic, gemini, or perplexity |
context | object | No | Key-value pairs used for {{placeholder}} substitution in the prompt |
max_tokens | integer | No | Maximum output tokens; defaults to provider default |
model | string | No | Model override; defaults to provider default model |
output_schema | object | No | JSON schema used to guide structured output when output_type is json |
output_type | string | No | Output format: text or json |
search_domain_filter | array of object | No | Perplexity only; limit search to specific domains |
search_recency_filter | string | No | Perplexity only; filter by recency: day, week, month, year |
system_prompt | string | No | Optional system prompt or instructions |
temperature | number | No | Sampling temperature between 0 and 2 |
use_web_search | boolean | No | Enable web search when supported by the selected provider |
promptstring · Required- Prompt template; use {{fieldName}} placeholders for dynamic values
providerstring · Required- AI provider: openai, anthropic, gemini, or perplexity
contextobject · Optional- Key-value pairs used for {{placeholder}} substitution in the prompt
max_tokensinteger · Optional- Maximum output tokens; defaults to provider default
modelstring · Optional- Model override; defaults to provider default model
output_schemaobject · Optional- JSON schema used to guide structured output when output_type is json
output_typestring · Optional- Output format: text or json
search_domain_filterarray of object · Optional- Perplexity only; limit search to specific domains
search_recency_filterstring · Optional- Perplexity only; filter by recency: day, week, month, year
system_promptstring · Optional- Optional system prompt or instructions
temperaturenumber · Optional- Sampling temperature between 0 and 2
use_web_searchboolean · Optional- Enable web search when supported by the selected provider
Request
Minimum required parameters for a ai enrichment call.
{
"provider": "openai",
"prompt": "Does {{company}} sell to other businesses? Description: {{description}}",
"context": {
"company": "Acme",
"description": "Invoicing software for small accounting firms."
},
"output_type": "json",
"output_schema": {
"type": "object",
"properties": {
"b2b": {
"type": "boolean"
},
"reason": {
"type": "string"
}
},
"required": [
"b2b",
"reason"
]
}
}See it in a workflow
Playbooks
Real patterns, recipes, and prompts other builders run on RichAPI
Developer Docs
Auth, request shape, and error handling
FAQ
