Skip to main content
POST
/
api
/
v2
/
supersearch-enrichment
/
ai
Create AI enrichment
curl --request POST \
  --url https://api.instantly.ai/api/v2/supersearch-enrichment/ai \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource_id": "01234567-89ab-cdef-0123-456789abcdef",
  "output_column": "ai_generated_content",
  "resource_type": 2,
  "model_version": "gpt-4o"
}
'
{
  "id": "01234567-89ab-cdef-0123-456789abcdef",
  "resource_id": "01234567-89ab-cdef-0123-456789abcdef",
  "resource_type": 1,
  "output_column": "ai_generated_content",
  "status": 1,
  "model_version": "gpt-4o",
  "overwrite": false,
  "auto_update": true,
  "input_columns": [
    "first_name"
  ],
  "limit": 100,
  "template_id": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
resource_id
string<uuid>
required

Id of the resource (list or campaign) to enrich

Example:

"01234567-89ab-cdef-0123-456789abcdef"

output_column
string
required

Name of the column where the AI enrichment results will be stored

Example:

"ai_generated_content"

resource_type
enum<number>
required

Type of the entity to enrich

Available options:
1,
2
Example:

2

model_version
enum<string>
required

Version of the AI model to use for enrichment. Different models have different capabilities, costs, and token limits.

Available options:
3.5,
4.0,
gpt-4o,
o3,
gpt-4.1,
gpt-4.1-mini,
gpt-5-mini,
gpt-5-nano,
gpt-5,
claude-3.7-sonnet,
claude-3.5-sonnet,
claude-4.5-sonnet,
r1,
grok-4,
gemini-2.0-flash,
gemini-3.0-flash,
gemini-3.0-pro,
sonar,
sonar-pro,
instantly-ai-lightspeed-agent-for-web-research,
instantly-ai-lightspeed-agent-for-email-generation
Example:

"gpt-4o"

input_columns
string[]

List of column names to use as input data for the AI enrichment. These are the fields from your leads that will be used to generate content.

use_instantly_account
boolean

When true, the enrichment will use Instantly's account for API calls. When false, it will use your own API keys configured in settings.

Example:

true

overwrite
boolean

When true, will overwrite existing values in the output column. When false, only empty fields will be enriched.

Example:

false

auto_update
boolean

When true, new leads added to the campaign/list will be automatically enriched using these same settings.

Example:

true

skip_leads_without_email
boolean

When true, leads without an email will be skipped.

Example:

false

limit
number

Maximum number of leads to enrich.

Required range: 1 <= x <= 1000000
Example:

100

prompt
string

Custom prompt to guide the AI enrichment. Use {{variables}} to reference input data. Only used when templateId is not provided.

Example:

"Write a personalized email to {{first_name}} from {{company_name}} about our new product"

template_id
number

ID of a predefined AI prompt template to use instead of a custom prompt. Templates are reusable prompt configurations.

Example:

123

status
enum<number>

Status of the job

Available options:
1,
2,
3,
4
Example:

1

show_state
boolean

Whether to send the state of the enrichment

Example:

true

filters
object[]

Response

Default Response

id
string
required

Unique identifier for the enrichment

Example:

"01234567-89ab-cdef-0123-456789abcdef"

resource_id
string<uuid>
required

ID of the resource being enriched

Example:

"01234567-89ab-cdef-0123-456789abcdef"

resource_type
enum<number>
required

Type of the resource (1 for Campaign, 2 for List)

Available options:
CAMPAIGN,
LIST,
1,
2
Example:

1

output_column
string
required

Name of the column where results will be stored

Example:

"ai_generated_content"

status
number
required

Status of the enrichment job

Example:

1

model_version
string
required

AI model version used for enrichment

Example:

"gpt-4o"

overwrite
boolean
required

Whether to overwrite existing data

Example:

false

auto_update
boolean
required

Whether to auto-update new leads

Example:

true

input_columns
string[]

Input columns used for enrichment

limit
number

Maximum number of leads to process

Example:

100

template_id
null | number

ID of the prompt template used

Example:

123