Build

REST API

HTTP gateway endpoints, request formats, auth headers, and response semantics.

Overview

The managed cloud exposes a REST gateway for vector operations. Every request is authenticated with a project API key and routed to your project's runtime.

Base URL

Your project's REST API base URL is shown in the console under Settings after provisioning completes. It looks like:

base url
https://your-instance.kyrodb.cloud:51051

Authentication

Send your API key in either header format:

  • x-api-key: <key>
  • authorization: Bearer <key>

Endpoints

MethodEndpointDescription
POST/v1/vectors/upsertInsert or update vectors
POST/v1/vectors/searchk-NN similarity search
POST/v1/vectors/queryFetch vector by ID
POST/v1/vectors/updateUpdate metadata by ID
DELETE/v1/vectors/deleteDelete vector by ID

Upsert

terminal
curl -X POST "$KYRODB_API_BASE_URL/v1/vectors/upsert" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $KYRODB_API_KEY" \
  -H "x-idempotency-key: upsert-batch-001" \
  -d '{
    "namespace": "products",
    "vectors": [
      {
        "id": "sku-1",
        "values": [0.11, 0.22, 0.33, 0.44],
        "metadata": {
          "name": "Widget A",
          "category": "hardware"
        }
      },
      {
        "id": "sku-2",
        "values": [0.55, 0.66, 0.77, 0.88],
        "metadata": {
          "name": "Widget B",
          "category": "software"
        }
      }
    ]
  }'

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": "products",
    "vector": [0.11, 0.22, 0.33, 0.44],
    "top_k": 10
  }'

Query by ID

terminal
curl -X POST "$KYRODB_API_BASE_URL/v1/vectors/query" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $KYRODB_API_KEY" \
  -d '{
    "namespace": "products",
    "id": "sku-1"
  }'

Update Metadata

terminal
curl -X POST "$KYRODB_API_BASE_URL/v1/vectors/update" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $KYRODB_API_KEY" \
  -d '{
    "namespace": "products",
    "id": "sku-1",
    "metadata": {
      "category": "premium-hardware",
      "updated_at": "2025-01-15"
    }
  }'

Delete

terminal
curl -X DELETE "$KYRODB_API_BASE_URL/v1/vectors/delete" \
  -H "Content-Type: application/json" \
  -H "x-api-key: $KYRODB_API_KEY" \
  -d '{
    "namespace": "products",
    "id": "sku-1"
  }'

Request Rules

  • All request bodies are JSON.
  • namespace is optional and defaults to default.
  • Vector IDs must be strings.
  • Embeddings must be finite numeric arrays matching your project dimension.
  • Batch upsert size is capped server-side.
  • Mutating requests can include x-idempotency-key for replay-safe retries.

Responses

StatusMeaningRetry?
200Success
400Invalid request body or vector payloadNo
401Missing or invalid API keyNo
403API key scope does not allow this operationNo
404Route not foundNo
429Rate limit exceededYes, with backoff
500Internal server errorMaybe
503Service temporarily unavailableYes
Python SDK

For production applications, we recommend the Python SDK which provides typed responses, automatic retries, circuit breakers, and streaming batch operations over gRPC.