Vector stores
Knowledge in OpenAI's vector store API, so the OpenAI SDKs call it unchanged: a knowledge base is a vector_store whose id is its kb_ id, a document a vector_store.file whose id is its File's. OpenAI's names, fields and statuses, with HIPS's additions in a hips member OpenAI's clients ignore; a field the routes do not take is a 400 that names it.
Note
Not switched on in production yet: every path on this page answers 404 route_not_found until it is.
/v1/vector_storesnot offeredCreate a base: name, file_ids, chunking_strategy, metadata, expires_after, and hips with embedding_model, pool and region.
/v1/vector_storesnot offeredOpenAI's list: limit, order, after, before.
/v1/vector_stores/{id}not offeredThe base.
/v1/vector_stores/{id}not offeredChange name, metadata, expires_after or hips.pool; the embedding model and the region never change.
/v1/vector_stores/{id}not offered{"id", "object": "vector_store.deleted", "deleted": true}; the base is purged.
/v1/vector_stores/{id}/filesnot offeredAdd a document: file_id, attributes (up to 16 keys), chunking_strategy.
/v1/vector_stores/{id}/filesnot offeredThe documents, filtered by status.
/v1/vector_stores/{id}/files/{file_id}not offeredA document.
/v1/vector_stores/{id}/files/{file_id}not offeredChange a document's attributes.
/v1/vector_stores/{id}/files/{file_id}not offeredRemove a document from the base; the File is kept.
/v1/vector_stores/{id}/files/{file_id}/contentnot offeredThe document's extracted text, in pages of 262,144 characters with has_more, next_page and page.
/v1/vector_stores/{id}/file_batchesnot offeredAdd several documents at once: OpenAI's file batches, ids kbb_....
/v1/vector_stores/{id}/file_batches/{batch_id}not offeredA file batch with its counts.
/v1/vector_stores/{id}/file_batches/{batch_id}/cancelnot offeredCancel a file batch: documents not read yet end cancelled.
/v1/vector_stores/{id}/file_batches/{batch_id}/filesnot offeredThe documents of a file batch.
/v1/vector_stores/{id}/searchnot offeredSearch the base without a model.
WritesCreating, changing and deleting a base, adding, changing and removing a document, file batches, and uploading a document's File: a
fullkey, or a person's token with theinferencescope of a member who may write. Any other key is a 403key_scope_denied.Reads and searchAny key of the workspace, an
inference_onlykey included, and a person's token with theinferencescope.Another workspace's id404, never 403. Reads, exports and deletes answer in a paused workspace too.
vector_store
{ "id": "kb_...", "object": "vector_store", "created_at": 1792576800, "name": "Product manuals", "usage_bytes": 0, "file_counts": {"in_progress": 0, "completed": 0, "failed": 0, "cancelled": 0, "total": 0}, "status": "completed", "expires_after": null, "expires_at": null, "last_active_at": 1792576800, "metadata": {}, "hips": {"embedding_model": "<catalog id>", "pool": "auto", "region": "eu", "chunks": 0, "storage": {"price": null, "monthly_micros": null}}}status is in_progress while a document is being read, else completed. usage_bytes is the stored bytes it is billed for; hips.storage its storage price and monthly amount in micro-dollars, null while no storage price is in effect. A base or a document still being read carries openai-poll-after-ms, when to read it again.
id (the file_ id), object: "vector_store.file", vector_store_id, created_at, usage_bytes, status (in_progress, completed, failed, cancelled), last_error (OpenAI's server_error, unsupported_file or invalid_file, and its message), chunking_strategy, attributes, and hips with stage, progress, delayed, error_code, chunks and tokens (Knowledge lists the stages and codes).
The body: query (a string, or a list of strings), max_num_results, filters (OpenAI's comparison filters eq, ne, gt, gte, lt, lte, in, nin and compound and, or over the documents' attributes), ranking_options (score_threshold, ranker). rewrite_query: true is a 400 unsupported_value: HIPS rewrites no query. A NUL in a query or a filter is a 400 invalid_value.
Search answer
{ "object": "vector_store.search_results.page", "search_query": "...", "data": [ {"file_id": "file_...", "filename": "manual.pdf", "score": 0.0, "attributes": {}, "content": [{"type": "text", "text": "..."}], "hips": {"heading": "...", "byte_start": 0, "byte_end": 0, "pages": [1]}} ], "has_more": false, "next_page": null}One base a search. A search is one request of your limits. It is billed as one knowledge_search call once its price is in effect; until then nothing is charged and no cost header is written. Server-Timing names the stages kb-base, kb-embed and kb-search.
| Status | Type | Code | Situation | Retry |
|---|---|---|---|---|
| 400 | invalid_request_error | invalid_value | A value is out of range or malformed: stop with more than 16 entries, a prompt_cache_key over 512 characters, a string holding a lone surrogate escape, a router name with an empty or unknown suffix, both max_tokens names with different values | No |
| 400 | invalid_request_error | unsupported_value | n other than 1, stream_options without stream, a message role, part, item or tool type not accepted, a hosted tool that is not served | No |
| 400 | invalid_request_error | knowledge_not_available | A Knowledge route while Knowledge's prices are not in effect. Knowledge is not switched on in production yet | No |
| 400 | invalid_request_error | limit_reached | A file or knowledge base past a limit the message names. Knowledge is not switched on in production yet | No |
| 400 | invalid_request_error | region_unavailable | A knowledge base in a region whose store does not exist yet. Knowledge is not switched on in production yet | No |
| 402 | insufficient_credit | insufficient_credit | The balance does not cover the request's maximum cost at the bound quote | After a top-up |
| 403 | permission_error | key_scope_denied | The key's kind excludes the route: a retrieval key on any route but its batch and file reads; a key other than full writing a knowledge base's documents | No |
| 404 | not_found_error | knowledge_base_not_found | A knowledge base that is not the workspace's, or that is being deleted. Knowledge is not switched on in production yet | No |
| 404 | not_found_error | route_not_found | Unknown path, among them every /v1/jobs path (not built) and Knowledge's paths while Knowledge is switched off | No |
| 429 | rate_limit_error | rate_limit_exceeded | A rate limit; param is requests, tokens, uploads, batches (batches created per hour) or knowledge_search; Retry-After | Yes, after Retry-After |
- Status
- 400
- Type
invalid_request_error- Code
invalid_value- Situation
- A value is out of range or malformed:
stopwith more than 16 entries, aprompt_cache_keyover 512 characters, a string holding a lone surrogate escape, a router name with an empty or unknown suffix, bothmax_tokensnames with different values - Retry
- No
- Status
- 400
- Type
invalid_request_error- Code
unsupported_value- Situation
nother than 1,stream_optionswithoutstream, a message role, part, item or tool type not accepted, a hosted tool that is not served- Retry
- No
- Status
- 400
- Type
invalid_request_error- Code
knowledge_not_available- Situation
- A Knowledge route while Knowledge's prices are not in effect. Knowledge is not switched on in production yet
- Retry
- No
- Status
- 400
- Type
invalid_request_error- Code
limit_reached- Situation
- A file or knowledge base past a limit the message names. Knowledge is not switched on in production yet
- Retry
- No
- Status
- 400
- Type
invalid_request_error- Code
region_unavailable- Situation
- A knowledge base in a region whose store does not exist yet. Knowledge is not switched on in production yet
- Retry
- No
- Status
- 402
- Type
insufficient_credit- Code
insufficient_credit- Situation
- The balance does not cover the request's maximum cost at the bound quote
- Retry
- After a top-up
- Status
- 403
- Type
permission_error- Code
key_scope_denied- Situation
- The key's kind excludes the route: a retrieval key on any route but its batch and file reads; a key other than
fullwriting a knowledge base's documents - Retry
- No
- Status
- 404
- Type
not_found_error- Code
knowledge_base_not_found- Situation
- A knowledge base that is not the workspace's, or that is being deleted. Knowledge is not switched on in production yet
- Retry
- No
- Status
- 404
- Type
not_found_error- Code
route_not_found- Situation
- Unknown path, among them every
/v1/jobspath (not built) and Knowledge's paths while Knowledge is switched off - Retry
- No
- Status
- 429
- Type
rate_limit_error- Code
rate_limit_exceeded- Situation
- A rate limit;
paramisrequests,tokens,uploads,batches(batches created per hour) orknowledge_search;Retry-After - Retry
- Yes, after
Retry-After
A document's File that is not the workspace's, or is gone, is a 404 file_not_found; past the ingestion and search limits the 429 names knowledge_ingest or knowledge_search.
Related sheets
- Sheet
- 17 of 19
- Detail
- N
- Updated
- 2026-11-11