openapi: 3.0.3
info:
title: SQLite Vector MCP REST API
version: 0.1.0
description: |
REST API for text-based insert/search backed by sqlite-vec.
Note: Endpoints are planned and documented here.
servers:
- url: http://localhost:3000
paths:
/api/items:
post:
summary: Add item from text
description: Generates embeddings from text and stores item + vector.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
content:
type: string
document_name:
type: string
required:
- content
- document_name
responses:
"200":
description: Item created
content:
application/json:
schema:
type: object
properties:
id:
type: integer
content:
type: string
document_name:
type: string
"400":
description: Invalid request
get:
summary: List documents
description: Returns a list of documents with pagination.
parameters:
- name: limit
in: query
schema:
type: integer
default: 10
- name: offset
in: query
schema:
type: integer
default: 0
responses:
"200":
description: A list of items
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Item"
/api/search:
post:
summary: Search by text
description: Generates embeddings from text and returns nearest items.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
content:
type: string
limit:
type: integer
default: 10
required:
- content
responses:
"200":
description: Search results
content:
application/json:
schema:
type: object
properties:
results:
type: array
items:
type: object
properties:
id:
type: integer
content:
type: string
document_name:
type: string
distance:
type: number
"400":
description: Invalid request
components:
schemas:
Item:
type: object
properties:
id:
type: integer
content:
type: string
document_name:
type: string
created_at:
type: string
updated_at:
type: string