We’re getting 401 when calling client.vectorStores.create() from code. The same flow worked until about three hours ago. Upload via the team dashboard UI still works with the same account. Other API calls with the same api key work (e.g. client.models.list(), client.vectorStores.list()).
The error we got: {“success”: false, “message”: “401 status code (no body)”, “status”: 401, “requestID”: “req_730cc9264921b62ce1112b4fbf4d09da”}
Seeing the same issue here. We’re calling client.vectorStores.files.createAndPoll() to attach files to an existing vector store — was working fine until today, now getting 401 status code (no body).
Additionally, the OpenAI dashboard itself is broken for our vector stores — the “Files attached” and “Used by” sections both show “An unexpected error occurred: Load failed”. One of our vector stores that previously existed now returns “No valid vector store found with id ‘vs_…’” even though nothing was changed on our end.
Details:
openai.files.create() still works (file upload succeeds)
The 401 happens on the subsequent vectorStores.files.createAndPoll() call
vectorStores.list() also still works — can see our stores
Existing vector stores show “Load failed” in the dashboard UI
API key is valid, other endpoints (chat completions, embeddings) work fine
No config changes on our side — same code was working yesterday
Seems like something is broken specifically in the vector store file attachment / file_search infrastructure, not auth itself. The 401 with no body is not informative.
It looks like the platform site is using the file_batches endpoint, when uploads and attachments via the platform dashboard succeed; using this API URL is one approach you can try when you rewrite with more fault tolerance:
/v1/vector_stores/vs_69.../file_batches
One already cannot trust the .createAndPoll() method - it failed before by being too optimistic.
My own cl.vector_stores.files.create() use and then speculative error-tolerant cl.vector_stores.files.retrieve() poller is succeeding currently against my blank canvas of vector storage (after the expected failures of reading the newly-created file path):
-- Uploading file: vs_metadata_demo.py
upload ok: file_id=file-5rSJwsPRTrpMg9p1cj27w1
-- Attaching file to vector store: vs_id=vs_699cd3c59cc48191adc18fff6b76fc49 file_id=file-5rSJwsPRTrpMg9p1cj27w1
attach ok: vs_file_id=file-5rSJwsPRTrpMg9p1cj27w1
-- Listing check (immediate after attach (file1)): expecting file_id=file-5rSJwsPRTrpMg9p1cj27w1
listing mismatch: file is NOT present (count=1)
-- Listing check (after 2s delay (file1)): expecting file_id=file-5rSJwsPRTrpMg9p1cj27w1
listing mismatch: file is NOT present (count=1)
-- Polling vector store file status: vs_id=vs_699cd3c59cc48191adc18fff6b76fc49 file_id=file-5rSJwsPRTrpMg9p1cj27w1
polling attempt 1/30: status=completed
poll ok: terminal status=completed
-- File1 ready: file_id=file-5rSJwsPRTrpMg9p1cj27w1
Lesson: the code you write is the only code you can trust.
Click through the “reinforcement learning” about vector store service quality of this post to see code: creating your own polling method using the OpenAI SDK, although I’d encourage you to take control of the RESTful API request with your own code, also.
I’ve persisted a bit more, made sure I capture non-200 status. I don’t see 401 with vector store creation independent from file attachments.
It costs you nothing to pre-create vector store IDs for the future, so this is not a latency cost. Then you can attach in parallel instead of using any “parallel” batch method that might instead decide to serialize files on you out of your control.
While my vector store file attachment caller is resilient, the API is ingesting far slower than expected: 30 seconds for a 2kB Python file.