POST /v2/gen-ai/knowledge_bases

To create a knowledge base, send a POST request to /v2/gen-ai/knowledge_bases.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
vpc_uuid String No

The VPC to deploy the knowledge base database in

region String No

The datacenter region to deploy the knowledge base in.

project_id String No

Identifier of the DigitalOcean project this knowledge base will belong to.

name String No

Name of the knowledge base.

embedding_model_uuid String No

Identifier for the embedding model.

tags[] Array No

Tags to organize your knowledge base.

datasources[] Array No

The data sources to use for this knowledge base. See Organize Data Sources for more information on data sources best practices.

datasources[].bucket_name String No

Deprecated, moved to data_source_details

datasources[].bucket_region String No

Deprecated, moved to data_source_details

datasources[].spaces_data_source Object No

Spaces Bucket Data Source

datasources[].spaces_data_source.region String No

Region of bucket

datasources[].spaces_data_source.bucket_name String No

Spaces bucket name

datasources[].spaces_data_source.item_path String No
datasources[].web_crawler_data_source Object No

WebCrawlerDataSource

datasources[].web_crawler_data_source.embed_media Boolean No

Whether to ingest and index media (images, etc.) on web pages.

datasources[].web_crawler_data_source.crawling_option String No

Options for specifying how URLs found on pages should be handled.

  • UNKNOWN: Default unknown value
  • SCOPED: Only include the base URL.
  • PATH: Crawl the base URL and linked pages within the URL path.
  • DOMAIN: Crawl the base URL and linked pages within the same domain.
  • SUBDOMAINS: Crawl the base URL and linked pages for any subdomain.

Possible values:

  • "SCOPED"
  • "PATH"
  • "UNKNOWN"
  • "DOMAIN"
  • "SUBDOMAINS"

Default value: "UNKNOWN"

datasources[].web_crawler_data_source.base_url String No

The base url to crawl.

datasources[].item_path String No
datasources[].file_upload_data_source Object No

File to upload as data source for knowledge base.

datasources[].file_upload_data_source.size_in_bytes String No

The size of the file in bytes

datasources[].file_upload_data_source.stored_object_key String No

The object key the file was stored as

datasources[].file_upload_data_source.original_file_name String No

The original file name

database_id String No

Identifier of the DigitalOcean OpenSearch database this knowledge base will use, optional. If not provided, we create a new database for the knowledge base in the same region as the knowledge base.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.