Documentation Index
Fetch the complete documentation index at: https://mintlify.com/timepoint-ai/timepoint-clockchain/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The/ingest/subgraph endpoint allows you to import both nodes and edges in a single request. This is ideal for ingesting pre-computed relationship graphs where you want to explicitly define connections between timepoint events.
Endpoint
/api/v1/ingest/subgraphAuthentication
Requires a valid service key passed via theX-Service-Key header.
Request Body
Array of node objects representing timepoint events.
Array of edge objects defining relationships between nodes.
Node Structure
Edge Structure
Response
Number of nodes successfully added to the graph.
Number of edges successfully created between nodes.
Example Request
Example Response
Deduplication Behavior
Nodes are deduplicated using the
tdf_hash field, which is computed from canonical temporal-spatial-content fields.-
If you provide a
tdf_hashin the request, it will be used as-is -
If omitted, the system computes the hash from these fields:
- Temporal:
year,month,day,time - Spatial:
country,region,city - Content:
slug,name,one_liner
- Temporal:
-
Nodes with matching
idandtdf_hashare considered duplicates and won’t create new entries - If the content changes (different hash), the node is updated
- Edges are identified by
(source, target, type)tuple - Duplicate edges are silently ignored
- Invalid edge types are skipped (logged but don’t fail the request)
Source Types and Confidence
Thesource_type and confidence fields help track data provenance and quality:
Source Type
Usesource_type to categorize the origin of your data:
historical: Verified historical facts from reliable sourcesgenerated: AI-generated content (may require fact-checking)user_input: User-submitted eventssynthetic: Programmatically created for testing or simulation
Confidence Scoring
Theconfidence field (0.0 to 1.0) indicates data reliability:
- 1.0: Fully verified, primary source
- 0.8-0.9: High confidence, secondary sources
- 0.5-0.7: Medium confidence, needs verification
- 0.0-0.4: Low confidence, speculative or uncertain
Use consistent confidence thresholds across your ingestion pipelines to enable quality filtering and analysis.
Edge Types
Choose the appropriate edge type to represent the relationship between events:| Type | Description | Example |
|---|---|---|
causal | One event directly caused or enabled another | Sputnik → Moon Landing |
thematic | Events share a common theme or topic | Apollo 11 ↔ Apollo 13 |
temporal | Events occurred in close temporal proximity | D-Day → VE Day |
spatial | Events occurred in the same location | Multiple events in Berlin |
Error Handling
Invalid request structure or missing required fields.
Missing or invalid service key.
Schema validation failed for nodes or edges.
- Invalid edge types are skipped (not an error)
- Both source and target nodes must exist before creating an edge
- If an edge references non-existent nodes, it’s silently ignored
Best Practices
Batch Size
- Optimal: 50-500 nodes with 100-1000 edges per request
- Large subgraphs: Split into multiple requests grouped by temporal or thematic clusters
Node and Edge Ordering
- Include all nodes before their edges (nodes are processed first anyway)
- Edges referencing non-existent nodes will be skipped
Provenance Tracking
- Use consistent
source_run_idvalues for each import batch - Tag generated content with
confidence < 1.0 - Set appropriate
source_typefor downstream filtering
Idempotency
- Safe to retry failed requests
- Duplicate nodes/edges are automatically handled
- Use the same
tdf_hashvalues for consistent deduplication
Use Cases
Historical Event ChainsRelated Endpoints
- Ingest TDF Records - Bulk import nodes without explicit edges
- Get Moment - Retrieve a node with its edges
- Graph Stats - View ingestion statistics by source type