Quick Start Guide

Get up and running with Nebula API in minutes.

Prerequisites

You must have a valid API key configured before running any examples below.

1. Install

# Python
pip install nebula-client

# Node.js
npm install @nebula-ai/sdk

# Go
go get github.com/nebula-ai/nebula-client-go

2. Initialize Client

from nebula_client import NebulaClient

# With API key
client = NebulaClient(api_key="your-api-key-here")

# Or set NEBULA_API_KEY environment variable
# client = NebulaClient()
from nebula_client import NebulaClient

client = NebulaClient(api_key="your-api-key-here")

# Create a cluster
cluster = client.create_cluster("my_notes", "Personal notes")

# Store a memory
memory_id = client.store_memory({
    "cluster_id": cluster.id,
    "content": "Machine learning is transforming healthcare",
    "metadata": {"topic": "AI", "importance": "high"}
})

# Search memories
results = client.search(
    query="machine learning healthcare",
    cluster_ids=[cluster.id],
    limit=5
)

for result in results:
    print(f"Score: {result.score:.2f}")
    print(f"Content: {result.content}")

4. Test Connection

# Verify your setup
curl -s -H "Authorization: ApiKey YOUR_API_KEY" \
  https://api.nebulacloud.app/v1/health

Next Steps

Need Help?