## Create `knowledge_bases.create(KnowledgeBaseCreateParams**kwargs) -> KnowledgeBaseCreateResponse` **post** `/v2/gen-ai/knowledge_bases` To create a knowledge base, send a POST request to `/v2/gen-ai/knowledge_bases`. ### Parameters - **database\_id:** `str` 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. - **datasources:** `Iterable[Datasource]` The data sources to use for this knowledge base. See [Organize Data Sources](https://docs.digitalocean.com/products/genai-platform/concepts/best-practices/#spaces-buckets) for more information on data sources best practices. - **aws\_data\_source:** `AwsDataSourceParam` AWS S3 Data Source - **bucket\_name:** `str` Deprecated, moved to data_source_details - **bucket\_region:** `str` Deprecated, moved to data_source_details - **file\_upload\_data\_source:** `APIFileUploadDataSourceParam` File to upload as data source for knowledge base. - **item\_path:** `str` - **spaces\_data\_source:** `APISpacesDataSourceParam` Spaces Bucket Data Source - **web\_crawler\_data\_source:** `APIWebCrawlerDataSourceParam` WebCrawlerDataSource - **embedding\_model\_uuid:** `str` Identifier for the [embedding model](https://docs.digitalocean.com/products/genai-platform/details/models/#embedding-models). - **name:** `str` Name of the knowledge base. - **project\_id:** `str` Identifier of the DigitalOcean project this knowledge base will belong to. - **region:** `str` The datacenter region to deploy the knowledge base in. - **tags:** `List[str]` Tags to organize your knowledge base. - **vpc\_uuid:** `str` The VPC to deploy the knowledge base database in ### Returns - `class KnowledgeBaseCreateResponse` Information about a newly created knowledge base - **knowledge\_base:** `Optional[APIKnowledgeBase]` Knowledgebase Description ### Example ```python from do_gradientai import GradientAI client = GradientAI() knowledge_base = client.knowledge_bases.create() print(knowledge_base.knowledge_base) ```