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.
/v1/vector_storesservedCreate a base: name, file_ids, chunking_strategy, metadata, expires_after, and hips with embedding_model, pool and region.
/v1/vector_storesservedOpenAI's list: limit, order, after, before.
/v1/vector_stores/{id}servedThe base.
/v1/vector_stores/{id}servedChange name, metadata, expires_after or hips.pool; the embedding model and the region never change.
/v1/vector_stores/{id}served{"id", "object": "vector_store.deleted", "deleted": true}; the base is purged.
/v1/vector_stores/{id}/filesservedAdd a document: file_id, attributes (up to 16 keys), chunking_strategy.
/v1/vector_stores/{id}/filesservedThe documents, filtered by status.
/v1/vector_stores/{id}/files/{file_id}servedA document.
/v1/vector_stores/{id}/files/{file_id}servedChange a document's attributes.
/v1/vector_stores/{id}/files/{file_id}servedRemove a document from the base; the File is kept.
/v1/vector_stores/{id}/files/{file_id}/contentservedThe document's extracted text, in pages of 262,144 characters with has_more, next_page and page.
/v1/vector_stores/{id}/file_batchesservedAdd several documents at once: OpenAI's file batches, ids kbb_....
/v1/vector_stores/{id}/file_batches/{batch_id}servedA file batch with its counts.
/v1/vector_stores/{id}/file_batches/{batch_id}/cancelservedCancel a file batch: documents still unread end cancelled.
/v1/vector_stores/{id}/file_batches/{batch_id}/filesservedThe documents of a file batch.
/v1/vector_stores/{id}/searchservedSearch 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. 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, an x-client-request-id header that is not printable ASCII or is over 512 characters (param x-client-request-id) | 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 type HIPS does not run | No |
| 400 | invalid_request_error | knowledge_not_available | A Knowledge search while no search price is in force; nothing is charged | No |
| 400 | invalid_request_error | limit_reached | A file or knowledge base past a limit the message names | No |
| 400 | invalid_request_error | region_unavailable | A knowledge base in a region with no store | No |
| 400 | invalid_request_error | storage_marked_for_deletion | On POST /v1/vector_stores, POST /v1/vector_stores/{vector_store_id}/files and POST /v1/vector_stores/{vector_store_id}/file_batches: the workspace's stored files are marked for deletion, since a month's storage could not be paid, and nothing new is added to them; the message names the date. Reading and deleting still work | Once credit brings the balance back to zero or above, which clears the mark at once (the Console answers the same code as a 409) |
| 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 | No |
| 404 | not_found_error | route_not_found | Unknown path | No |
| 429 | rate_limit_error | rate_limit_exceeded | A rate limit; param is the counter that is full: requests, input_tokens (the prompt does not fit what is left of the input tokens a minute), output_tokens (the output tokens a minute are spent), uploads, batches (batches created per hour) or knowledge_search; Retry-After and retry-after-ms | 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, anx-client-request-idheader that is not printable ASCII or is over 512 characters (paramx-client-request-id) - 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 type HIPS does not run- Retry
- No
- Status
- 400
- Type
invalid_request_error- Code
knowledge_not_available- Situation
- A Knowledge search while no search price is in force; nothing is charged
- Retry
- No
- Status
- 400
- Type
invalid_request_error- Code
limit_reached- Situation
- A file or knowledge base past a limit the message names
- Retry
- No
- Status
- 400
- Type
invalid_request_error- Code
region_unavailable- Situation
- A knowledge base in a region with no store
- Retry
- No
- Status
- 400
- Type
invalid_request_error- Code
storage_marked_for_deletion- Situation
- On
POST /v1/vector_stores,POST /v1/vector_stores/{vector_store_id}/filesandPOST /v1/vector_stores/{vector_store_id}/file_batches: the workspace's stored files are marked for deletion, since a month's storage could not be paid, and nothing new is added to them; the message names the date. Reading and deleting still work - Retry
- Once credit brings the balance back to zero or above, which clears the mark at once (the Console answers the same code as a 409)
- 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
- Retry
- No
- Status
- 404
- Type
not_found_error- Code
route_not_found- Situation
- Unknown path
- Retry
- No
- Status
- 429
- Type
rate_limit_error- Code
rate_limit_exceeded- Situation
- A rate limit;
paramis the counter that is full:requests,input_tokens(the prompt does not fit what is left of the input tokens a minute),output_tokens(the output tokens a minute are spent),uploads,batches(batches created per hour) orknowledge_search;Retry-Afterandretry-after-ms - 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
- 19 of 21
- Detail
- P
- Updated
- 2026-11-23