Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.veclabs.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Base URL

https://api.veclabs.xyz/api/v1
All requests require an Authorization: Bearer YOUR_API_KEY header.

Collections

Create a collection

POST /collections
{
  "name": "agent-memory",
  "dimensions": 1536,
  "metric": "cosine"
}
Metrics: cosine (default), euclidean, dot Response:
{
  "collection": {
    "id": "uuid",
    "name": "agent-memory",
    "dimensions": 1536,
    "metric": "cosine",
    "vector_count": 0,
    "created_at": "2026-04-30T00:00:00Z"
  }
}

List collections

GET /collections

Delete a collection

DELETE /collections/{name}

Vectors

Upsert

POST /collections/{name}/upsert
{
  "records": [
    {
      "id": "mem_001",
      "values": [0.1, 0.2, ...],
      "metadata": { "text": "User prefers dark mode" }
    }
  ]
}
Response:
{
  "upsertedCount": 1,
  "merkleRoot": "90d483c77c4e...",
  "solanaProgram": "8xjQ2XrdhR4JkGAdTEB7i34DBkbrLRkcgchKjN1Vn5nP",
  "solanaTx": "42sxn4j...",
  "solanaExplorerUrl": "https://explorer.solana.com/tx/42sxn4j...?cluster=devnet"
}
solanaTx and solanaExplorerUrl are null on the Free tier.

Query

POST /collections/{name}/query
{
  "vector": [0.1, 0.2, ...],
  "topK": 10,
  "includeValues": false,
  "filter": {}
}
Response:
{
  "matches": [
    {
      "id": "mem_001",
      "score": 0.97,
      "metadata": { "text": "User prefers dark mode" }
    }
  ]
}

Delete vectors

POST /collections/{name}/delete
{
  "ids": ["mem_001", "mem_002"]
}

Fetch vectors by ID

POST /collections/{name}/fetch
{
  "ids": ["mem_001"]
}

Verify collection integrity

GET /collections/{name}/verify
Fetches the on-chain Merkle root from Solana and computes it locally. Returns a match/mismatch result with a Solana Explorer URL. Response:
{
  "verified": true,
  "onChainRoot": "90d483c...",
  "computedRoot": "90d483c...",
  "match": true,
  "vectorCount": 42,
  "solanaExplorerUrl": "https://explorer.solana.com/address/...?cluster=devnet"
}

Usage

GET /usage
Returns current month write, query, and vector counts against your plan limits.

API Keys

List keys

GET /keys

Create a key

POST /keys
{ "name": "Production" }

Revoke a key

DELETE /keys/{id}

Error codes

CodeMeaning
401Invalid or missing API key
404Collection not found
429Plan limit reached — upgrade at app.veclabs.xyz/pricing
500Internal error — check status.veclabs.xyz