OpenAI Compatibility — MDDB API
The two OpenAI Vector Stores routes Open WebUI's OpenAI-compatible External Knowledge Source provider calls, served on MDDB's own search (#446); the vectorStores module, off by default.
List vector stores (the collections the caller may read) #
GET /v1/vector_stores
(#446) The OpenAI Vector Stores list, as Open WebUI's OpenAI-compatible
External Knowledge Source provider calls it. One store per collection
the caller may read: read permission, the tenant namespace and an MCP
API key's scope apply per collection. Sorted by id, paged with
limit and after. Aliases are not listed. created_at is 0: MDDB
does not record when a collection was created.
Authorization: BearerAuth or APIKeyAuth or none
Parameters #
| Name | In | Type | Description |
|---|---|---|---|
limit |
query | integer |
Stores per page, 1-100. Default 20. Minimum 1. Maximum 100. |
after |
query | string |
The last id of the previous page (its last_id). |
Responses #
| Status | Description | Body |
|---|---|---|
200 |
A page of stores | OpenAIVectorStoreList (application/json) |
400 |
(#446) An error in the OpenAI shape, typed by the status | OpenAIError (application/json) |
401 |
Auth is on (MDDB_AUTH_ENABLED=true) and the request carries no credentials, an invalid or expired JWT, or an unknown API key. | ErrorResponse (application/json) |
429 |
The client is over the API rate limit (MDDB_RATE_LIMIT_ENABLED=true, MDDB_RATE_LIMIT_REQUESTS per MDDB_RATE_LIMIT_WINDOW seconds). A call that embeds can also be refused by the collection's daily embedding budget, with a QuotaExceeded body. Since v2.19.8 (GO-054) a request over its tenant's or its credential's rate or concurrency limit is refused with a TenantLimit body. | anyOf RateLimitError | TenantLimit (application/json) |
503 |
(#446) An error in the OpenAI shape, typed by the status | OpenAIError (application/json) |
401 example (application/json)
{
"error": "missing authentication"
}
Search a vector store (a collection) #
POST /v1/vector_stores/{vector_store_id}/search
(#446) The OpenAI vector store search, as Open WebUI's
OpenAI-compatible External Knowledge Source provider sends it. A
collection with embeddings is searched by hybrid search, any other by
full-text search; each result is the passage around the document's
best match, with a score in 0-1. Needs read permission on the
collection: 403 whether or not it exists, 404 for an unknown
collection the caller may read. filters, rewrite_query and
ranking_options.ranker are accepted and ignored.
Authorization: BearerAuth or APIKeyAuth or none
Parameters #
| Name | In | Type | Description |
|---|---|---|---|
vector_store_id (required) |
path | string |
A collection name or alias, URL-escaped (acme%2Fdocs for acme/docs). |
Request body #
Required.
Content type application/json: OpenAIVectorStoreSearchRequest
{
"max_num_results": 10,
"query": "string",
"ranking_options": {
"ranker": "string",
"score_threshold": 0
},
"rewrite_query": false
}
Responses #
| Status | Description | Body |
|---|---|---|
200 |
The passages found | OpenAIVectorStoreSearchPage (application/json) |
400 |
(#446) An error in the OpenAI shape, typed by the status | OpenAIError (application/json) |
401 |
Auth is on (MDDB_AUTH_ENABLED=true) and the request carries no credentials, an invalid or expired JWT, or an unknown API key. | ErrorResponse (application/json) |
403 |
(#446) An error in the OpenAI shape, typed by the status | OpenAIError (application/json) |
404 |
(#446) An error in the OpenAI shape, typed by the status | OpenAIError (application/json) |
413 |
(#446) An error in the OpenAI shape, typed by the status | OpenAIError (application/json) |
429 |
The client is over the API rate limit (MDDB_RATE_LIMIT_ENABLED=true, MDDB_RATE_LIMIT_REQUESTS per MDDB_RATE_LIMIT_WINDOW seconds). A call that embeds can also be refused by the collection's daily embedding budget, with a QuotaExceeded body. Since v2.19.8 (GO-054) a request over its tenant's or its credential's rate or concurrency limit is refused with a TenantLimit body. | anyOf RateLimitError | TenantLimit (application/json) |
500 |
(#446) An error in the OpenAI shape, typed by the status | OpenAIError (application/json) |
503 |
(v2.19.8, GO-053) Every search slot (MDDB_SEARCH_MAX_CONCURRENT) stayed taken for MDDB_SEARCH_QUEUE_TIMEOUT_MS. The query did not run; retry after Retry-After seconds. The same limit covers gRPC (RESOURCE_EXHAUSTED), GraphQL (the body below in the error's extensions) and MCP (a tool error with the body below as structuredContent). | SearchBusy (application/json) |
401 example (application/json)
{
"error": "missing authentication"
}