Skip to main content

Create Knowledge Base Collection

Create a vector collection for the RAG knowledge base. Typically called once before uploading documents for the first time.

Try It

POST/database/collectionshttps://api-platform.ope.ai

Authentication

Uses Bearer Token authentication.

  • Header: Authorization: Bearer <token>
  • Example: Authorization: Bearer sk-xxxxxx

Request Body (application/json)

The request body can just be an empty JSON object.

{}

Default Limits

A single account can create a maximum of 5 knowledge bases by default. One API Key can create one independent knowledge base; you can use 5 API Keys to create 5 isolated knowledge bases. For more knowledge bases, higher capacity, or dedicated deployment solutions, please contact us.

Request Examples

curl -X POST "https://api-platform.ope.ai/database/collections" \
-H "Authorization: Bearer $OPEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'

Response Example

{
"success": true
}

Error Responses

Status CodeScenarioDescription
401Authentication failedAPI Key is missing, invalid, or has insufficient permissions
422Validation failedRequest format is incorrect
500Collection creation failedVector database connection failed or collection creation failed