curl -X POST https://api.intellibase.dev/api/v1/projects/proj-abc123/ingest \
-H "Authorization: Bearer ib-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "Alice joined the engineering team in January 2024. She is working on the authentication feature, which is part of the security module. The feature is scheduled to launch in March 2024.",
"source_doc_id": "doc-001"
}'
import requests
project_id = "proj-abc123"
headers = {
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
}
response = requests.post(
f"https://api.intellibase.dev/api/v1/projects/{project_id}/ingest",
headers=headers,
json={
"text": "Alice joined the engineering team...",
"source_doc_id": "doc-001"
}
)
job = response.json()
print(f"Ingestion job created: {job['job_id']}")
print(f"Status: {job['status']}")
# Poll for completion
import time
while True:
status_response = requests.get(
f"https://api.intellibase.dev/api/v1/projects/{project_id}/jobs/{job['job_id']}",
headers=headers
)
status = status_response.json()
if status['status'] == 'completed':
print(f"✓ Completed: {status['chunks_processed']} chunks, "
f"{status['nodes_created']} nodes, {status['edges_created']} edges")
break
elif status['status'] == 'failed':
print(f"✗ Failed: {status['error_message']}")
break
time.sleep(2)
const projectId = "proj-abc123";
const response = await fetch(
`https://api.intellibase.dev/api/v1/projects/${projectId}/ingest`,
{
method: "POST",
headers: {
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify({
text: "Alice joined the engineering team...",
source_doc_id: "doc-001"
})
}
);
const job = await response.json();
console.log(`Ingestion job created: ${job.job_id}`);
console.log(`Status: ${job.status}`);
// Poll for completion
const pollStatus = async () => {
while (true) {
const statusResponse = await fetch(
`https://api.intellibase.dev/api/v1/projects/${projectId}/jobs/${job.job_id}`,
{
headers: {
"Authorization": "Bearer ib-your-api-key"
}
}
);
const status = await statusResponse.json();
if (status.status === "completed") {
console.log(`✓ Completed: ${status.chunks_processed} chunks, ` +
`${status.nodes_created} nodes, ${status.edges_created} edges`);
break;
} else if (status.status === "failed") {
console.error(`✗ Failed: ${status.error_message}`);
break;
}
await new Promise(resolve => setTimeout(resolve, 2000));
}
};
await pollStatus();
{
"job_id": "job-abc123",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z"
}
{
"detail": "Project proj-invalid not found"
}
{
"detail": "Token usage limit exceeded"
}
{
"detail": "Rate limit exceeded. Try again in 60 seconds."
}
Ingestion
Ingest Text
Add text data to your project for knowledge extraction and indexing
POST
/
api
/
v1
/
projects
/
{project_id}
/
ingest
curl -X POST https://api.intellibase.dev/api/v1/projects/proj-abc123/ingest \
-H "Authorization: Bearer ib-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "Alice joined the engineering team in January 2024. She is working on the authentication feature, which is part of the security module. The feature is scheduled to launch in March 2024.",
"source_doc_id": "doc-001"
}'
import requests
project_id = "proj-abc123"
headers = {
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
}
response = requests.post(
f"https://api.intellibase.dev/api/v1/projects/{project_id}/ingest",
headers=headers,
json={
"text": "Alice joined the engineering team...",
"source_doc_id": "doc-001"
}
)
job = response.json()
print(f"Ingestion job created: {job['job_id']}")
print(f"Status: {job['status']}")
# Poll for completion
import time
while True:
status_response = requests.get(
f"https://api.intellibase.dev/api/v1/projects/{project_id}/jobs/{job['job_id']}",
headers=headers
)
status = status_response.json()
if status['status'] == 'completed':
print(f"✓ Completed: {status['chunks_processed']} chunks, "
f"{status['nodes_created']} nodes, {status['edges_created']} edges")
break
elif status['status'] == 'failed':
print(f"✗ Failed: {status['error_message']}")
break
time.sleep(2)
const projectId = "proj-abc123";
const response = await fetch(
`https://api.intellibase.dev/api/v1/projects/${projectId}/ingest`,
{
method: "POST",
headers: {
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify({
text: "Alice joined the engineering team...",
source_doc_id: "doc-001"
})
}
);
const job = await response.json();
console.log(`Ingestion job created: ${job.job_id}`);
console.log(`Status: ${job.status}`);
// Poll for completion
const pollStatus = async () => {
while (true) {
const statusResponse = await fetch(
`https://api.intellibase.dev/api/v1/projects/${projectId}/jobs/${job.job_id}`,
{
headers: {
"Authorization": "Bearer ib-your-api-key"
}
}
);
const status = await statusResponse.json();
if (status.status === "completed") {
console.log(`✓ Completed: ${status.chunks_processed} chunks, ` +
`${status.nodes_created} nodes, ${status.edges_created} edges`);
break;
} else if (status.status === "failed") {
console.error(`✗ Failed: ${status.error_message}`);
break;
}
await new Promise(resolve => setTimeout(resolve, 2000));
}
};
await pollStatus();
{
"job_id": "job-abc123",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z"
}
{
"detail": "Project proj-invalid not found"
}
{
"detail": "Token usage limit exceeded"
}
{
"detail": "Rate limit exceeded. Try again in 60 seconds."
}
Endpoint
POST https://api.intellibase.dev/api/v1/projects/{project_id}/ingest
Path Parameters
string
required
The unique identifier of the project
Authentication
Requires a valid API key with access to the project.Request Body
string
required
The raw text content to ingest
string
required
Unique identifier for this document (used for provenance tracking)
Response
string
Unique identifier for the ingestion job
string
Initial job status:
pending or runningstring
When the job was created
curl -X POST https://api.intellibase.dev/api/v1/projects/proj-abc123/ingest \
-H "Authorization: Bearer ib-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "Alice joined the engineering team in January 2024. She is working on the authentication feature, which is part of the security module. The feature is scheduled to launch in March 2024.",
"source_doc_id": "doc-001"
}'
import requests
project_id = "proj-abc123"
headers = {
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
}
response = requests.post(
f"https://api.intellibase.dev/api/v1/projects/{project_id}/ingest",
headers=headers,
json={
"text": "Alice joined the engineering team...",
"source_doc_id": "doc-001"
}
)
job = response.json()
print(f"Ingestion job created: {job['job_id']}")
print(f"Status: {job['status']}")
# Poll for completion
import time
while True:
status_response = requests.get(
f"https://api.intellibase.dev/api/v1/projects/{project_id}/jobs/{job['job_id']}",
headers=headers
)
status = status_response.json()
if status['status'] == 'completed':
print(f"✓ Completed: {status['chunks_processed']} chunks, "
f"{status['nodes_created']} nodes, {status['edges_created']} edges")
break
elif status['status'] == 'failed':
print(f"✗ Failed: {status['error_message']}")
break
time.sleep(2)
const projectId = "proj-abc123";
const response = await fetch(
`https://api.intellibase.dev/api/v1/projects/${projectId}/ingest`,
{
method: "POST",
headers: {
"Authorization": "Bearer ib-your-api-key",
"Content-Type": "application/json"
},
body: JSON.stringify({
text: "Alice joined the engineering team...",
source_doc_id: "doc-001"
})
}
);
const job = await response.json();
console.log(`Ingestion job created: ${job.job_id}`);
console.log(`Status: ${job.status}`);
// Poll for completion
const pollStatus = async () => {
while (true) {
const statusResponse = await fetch(
`https://api.intellibase.dev/api/v1/projects/${projectId}/jobs/${job.job_id}`,
{
headers: {
"Authorization": "Bearer ib-your-api-key"
}
}
);
const status = await statusResponse.json();
if (status.status === "completed") {
console.log(`✓ Completed: ${status.chunks_processed} chunks, ` +
`${status.nodes_created} nodes, ${status.edges_created} edges`);
break;
} else if (status.status === "failed") {
console.error(`✗ Failed: ${status.error_message}`);
break;
}
await new Promise(resolve => setTimeout(resolve, 2000));
}
};
await pollStatus();
{
"job_id": "job-abc123",
"status": "pending",
"created_at": "2024-01-15T10:30:00Z"
}
{
"detail": "Project proj-invalid not found"
}
{
"detail": "Token usage limit exceeded"
}
{
"detail": "Rate limit exceeded. Try again in 60 seconds."
}
Job Status: Use the Get Job endpoint to poll for completion status.
Rate Limits: Ingestion is limited to 10 requests per minute. Also check your token usage limits.
⌘I