Getting Started

Quickstart

Create a project, issue a key, and run your first request against the managed gateway.

Prerequisites

An approved KyroDB pilot account. Access is provisioned through invite-only onboarding; you do not need to self-host anything.

1. Create a Project

After your pilot invitation is approved, sign in to the console, create a project, and choose its region, tier, dimension, and metric. Those fields become the stored project contract used for provisioning.

This quickstart uses 4-dimensional vectors. Create the project with dimension=4 or change the example vector values to match your chosen dimension before sending requests.

2. Wait for Provisioning

Open Settings in the console and wait until the project moves from pending or provisioning to provisioned. Until then, treat the endpoint as not ready.

3. Generate an API Key

In API Keys, generate a new project key. Copy it immediately. The full secret is only shown once.

After the project is provisioned, open Settings and copy the REST API Base URL into KYRODB_API_BASE_URL, the gRPC Endpoint into KYRODB_GRPC_ENDPOINT, and use the key you generated here as KYRODB_API_KEY.

terminal
export KYRODB_API_BASE_URL="https://your-instance.kyrodb.cloud:51051"
export KYRODB_GRPC_ENDPOINT="your-instance.kyrodb.cloud:443"
export KYRODB_API_KEY="kyro_live_..."

4. Send Your First Request

terminal
curl -X POST "$KYRODB_API_BASE_URL/v1/vectors/upsert" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $KYRODB_API_KEY" \
  -d '{
    "namespace": "default",
    "vectors": [
      {
        "id": "doc-1",
        "values": [0.1, 0.2, 0.3, 0.4],
        "metadata": {
          "source": "quickstart"
        }
      }
    ]
  }'

5. Search

terminal
curl -X POST "$KYRODB_API_BASE_URL/v1/vectors/search" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $KYRODB_API_KEY" \
  -d '{
    "namespace": "default",
    "vector": [0.1, 0.2, 0.3, 0.4],
    "top_k": 5
  }'

6. Or Use the Python SDK

The REST gateway uses string vector IDs. The direct Python SDK talks to the gRPC API, where doc_id is numeric.

The Python example below reads KYRODB_GRPC_ENDPOINT, so copy that exact value from Settings before running the script.

terminal
pip install kyrodb
quickstart.py
import os
from kyrodb import KyroDBClient

with KyroDBClient(
    target=os.environ["KYRODB_GRPC_ENDPOINT"],
    api_key=os.environ["KYRODB_API_KEY"],
    timeout_s=10.0,
) as client:
    client.wait_for_ready(timeout_s=5.0)

    client.insert(
        doc_id=1,
        embedding=[0.1, 0.2, 0.3, 0.4],
        metadata={"source": "quickstart"},
        namespace="default",
    )

    results = client.search(
        query_embedding=[0.1, 0.2, 0.3, 0.4],
        k=5,
        namespace="default",
    )

    print(results.total_found)
Truthful State

If the console says the project state is unknown, do not treat displayed fallback endpoints as proof of successful provisioning.

Next Steps

  • Projects explains the project contract and provisioning states.
  • API Keys covers scopes, rotation, and revoke flow.
  • REST API documents the managed gateway routes.
  • Recovery explains current durability and recovery expectations.