> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quick Start

> Get started with Nebula API in minutes

<Warning>You'll need a Nebula API key before starting. Get one at [zeroset.com](https://zeroset.com).</Warning>

<Tip>Using Claude Code, Cursor, or Codex? Run `npx skills add zeroset-inc/skills` to integrate Nebula automatically.</Tip>

## Prerequisites

* Python 3.10+ or Node.js 18+
* A Nebula API key from the [dashboard](https://zeroset.com)

## 1. Install

```bash theme={null}
# Python
pip install nebula-sdk

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

## 2. Initialize Client

<CodeGroup>
  ```python Python theme={null}
  from nebula import Nebula

  # Uses NEBULA_API_KEY environment variable
  nebula = Nebula()

  ```

  ```javascript JavaScript theme={null}
  import Nebula from '@nebula-ai/sdk';

  const client = new Nebula({
    apiKey: process.env.NEBULA_API_KEY,
  });
  ```

  ```bash cURL theme={null}
  # Verify your API key by listing collections
  curl -X GET "https://api.zeroset.com/v1/collections?limit=5" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</CodeGroup>

## 3. Store & Search

<CodeGroup>
  ```python Python theme={null}
  from nebula import Nebula

  nebula = Nebula()

  # Create a collection
  collection = nebula.collections.create(
      name="my_notes",
      description="Personal notes",
  ).results

  # Store a memory
  created = nebula.memories.create(
      collection_id=collection.id,
      raw_text="Machine learning is transforming healthcare",
      metadata={"topic": "AI", "importance": "high"},
  ).results
  memory_id = created.id

  # Search memories
  results = nebula.memories.search(
      query="machine learning healthcare",
      collection_ids=[collection.id],
      include_sources=True,
  ).results

  # Results contain semantic, procedural, episodic, and sources
  for fact in results.semantic or []:
      print(f"[{fact['category']}] {fact['description']}")
  for source in results.sources or []:
      print(source['text'])
  ```

  ```javascript JavaScript theme={null}
  import Nebula from '@nebula-ai/sdk';

  const client = new Nebula({
    apiKey: process.env.NEBULA_API_KEY,
  });

  async function storeAndSearch() {
    // Create a collection
    const { results: collection } = await client.collections.create({
      name: 'my_notes',
      description: 'Personal notes',
    });

    // Store a memory
    const { results: created } = await client.memories.create({
      collection_id: collection.id,
      raw_text: 'Machine learning is transforming healthcare',
      metadata: { topic: 'AI', importance: 'high' },
    });
    const memoryId = created.id;

    // Search memories
    const { results } = await client.memories.search({
      query: 'machine learning healthcare',
      collection_ids: [collection.id],
      include_sources: true,
    });

    // Results contain semantic, procedural, episodic, and sources
    results.semantic?.forEach(fact =>
      console.log(`[${fact.category}] ${fact.description}`)
    );
    results.sources?.forEach(source => console.log(source.text));
  }

  storeAndSearch();
  ```

  ```bash cURL theme={null}
  # 1) Create a collection
  curl -X POST "https://api.zeroset.com/v1/collections" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{"name": "my_notes", "description": "Personal notes"}'

  # 2) Store a memory (use collection ID from step 1)
  curl -X POST "https://api.zeroset.com/v1/memories" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{
      "collection_id": "COLLECTION_ID",
      "kind": "document",
      "raw_text": "Machine learning is transforming healthcare",
      "metadata": {"topic": "AI", "importance": "high"}
    }'

  # 3) Search memories
  curl -X POST "https://api.zeroset.com/v1/memories/search" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -d '{
      "query": "machine learning healthcare",
      "collection_ids": ["COLLECTION_ID"],
      "include_sources": true
    }'
  ```
</CodeGroup>

## What You'll Get Back

When you store a memory, Nebula returns the memory ID:

```python theme={null}
memory_id = "eng_abc123def456"
```

When you search, Nebula returns a `MemoryResponse` with structured memory:

```json theme={null}
{
  "semantic": [
    {
      "category": "fact",
      "description": "Machine Learning is transforming healthcare",
      "activation_score": 0.92
    }
  ],
  "procedural": [],
  "episodic": [],
  "sources": [
    {
      "text": "Machine learning is transforming healthcare",
      "activation_score": 0.91
    }
  ]
}
```

* **Semantics**: Subject-predicate-value assertions (facts, inferences, tasks)
* **Procedures**: User preferences and behavioral patterns
* **Episodes**: Temporally clustered events
* **Sources**: The original source text that grounds each assertion

<Tip>See [Core Concepts](/guides/concepts) for a deeper explanation of the memory response.</Tip>

## Next Steps

* [Core Concepts](/guides/concepts) - Understand how Nebula works
* [Memory Operations Guide](/guides/memory-operations) - Detailed examples and advanced usage
* [Collections Guide](/guides/collections) - Organize your memories effectively
* [Search Guide](/guides/search) - Semantic search and filtering
* **Support**: Join our [Slack community](https://zeroset.com/slack) or email [support@zeroset.com](mailto:support@zeroset.com)
