Datasets
Create, manage, search, and configure vector datasets. All dataset endpoints are available through the public API gateway under the unprefixed /datasets namespace. Paths below are shown relative to the API base URL (https://api.vectoramp.com).
Use the unprefixed /datasets/... paths. The legacy /v1/datasets/... prefix is deprecated (it still routes for back-compat), and /api/v1/... is not routed (404).
All dataset IDs are UUIDs. Use the dataset's UUID in path parameters, not its name.
Dataset Object
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "product-embeddings",
"org_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"dim": 2560,
"metric": "cosine",
"tuning": {
"nlist": 4096,
"nprobe_min": 32,
"nprobe_max": 32
},
"embedding": {
"provider": "vectoramp",
"model": "VectorAmp-Embedding-4B"
},
"index_type": "sable",
"schema": [
{ "name": "price", "type": "f32", "source": "user" },
{ "name": "created_at", "type": "i64", "source": "user" },
{ "name": "popularity", "type": "f64", "source": "inferred", "confidence": 0.997, "samples": 12000 }
],
"schema_version": 3,
"created_at": "2026-04-22T15:29:39Z",
"updated_at": "2026-04-22T15:29:39Z"
}
| Field | Type | Description |
|---|---|---|
id | UUID | Unique dataset identifier |
name | string | Human-readable name |
org_id | UUID | Owning organization |
dim | integer | Vector dimensions |
metric | string | Distance metric, typically cosine |
tuning | object | Index tuning parameters |
embedding | object | Public embedding configuration |
embedding.provider | string | Public embedding provider name |
embedding.model | string | Embedding model name |
index_type | string | null | Dataset index type |
schema | array | Typed metadata schema fields. Each entry has name, type (string | u32 | i32 | i64 | f32 | f64), and source (user for declared fields, inferred for fields VectorAmp promoted from observed data — inferred entries also carry confidence and samples). Omitted when the dataset has no schema. |
schema_version | integer | Monotonic version, incremented on every schema change (including inferred promotions). Omitted when the dataset has no schema. |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
The public API uses normalized field names. For example:
embeddingis nested underembedding.providerandembedding.model- advanced filter configuration uses
filters index_typeis public, notindex_type_default- internal compatibility fields such as
rfandembedding_normalizationare not part of the public contract
List Datasets
GET /datasets
Returns datasets for the authenticated organization.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | Max results to return. Defaults to 50, max 200 | |
offset | integer | Pagination offset. Defaults to 0 |
- cURL
- Response
curl "https://api.vectoramp.com/datasets?limit=50&offset=0" \
-H "X-API-Key: <api_key>"
{
"datasets": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "product-embeddings",
"org_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"dim": 2560,
"metric": "cosine",
"tuning": { "nlist": 4096, "nprobe_min": 32, "nprobe_max": 32 },
"embedding": {
"provider": "vectoramp",
"model": "VectorAmp-Embedding-4B"
},
"index_type": "sable",
"created_at": "2026-04-22T15:29:39Z",
"updated_at": "2026-04-22T15:29:39Z"
}
],
"total": 123,
"limit": 50,
"offset": 0
}
Create Dataset
POST /datasets
Only name is required. When embedding is omitted, VectorAmp uses the managed default model VectorAmp-Embedding-4B (provider vectoramp) and infers dim automatically. metric defaults to cosine. The index type is always SABLE and is not configurable.
Request Body
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | ✅ | — | Dataset name |
dim | integer | inferred | Vector dimensions. Inferred from the embedding model when omitted (VectorAmp-Embedding-4B → 2560, text-embedding-3-small → 1536, text-embedding-3-large → 3072). Required for custom/unknown models. | |
metric | string | cosine | Distance metric | |
index_type | string | sable | Always sable. SDKs force this value and do not expose it. | |
embedding | object | managed | Embedding configuration. Omit to use the managed default. | |
embedding.provider | string | vectoramp | Public embedding provider, for example vectoramp or openai | |
embedding.model | string | VectorAmp-Embedding-4B | Embedding model identifier. OpenAI BYOM supports text-embedding-3-small (1536 dims) and text-embedding-3-large (3072 dims). | |
embedding.secret_ref | string | — | Optional reference to a stored organization provider secret (for BYOM providers). For OpenAI BYOM, create/store the org secret first with PUT /org-secrets/emb%3Aopenai%3Aapi_key and use emb:openai:api_key. | |
hybrid | boolean | false | Enable hybrid (dense + sparse) indexing at creation time | |
metadata | object | {} | Arbitrary dataset metadata | |
schema | array | — | Typed metadata schema: [{"name": "price", "type": "f32"}, ...]. Types: string, u32, i32, i64, f32, f64 (aliases like int, long, timestamp, float, double, number, text are accepted and normalized). metadata_schema and metadata_fields are accepted as body aliases. Omit to let VectorAmp infer the schema dynamically from ingested data. |
- cURL (Minimal)
- cURL (With schema)
- cURL (Hybrid)
- cURL (Explicit)
- Response 201
# Name-only create: managed embedding (VectorAmp-Embedding-4B),
# dim inferred (2560), metric cosine, SABLE index.
curl -X POST https://api.vectoramp.com/datasets \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{ "name": "docs" }'
# Predefine the typed metadata schema so range filters on price /
# created_at evaluate against typed columns from the first vector.
curl -X POST https://api.vectoramp.com/datasets \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"name": "products",
"schema": [
{ "name": "tenant_id", "type": "u32" },
{ "name": "price", "type": "f32" },
{ "name": "created_at", "type": "i64" },
{ "name": "status", "type": "string" }
]
}'
# Enable hybrid (dense + sparse) indexing at creation.
curl -X POST https://api.vectoramp.com/datasets \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"name": "support-kb",
"hybrid": true
}'
curl -X POST https://api.vectoramp.com/datasets \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"name": "product-embeddings",
"dim": 2560,
"metric": "cosine",
"embedding": {
"provider": "vectoramp",
"model": "VectorAmp-Embedding-4B"
}
}'
# OpenAI BYOM: small = 1536 dims, large = 3072 dims.
# Store the org secret first, then reference it from the dataset.
curl -X POST https://api.vectoramp.com/datasets \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"name": "openai-docs",
"dim": 1536,
"metric": "cosine",
"embedding": {
"provider": "openai",
"model": "text-embedding-3-small",
"secret_ref": "emb:openai:api_key"
}
}'
{
"id": "13c21c32-9f51-47d1-82f1-d28315817e3d",
"name": "product-embeddings",
"org_id": "2f3a60e1-2f1a-44c9-8448-5ca630b32d9f",
"dim": 2560,
"metric": "cosine",
"tuning": {
"nlist": 4096,
"nprobe_min": 32,
"nprobe_max": 32
},
"embedding": {
"provider": "vectoramp",
"model": "VectorAmp-Embedding-4B"
},
"index_type": "sable",
"created_at": "2026-04-22T15:29:39Z",
"updated_at": "2026-04-22T15:29:39Z"
}
You only need to send dim when using a custom or unknown embedding model. For the managed model and the two OpenAI models above, VectorAmp infers dim from a built-in table. The request field is dim — not dimension.
Dataset creation returns after the dataset record is accepted. Provisioning the backing vector engine is asynchronous and normally finishes within a few seconds. If a write or search arrives before routing is ready, clients should treat 503/dataset_not_ready or vecstack_router_failed as retryable with short backoff, then retry the same request.
Uploading Files into a Dataset
The recommended document ingestion flow is:
- Create the dataset.
- Create a source with
source_type: "file_upload"viaPOST /ingestion/sources. - Initialize the upload with
POST /ingestion/sources/{sourceId}/upload/init, passing the list of files. The response returns ajob_idand a presignedupload_urlper file. PUTeach file's bytes directly to its presignedupload_url.- Complete the upload with
POST /ingestion/sources/{sourceId}/upload/complete, passing thejob_idand the uploadedfile_ids. - The ingestion job processes the uploaded files into the dataset.
See Sources for the full presigned upload request/response shapes, and Jobs for job tracking.
Get Dataset
GET /datasets/:datasetId
| Parameter | Type | In | Description |
|---|---|---|---|
datasetId | UUID | path | Dataset identifier |
- cURL
- Response
curl https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000 \
-H "X-API-Key: <api_key>"
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "product-embeddings",
"dim": 2560,
"metric": "cosine",
"embedding": {
"provider": "vectoramp",
"model": "VectorAmp-Embedding-4B"
},
"index_type": "sable"
}
Delete Dataset
DELETE /datasets/:datasetId
Permanently deletes a dataset and all its vectors.
| Parameter | Type | In | Description |
|---|---|---|---|
datasetId | UUID | path | Dataset identifier |
This action is irreversible. All vectors and index data will be permanently deleted.
curl -X DELETE https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000 \
-H "X-API-Key: <api_key>"
List Dataset Documents
GET /datasets/:datasetId/documents
Returns dataset-level source document metadata for files that were ingested through sources or file uploads. This is a logical document catalog: it does not expose internal storage buckets, object keys, payload_ref, or chunk storage details.
Use this endpoint when you need to enumerate original documents and decide which originals can be downloaded. Use search when you need chunk-level retrieval.
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
datasetId | UUID | ✅ path | Dataset identifier |
limit | integer | Max documents to return. Defaults to 50, max 200 | |
cursor | string | Opaque cursor from the previous response's next_cursor | |
status | string | Optional status filter, for example processing, ready, or failed |
Document pagination is cursor-based. Do not use offsets or totals for this endpoint. Request the first page without cursor, then pass next_cursor until it is null or omitted. The cursor is the previous page's last document id and should be treated as an opaque string by clients.
- cURL
- Response
curl "https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/documents?limit=50&status=ready" \
-H "X-API-Key: <api_key>"
{
"documents": [
{
"id": "b9e9d6c4-9f91-4f93-9b71-4c1a4e8af3c1",
"dataset_id": "550e8400-e29b-41d4-a716-446655440000",
"source_type": "file_upload",
"source_uri": null,
"file_path": "docs/overview.md",
"file_name": "overview.md",
"content_type": "text/markdown",
"status": "ready",
"file_size_bytes": 12345,
"chunks_count": 12,
"embeddings_count": 12,
"last_seen_at": "2026-04-27T03:12:45Z",
"created_at": "2026-04-27T03:12:45Z",
"updated_at": "2026-04-27T03:13:08Z",
"download_available": true
}
],
"next_cursor": "7e0b7c5c-16d3-4c12-a87e-2c0ee5d9f5d4"
}
Response notes
download_available: truemeans the retained original can be downloaded with Download Dataset Document.download_available: falsemeans the document may still have indexed chunks/search results, but the original bytes are not available from VectorAmp.statustracks catalog/indexing state.readydocuments are indexed successfully;processingdocuments are still being processed;faileddocuments are cataloged with an ingestion failure.- Internal storage coordinates are intentionally never returned. Clients should use only the public document id and download endpoint.
Download Dataset Document
GET /datasets/:datasetId/documents/:documentId/download
Downloads the retained original document bytes for a dataset document.
| Parameter | Type | In | Description |
|---|---|---|---|
datasetId | UUID | path | Dataset identifier |
documentId | UUID/string | path | Document identifier returned by List Dataset Documents |
- cURL
- Unavailable
curl -L "https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/documents/b9e9d6c4-9f91-4f93-9b71-4c1a4e8af3c1/download" \
-H "X-API-Key: <api_key>" \
-o overview.md
{
"error": "document_unavailable",
"message": "The original document is not available for download"
}
Download behavior
- The endpoint may stream bytes directly or return a redirect to a short-lived download URL. Use an HTTP client that follows redirects (
curl -L,fetchdefault redirect handling,requestsdefault redirect handling, etc.). - If
download_availableis false, if the raw object was not retained, or if the object can no longer be fetched, the API returnsdocument_unavailable. - The redirect URL, if present, is short-lived and should not be stored as the document identity. Store the dataset id + document id instead.
- Storage bucket names, object keys, and internal payload references are not part of the public contract.
Dataset Statistics
GET /datasets/:datasetId/stats
Returns statistics about the dataset including vector count, storage size, and index status.
| Parameter | Type | In | Description |
|---|---|---|---|
datasetId | UUID | path | Dataset identifier |
curl https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/stats \
-H "X-API-Key: <api_key>"
Index Management
Get Index Status
GET /datasets/:datasetId/index
Returns the current index type and build status.
Set Index Type
POST /datasets/:datasetId/index
Sets the index type for the dataset.
Rebuild Index
POST /datasets/:datasetId/index/rebuild
Triggers a full index rebuild. This is an asynchronous operation.
Index rebuilds run in the background. Use Get Index Status to monitor progress.
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/index/rebuild \
-H "X-API-Key: <api_key>"
Metadata Schema
A dataset's typed metadata schema declares which metadata fields are numeric (and how wide) so range filters evaluate against typed columns with per-field index statistics. Declare it at creation time, update it here, or leave it out entirely and let VectorAmp infer it from ingested data — user-declared fields always take precedence over inferred ones.
Supported field types: string, u32, i32, i64, f32, f64.
Requests may use aliases (text/str → string, uint32 → u32,
int/int32 → i32, int64/long/timestamp → i64,
float/float32 → f32, double/float64/number → f64); responses
always use canonical names. Field names: 1–128 chars from letters, digits,
_, -, .; unique; at most 128 fields per dataset. See the
Metadata Schema concept page for
type ranges and guidance.
The current schema (with source provenance and schema_version) is
returned by Get Dataset — see the
Dataset Object.
Update Metadata Schema
PATCH /datasets/:datasetId/schema
Updates the dataset's typed metadata schema. The change is persisted first,
then the index's typed metadata structures are rebuilt asynchronously from
existing metadata — the dataset stays fully searchable throughout, and the
vector index itself (centroids, quantization, graphs) is not retrained.
schema_version increments on every successful update.
This endpoint requires an admin or owner role in the dataset's
organization. API keys must carry the admin scope.
Request Body
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
schema | array | ✅ | — | Schema fields: [{"name": "...", "type": "..."}, ...]. metadata_schema / metadata_fields are accepted as aliases. |
mode | string | merge | merge: add or update the given fields, keep all others (including inferred ones). replace: the given fields become the complete schema — anything not listed is removed. |
A user declaration for an existing field name overrides it, including fields
that were previously inferred. merge never removes fields; to drop a field,
send the full desired schema with mode: "replace".
- cURL (Merge)
- cURL (Replace)
- Response 200
# Add/retype two fields; everything else in the schema is kept.
curl -X PATCH https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/schema \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"schema": [
{ "name": "rating", "type": "f32" },
{ "name": "created_at", "type": "timestamp" }
]
}'
# The listed fields become the entire schema; unlisted fields are removed.
curl -X PATCH https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/schema \
-H "X-API-Key: vsk_<64hex>" \
-H "Content-Type: application/json" \
-d '{
"mode": "replace",
"schema": [
{ "name": "price", "type": "f32" },
{ "name": "status", "type": "string" }
]
}'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "product-embeddings",
"org_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"dim": 2560,
"metric": "cosine",
"index_type": "sable",
"schema": [
{ "name": "price", "type": "f32", "source": "user" },
{ "name": "rating", "type": "f32", "source": "user" },
{ "name": "created_at", "type": "i64", "source": "user" },
{ "name": "popularity", "type": "f64", "source": "inferred", "confidence": 0.997, "samples": 12000 }
],
"schema_version": 4,
"created_at": "2026-04-22T15:29:39Z",
"updated_at": "2026-07-19T09:12:03Z"
}
Note in the response how the timestamp alias was normalized to i64, and
the previously inferred popularity field survived the merge.
Errors
| Status | Code | When |
|---|---|---|
400 | — | Empty/duplicate/invalid field name, unsupported type, more than 128 fields, invalid mode, or empty schema with mode: "merge" |
403 | insufficient_role | Caller lacks an admin-class role in the org |
404 | dataset_not_found | Dataset missing — or owned by a different organization |
The typed-structure rebuild runs in the background from metadata VectorAmp
already stores; searches and inserts continue uninterrupted, and results are
identical during the rebuild. Use schema_version in
Get Dataset to confirm the new version is active.
Hybrid Search Settings
Get Hybrid Settings
GET /datasets/:datasetId/hybrid
Returns hybrid search configuration for the dataset.
Toggle Hybrid Search
PUT /datasets/:datasetId/hybrid/enabled
| Name | Type | Required | Description |
|---|---|---|---|
enabled | boolean | ✅ | Enable or disable hybrid search |
curl -X PUT https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/hybrid/enabled \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'
Set Hybrid Alpha
PUT /datasets/:datasetId/hybrid/alpha
Controls the balance between vector and keyword search. 0.0 = pure keyword, 1.0 = pure vector.
| Name | Type | Required | Description |
|---|---|---|---|
alpha | float | ✅ | Hybrid search weight (0.0–1.0) |
curl -X PUT https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/hybrid/alpha \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{"alpha": 0.7}'
Vector Search
POST /datasets/:datasetId/search
Perform similarity search against the dataset. Provide either a raw vector (query) or a text string (query_text) that will be automatically embedded using the dataset's configured embedding model.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
query | float[] | Raw vector for search (mutually exclusive with query_text) | |
query_text | string | Text query — auto-embedded using the dataset's embedding model | |
embedding_model | string | Override the dataset's default embedding model for text queries | |
embedding_provider | string | Override the dataset's default embedding provider for text queries | |
top_k | integer | Number of results to return. Defaults to 10 | |
filters | object | Simple string-equality metadata filters ({"key": "value"}) | |
advanced_filters | array | Advanced numeric/categorical filters (see below) | |
nprobe_override | integer | Override the number of clusters to probe | |
rerank_depth_override | integer | Override SABLE candidate-depth rerank for the vector index (0 = dataset default). This is not the optional model reranker. | |
rerank | boolean | object | Enable the optional model reranker after initial retrieval. Omit it for default fast search; use true or { "enabled": true } for best relevance. | |
rerank.enabled | boolean | Enable model rerank for this request. Default: false when rerank is omitted. | |
rerank.provider | string | Optional model-rerank provider override. Omit to use the server default. | |
rerank.model | string | Optional model-rerank model override. Omit to use the server default. | |
rerank.top_n | integer | Optional number of reranked results to return. Omit to use the server default, normally the request top_k. | |
rerank.max_documents | integer | Optional maximum initial candidates to send to the model reranker. Omit to use the server default. | |
rerank.fail_open | boolean | Optional fail-open behavior. Omit to use the server default. | |
hybrid | boolean | Enable hybrid (vector + keyword) search | |
sparse_query | string | Keyword query for hybrid search | |
alpha | float | Hybrid weight: 0.0 = pure keyword, 1.0 = pure vector | |
include_embeddings | boolean | Return the vector embeddings in results | |
include_documents | boolean | Return document content in doc_value. Defaults to false | |
include_metadata | boolean | Return result metadata. Defaults to true; when false, metadata is omitted |
Advanced Filters
The advanced_filters array enables numeric range queries, categorical filtering, and multi-value matching on metadata fields. Each filter object has the following structure:
| Name | Type | Required | Description |
|---|---|---|---|
field | string | ✅ | Metadata field name to filter on |
op | string | ✅ | Comparison operator: eq, gt, gte, lt, lte, in |
value | number | string | Single value for comparison (eq, gt, gte, lt, lte) | |
values | array | Multiple values for in operator (numbers or strings) |
Supported operators:
| Operator | Description | Example |
|---|---|---|
eq | Equal to | {"field": "status", "op": "eq", "value": "active"} |
gt | Greater than | {"field": "price", "op": "gt", "value": 10.0} |
gte | Greater than or equal | {"field": "rating", "op": "gte", "value": 4} |
lt | Less than | {"field": "price", "op": "lt", "value": 100.0} |
lte | Less than or equal | {"field": "count", "op": "lte", "value": 50} |
in | Value in set | {"field": "category", "op": "in", "values": ["electronics", "books"]} |
Combine filters and advanced_filters in the same request. Simple filters handle exact string matches, while advanced_filters handle numeric ranges and multi-value lookups.
Range operators work on any numeric-looking field, but fields declared in the dataset's metadata schema evaluate against typed columns with per-field index statistics — more precise pruning and true numeric comparison. Declare a schema (or let VectorAmp infer one) for fields you routinely range-filter, such as prices and timestamps.
- Vector Search
- Text Query
- Advanced Filters
- Hybrid Search
- Rerank
- Response
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/search \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"query": [0.1, 0.2, 0.3, "..."],
"top_k": 5,
"include_documents": true,
"include_metadata": true
}'
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/search \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"query_text": "machine learning best practices",
"top_k": 10,
"filters": {"category": "engineering"},
"include_documents": false
}'
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/search \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"query_text": "wireless headphones",
"top_k": 10,
"filters": {"category": "electronics"},
"advanced_filters": [
{"field": "price", "op": "gt", "value": 10.0},
{"field": "price", "op": "lt", "value": 100.0},
{"field": "rating", "op": "gte", "value": 4}
]
}'
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/search \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"query_text": "noise cancelling headphones",
"top_k": 10,
"hybrid": true,
"sparse_query": "noise cancelling wireless headphones",
"alpha": 0.7
}'
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/search \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"query_text": "noise cancelling headphones",
"top_k": 10,
"rerank": {"enabled": true},
"include_documents": true
}'
The enabled-only form is the recommended API contract. VectorAmp fills in server defaults for provider, model, top_n, max_documents, and fail_open:
{
"rerank": {
"enabled": true
}
}
You can send rerank: true as shorthand, or include provider, model, top_n, max_documents, and fail_open only when you need to override the server defaults.
{
"results": [
{
"id": 12345678901234,
"score": 0.95,
"metadata": {
"title": "Premium Wireless Headphones",
"category": "electronics",
"price": "79.99",
"rating": "4.5"
},
"embedding": null,
"doc_kind": "inline",
"doc_value": "Premium wireless headphones with active noise cancellation..."
}
],
"dataset_id": "550e8400-e29b-41d4-a716-446655440000",
"query_time_ms": 3.2,
"rerank": {
"enabled": true,
"applied": true,
"candidates_reranked": 10,
"top_n": 10,
"max_documents": 50
}
}
Model rerank runs after the initial vector or hybrid retrieval step and reorders the retrieved candidates for relevance. It is separate from rerank_depth_override, which only changes SABLE's vector-index candidate-depth rerank behavior. Model rerank is optional per request:
- Fast search should omit
rerankfor the lowest-latency path. - Best search should send
rerank: {"enabled": true}. provider,model,top_n,max_documents, andfail_openare optional. If omitted, VectorAmp uses server defaults.- Rerank is fail-open: if rerank fails, times out, is throttled, hits a quota/billing limit, or has a provider/IAM issue, VectorAmp returns the original search results instead of failing the search request. Response metadata indicates rerank was not applied when available.
id— Internal vector ID (integer, derived via FNV-1a hash if string IDs are used)score— Distance from the query for the dataset metric. For cosine datasets, lower is better: identical vectors return0, orthogonal vectors return about1, and results are ordered ascending. Model rerank, when enabled, may reorder results for relevance after initial retrieval.metadata— Key-value metadata stored with the vector. Omitted wheninclude_metadata: false.metadata.textandmetadata.doc_value— Not returned wheninclude_documents: false.metadata.document_storage_key,metadata.document_storage_bucket, andmetadata.payload_ref— Never returned; these are internal implementation details.metadata.additional.caption— Not returned when it duplicates the chunk/document text.embedding— The vector values (only ifinclude_embeddings: true).doc_kind— Document type:"inline"(text stored directly) or"url"(reference).nullunlessinclude_documents: true.doc_value— Document content or URL (only ifinclude_documents: true).query_time_ms— Server-side query execution time in milliseconds.rerank— Model-rerank status metadata when model rerank was requested.
Insert Vectors
POST /datasets/:datasetId/insert
Insert one or more vectors into the dataset. The vector array is sent under the vectors key — not /vectors as a path.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
vectors | array | ✅ | Array of vector objects |
Vector Object:
| Name | Type | Required | Description |
|---|---|---|---|
id | string | integer | ✅ | Unique vector identifier. Accepts a string or an integer; integer ids are preserved as JSON numbers and not coerced to strings. |
values | float[] | ✅ | Vector values (must match dataset dim) |
metadata | object | Arbitrary scalar key-value metadata. String, number, boolean, and null values are accepted; numbers/booleans are stored as scalar metadata values and can be used with advanced_filters where supported. Nested objects/arrays are rejected. |
The id field accepts both strings and integers. Integer ids are serialized as JSON numbers and preserved verbatim. Send the value as a JSON number ("id": 1024) — not a quoted string — to keep it numeric.
Vector metadata accepts scalar JSON values. For example, {"tenant_id": 999, "active": true, "source": "crm"} is valid. Avoid nested objects or arrays in vector metadata; flatten them into scalar fields before insert.
- cURL (String ids)
- cURL (Numeric ids)
- Response
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/insert \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"vectors": [
{
"id": "doc-001",
"values": [0.1, 0.2, 0.3],
"metadata": {"title": "Introduction", "source": "manual"}
},
{
"id": "doc-002",
"values": [0.4, 0.5, 0.6],
"metadata": {"title": "Chapter 1", "source": "manual"}
}
]
}'
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/insert \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"vectors": [
{
"id": 1024,
"values": [0.1, 0.2, 0.3],
"metadata": {"title": "Introduction"}
}
]
}'
{
"inserted": 2
}
Delete Vectors
DELETE /datasets/:datasetId/vectors
Delete one or more vectors from a dataset by vector id. This removes the vector from future search results; it does not delete source documents or ingestion job records.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
ids | array | ✅ | Vector ids to delete. String ids and integer ids use the same id format accepted by insert. |
write_concern | string | Optional durability target: default, one, quorum, or all. |
Vector deletion is immediate for the addressed ids. If you need the vectors again, re-insert or re-ingest them.
- cURL
- Response
curl -X DELETE https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/vectors \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"ids": ["doc-001", 1024],
"write_concern": "quorum"
}'
{
"deleted": 2,
"dataset_id": "550e8400-e29b-41d4-a716-446655440000"
}
Embed Text
POST /datasets/:datasetId/embed
Generate embeddings using the dataset's configured embedding model.
Requires embedding_provider and embedding_model to be configured on the dataset.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
text | string | Single text to embed | |
texts | string[] | Multiple texts to embed (batch) |
- cURL
- Response
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/embed \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{"texts": ["Hello world", "Machine learning"]}'
{
"embeddings": [
[0.1, 0.2, 0.3, ...],
[0.4, 0.5, 0.6, ...]
]
}
Promotion Policy
Get Promotion Policy
GET /datasets/:datasetId/promotion-policy
Returns the current promotion policy for the dataset.
Set Promotion Policy
PUT /datasets/:datasetId/promotion-policy
Updates the promotion policy configuration.
Default Settings
Set Default Index Type
POST /datasets/:datasetId/defaults/index-type
Sets the default index type for new partitions in this dataset.
Set Default Tuning
POST /datasets/:datasetId/defaults/tuning
Sets the default tuning parameters for new partitions.
SLA Settings
Get SLA Settings
GET /datasets/:datasetId/sla
Returns the SLA configuration for the dataset.
Set SLA Settings
PUT /datasets/:datasetId/sla
Configure search latency SLA targets. VectorAmp will auto-tune index parameters to meet the target.
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
target_p99_us | integer | ✅ | Target p99 latency in microseconds |
min_nprobe | integer | ✅ | Minimum nprobe value |
max_nprobe_fraction | integer | ✅ | Maximum nprobe as fraction of nlist |
min_beam_width | integer | ✅ | Minimum beam width for HNSW |
max_beam_width | integer | ✅ | Maximum beam width for HNSW |
- cURL
- Response
curl -X PUT https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/sla \
-H "X-API-Key: <api_key>" \
-H "Content-Type: application/json" \
-d '{
"target_p99_us": 50000,
"min_nprobe": 1,
"max_nprobe_fraction": 10,
"min_beam_width": 4,
"max_beam_width": 64
}'
{
"dataset_id": "550e8400-e29b-41d4-a716-446655440000",
"target_p99_us": 50000,
"min_nprobe": 1,
"max_nprobe_fraction": 10,
"min_beam_width": 4,
"max_beam_width": 64
}
Get Vector Payload
GET /datasets/:datasetId/payload/:vectorId
Retrieve the stored payload (metadata) for a specific vector.
| Parameter | Type | In | Description |
|---|---|---|---|
datasetId | UUID | path | Dataset identifier |
vectorId | string | path | Vector identifier |
curl https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/payload/doc-001 \
-H "X-API-Key: <api_key>"
Ensure Engine
POST /datasets/:datasetId/ensure-engine
Force the dataset engine to be provisioned and ready. Useful after creating a dataset or recovering from errors.
curl -X POST https://api.vectoramp.com/datasets/550e8400-e29b-41d4-a716-446655440000/ensure-engine \
-H "X-API-Key: <api_key>"