Document Indexes

Create

Beta
POST
Creates a new document index.

Request

This endpoint expects an object.
label
stringRequired
A human-readable label for the document index
name
stringRequired
A name that uniquely identifies this index within its workspace
indexing_config
map from strings to anyRequired
Configuration representing how documents should be indexed
status
enumOptional

The current status of the document index

  • ACTIVE - Active
  • ARCHIVED - Archived
Allowed values: ACTIVEARCHIVED
environment
enumOptional

The environment this document index is used in

  • DEVELOPMENT - Development
  • STAGING - Staging
  • PRODUCTION - Production
Allowed values: DEVELOPMENTSTAGINGPRODUCTION
copy_documents_from_index_id
stringOptional
Optionally specify the id of a document index from which you'd like to copy and re-index its documents into this newly created index

Response

This endpoint returns an object
id
string
created
datetime
label
string
A human-readable label for the document index
name
string
A name that uniquely identifies this index within its workspace
indexing_config
map from strings to any
Configuration representing how documents should be indexed
status
enumOptional

The current status of the document index

  • ACTIVE - Active
  • ARCHIVED - Archived
Allowed values: ACTIVEARCHIVED
environment
enumOptional

The environment this document index is used in

  • DEVELOPMENT - Development
  • STAGING - Staging
  • PRODUCTION - Production
Allowed values: DEVELOPMENTSTAGINGPRODUCTION
POST
1curl -X POST https://api.vellum.ai/v1/document-indexes \
2 -H "X_API_KEY: <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "label": "My Document Index",
6 "name": "my-document-index",
7 "indexing_config": {
8 "chunking": {
9 "chunker_name": "sentence-chunker",
10 "chunker_config": {
11 "character_limit": 1000,
12 "min_overlap_ratio": 0.5
13 }
14 },
15 "vectorizer": {
16 "model_name": "hkunlp/instructor-xl",
17 "config": {
18 "instruction_domain": "",
19 "instruction_document_text_type": "plain_text",
20 "instruction_query_text_type": "plain_text"
21 }
22 }
23 }
24}'
200
Successful
1{
2 "id": "id",
3 "created": "2024-01-15T09:30:00Z",
4 "label": "label",
5 "name": "name",
6 "indexing_config": {
7 "indexing_config": {
8 "key": "value"
9 }
10 },
11 "status": "ACTIVE",
12 "environment": "DEVELOPMENT"
13}