HyperX HyperX

Documentation

Quick Start

1. Get your API key

Sign up at hyperxdb.dev to get your API key.

2. Install the SDK

pip install hyperx

Requires Python 3.10+

3. Create your first entity

from hyperx import HyperX

# Initialize client with your API key
db = HyperX(api_key="hx_sk_...")

# Create an entity
entity = db.entities.create(
    name="Machine Learning",
    entity_type="concept",
    attributes={
        "description": "A subset of AI focused on learning from data"
    }
)

# Create more entities
data = db.entities.create(name="Data", entity_type="concept")
compute = db.entities.create(name="Compute", entity_type="resource")

# Create a hyperedge connecting multiple entities
edge = db.hyperedges.create(
    description="ML requires Data and Compute",
    members=[
        {"entity_id": entity.id, "role": "subject"},
        {"entity_id": data.id, "role": "requirement"},
        {"entity_id": compute.id, "role": "requirement"},
    ]
)

Core Concepts

Entities

Entities are the nodes in your knowledge graph. They represent concepts, objects, or any discrete piece of information with a name, type, and optional attributes.

Hyperedges

Unlike traditional graphs where edges connect exactly two nodes, hyperedges can connect any number of entities. This enables modeling complex multi-way relationships like "Team A built Product B using Technology C".

Vector Embeddings

Every entity can have an optional vector embedding for semantic search. Use any embedding model (OpenAI, Cohere, etc.) to enable similarity-based retrieval.

Multi-hop Reasoning

Traverse relationships across multiple hops to discover indirect connections. Find how concepts relate through chains of hyperedges.

API Reference

Base URL

https://api.hyperxdb.dev

Authentication

Include your API key in the Authorization header:

Authorization: Bearer your-api-key
GET /health

Health check endpoint

POST /entities

Create a new entity

GET /entities/:id

Get an entity by ID

POST /hyperedges

Create a new hyperedge

GET /hyperedges/:id

Get a hyperedge by ID

Support

Need help? We're here for you: