curl --request POST \
--url https://app.loice.ai/api/v1/icp/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"analysisId": "cmh0a1",
"includeEmails": false,
"expectedPoints": 1200
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({analysisId: 'cmh0a1', includeEmails: false, expectedPoints: 1200})
};
fetch('https://app.loice.ai/api/v1/icp/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://app.loice.ai/api/v1/icp/generations';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({analysisId: 'cmh0a1', includeEmails: false, expectedPoints: 1200})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://app.loice.ai/api/v1/icp/generations"
payload = {
"analysisId": "cmh0a1",
"includeEmails": False,
"expectedPoints": 1200
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"generation": {
"id": "cmh0g1",
"analysisId": "cmh0a1",
"status": "queued",
"reason": null,
"includeEmails": false,
"estimatePoints": 1200,
"spentPoints": 0,
"siteLabel": "loice.ai",
"lists": [
{
"id": "cmh0l1",
"name": "Outbound sales teams",
"description": "SDR managers at B2B SaaS companies",
"wanted": 1200,
"phase": "pending",
"reason": null,
"addedCount": 0,
"revealedCount": 0,
"pointsSpent": 0,
"listId": "cmh0ll1"
}
]
},
"replay": true
}
}{
"data": {
"generation": {
"id": "cmh0g1",
"analysisId": "cmh0a1",
"status": "queued",
"reason": null,
"includeEmails": false,
"estimatePoints": 1200,
"spentPoints": 0,
"siteLabel": "loice.ai",
"lists": [
{
"id": "cmh0l1",
"name": "Outbound sales teams",
"description": "SDR managers at B2B SaaS companies",
"wanted": 1200,
"phase": "pending",
"reason": null,
"addedCount": 0,
"revealedCount": 0,
"pointsSpent": 0,
"listId": "cmh0ll1"
}
]
},
"replay": false
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}Generate ICP lead lists
Makes one lead list per selected card with leads, filled in the background — poll GET /api/v1/icp/generations/{generationId}. Get expectedPoints from POST /api/v1/icp/generations/quote first; a different figure is refused (estimate_changed) so a price never moves under an approval. Nothing is charged at the start: each list’s search and reveals bill through their own operations, never beyond expectedPoints. One generation at a time per workspace. The same contract as the web app’s ICP Builder (an API key instead of a session).
Billing
- per lead added to a list, debited by the list’s own search run — a list that finds nobody is free.
- includeEmails: per member whose verified work email is looked up, only with
includeEmails: true.
The current cost is shown in the app under Settings → Billing and in the live GET /api/v1/openapi.json. Calls that end in a system or provider error (HTTP 500) or are rate limited (HTTP 429) are not billed. The charged and pointsCharged fields of the response state what this call actually consumed.
curl --request POST \
--url https://app.loice.ai/api/v1/icp/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"analysisId": "cmh0a1",
"includeEmails": false,
"expectedPoints": 1200
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({analysisId: 'cmh0a1', includeEmails: false, expectedPoints: 1200})
};
fetch('https://app.loice.ai/api/v1/icp/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://app.loice.ai/api/v1/icp/generations';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({analysisId: 'cmh0a1', includeEmails: false, expectedPoints: 1200})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://app.loice.ai/api/v1/icp/generations"
payload = {
"analysisId": "cmh0a1",
"includeEmails": False,
"expectedPoints": 1200
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"generation": {
"id": "cmh0g1",
"analysisId": "cmh0a1",
"status": "queued",
"reason": null,
"includeEmails": false,
"estimatePoints": 1200,
"spentPoints": 0,
"siteLabel": "loice.ai",
"lists": [
{
"id": "cmh0l1",
"name": "Outbound sales teams",
"description": "SDR managers at B2B SaaS companies",
"wanted": 1200,
"phase": "pending",
"reason": null,
"addedCount": 0,
"revealedCount": 0,
"pointsSpent": 0,
"listId": "cmh0ll1"
}
]
},
"replay": true
}
}{
"data": {
"generation": {
"id": "cmh0g1",
"analysisId": "cmh0a1",
"status": "queued",
"reason": null,
"includeEmails": false,
"estimatePoints": 1200,
"spentPoints": 0,
"siteLabel": "loice.ai",
"lists": [
{
"id": "cmh0l1",
"name": "Outbound sales teams",
"description": "SDR managers at B2B SaaS companies",
"wanted": 1200,
"phase": "pending",
"reason": null,
"addedCount": 0,
"revealedCount": 0,
"pointsSpent": 0,
"listId": "cmh0ll1"
}
]
},
"replay": false
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}{
"error": {
"message": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "<string>",
"retryAfterSeconds": 123
}
}Authorizations
Headers
Optional, 1–255 printable ASCII characters, scoped to your workspace. A repeat with the same key and body answers the original generation (200, replay: true) and starts nothing new; a different body with the same key is refused with 409 idempotency_conflict.
1 - 255
