Python Guide
Use the first-party Python helper client in this repo for store, ingest, wrapper routes, and status polling without rebuilding request boilerplate.
Base URL
https://api.neuralbase.cloudSetup
Install the package from PyPI, import the client, and start calling the API directly.
python
pip install neuralbase
from neuralbase import NeuralBaseClient
nb = NeuralBaseClient(api_key="nb_live_...")POST
/v1/ingest/support— Ingest a support ticketUse the support wrapper to send subject and comment timeline directly.
python
queued = nb.ingest_support_ticket(
user_id="user_123",
subject="Invoice mismatch",
comments=[
{"author": "user", "content": "The amount is wrong."},
{"author": "agent", "content": "Billing is reviewing it."},
],
source="zendesk",
external_id="ticket_431",
idempotency_key="ticket-431-v1",
)
print(queued["memoryId"])POST
/v1/ingest/document— Ingest a document recordIf you already extracted text elsewhere, send it straight into the document wrapper.
python
queued = nb.ingest_document(
user_id="user_123",
text="Q3 revenue grew 23 percent year over year.",
title="Quarterly report",
mime_type="text/plain",
idempotency_key="doc-q3-report",
)
status = nb.get_memory_status(queued["memoryId"])
print(status["status"])POST
/v1/ingest/batch— Batch ingestSend multiple typed records in one call and replay safely with one idempotency key.
python
batch = nb.ingest_batch(
[
{
"type": "event",
"userId": "user_123",
"data": {"name": "trial_started"},
},
{
"type": "profile",
"userId": "user_123",
"data": {"summary": "Prefers concise answers"},
},
],
idempotency_key="batch-user-123-1",
)
print(batch["accepted"], batch["failedCount"])