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
objectRequired
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
object
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": "string",
6 "name": "string",
7 "indexing_config": {
8 "vectorizer": {
9 "model_name": "text-embedding-3-small",
10 "config": {}
11 }
12 }
13}'
200Successful
1{
2 "id": "string",
3 "created": "2023-01-01T00:00:00Z",
4 "label": "string",
5 "name": "string",
6 "indexing_config": {
7 "vectorizer": {
8 "model_name": "text-embedding-3-small",
9 "config": {
10 "add_openai_api_key": true
11 }
12 },
13 "chunking": {
14 "chunker_name": "reducto-chunker",
15 "chunker_config": {
16 "character_limit": 0
17 }
18 }
19 },
20 "status": "ACTIVE",
21 "environment": "DEVELOPMENT"
22}