Skip to main content
V2 endpoint — requires Pro, Team, or Enterprise plan.
Ingest an array of artifacts in a single request. Supports async indexing with job IDs so your application doesn’t block on indexing completion.

Request

POST /v2/ingest
artifacts
object[]
required
Array of artifacts to ingest. Each artifact follows the same shape as /v1/ingest.
workspace_id
string
required
Target workspace.
actor_id
string
required
The agent or user producing these artifacts.
async_index
boolean
default:"false"
When true, returns job IDs immediately instead of waiting for indexing to finish. Use GET /v2/jobs/ to track progress.

Response — synchronous

workspace_id
string
Workspace these artifacts were ingested into.
ingested
object[]
One entry per artifact.

Response — async (async_index: true)

workspace_id
string
Target workspace.
queued_jobs
object[]
One entry per artifact queued for indexing.

Examples

from nined.memory import MemoryClientV2

client = MemoryClientV2(
    base_url="https://api.9dlabs.xyz",
    api_key="your-key",
    workspace_id="ws_ops",
)

result = client.ingest([
    {
        "artifact_type": "document",
        "raw_payload": {"title": "Deploy Runbook", "content": "Step 1: verify staging..."},
    },
    {
        "artifact_type": "note",
        "raw_payload": {"content": "Post-mortem: DB failover took 4 minutes."},
    },
    {
        "artifact_type": "chat_turn",
        "raw_payload": {"role": "user", "content": "Can we reduce failover time?"},
    },
])

for item in result["ingested"]:
    print(f"Stored {item['artifact_id']} ({len(item['span_ids'])} spans)")
Response (sync)
{
  "workspace_id": "ws_ops",
  "ingested": [
    {
      "artifact_id": "a1b2c3d4-...",
      "span_ids": ["s1a2b3c4-...", "s5e6f7g8-..."],
      "created": "2025-03-30T12:00:00Z"
    }
  ]
}
Use idempotency_key on each artifact when retrying a failed batch. Artifacts with a key you’ve already ingested are returned immediately without creating duplicates.