Hello everyone,
I’m developing a Next.js App Router application that integrates with the OpenAI Assistants API (v2) for RAG (Retrieval Augmented Generation) and file management. I’m encountering a very persistent and unusual 404 Not Found
error for all v1/beta
endpoints related to Assistants and Vector Stores. I’ve exhausted all client-side and configuration troubleshooting, and my direct API logs show no activity.
I’m hoping someone from the community or OpenAI staff might have encountered this or can offer insights.
My Setup & Goal:
- App: Next.js (App Router, v15.3.1), React, Supabase (Auth & DB).
- Goal: Create Assistants, link/create Vector Stores, upload files to Vector Stores, and use these for RAG during chat.
- API Key:
sk-proj-
type key, generated within my single OpenAI project ([YOUR_PROJECT_ID]
).
Symptoms & Extensive Troubleshooting (What Works & What Fails Consistently):
A. General API Access & Core Assistant Functionality (Works Perfectly):
- API Key Validity:
curl -v https://api.openai.com/v1/models
returnsHTTP/2 200 OK
with a full list of models. - File Upload (General Storage): My app successfully uploads files to
POST https://api.openai.com/v1/files
, returningHTTP/2 200 OK
(e.g.,file-Xmn5QwkAG43zYpHm1JABCf
). - Assistant Creation: My app successfully creates Assistants via
POST https://api.openai.com/v1/assistants
, returningHTTP/2 200 OK
. - Assistant Visibility: Newly created Assistants are visible and editable in the OpenAI UI dashboard.
- Assistant Chat: I can successfully chat with these Assistants in the UI Playground and via my app’s API (
threads
API calls), and they respond as expected. - Manual RAG (UI Flow): I can manually upload files to an Assistant’s vector store via the OpenAI UI dashboard, and then the Assistant can successfully answer questions about those documents via my app’s chat interface.
B. Critical Failure Point: ALL v1/beta
Assistants API Endpoints (Consistently 404 Not Found
):
- GET Assistant Details:
curl -v https://api.openai.com/v1/beta/assistants/[YOUR_ASSISTANT_ID]
- POST Attach File to Assistant (Directly):
curl -v -X POST https://api.openai.com/v1/beta/assistants/[YOUR_ASSISTANT_ID]/files -d '{ "file_id": "[YOUR_FILE_ID]" }'
- POST Create Vector Store:
curl -v -X POST https://api.openai.com/v1/beta/vector_stores -d '{ "name": "Test Vector Store" }'
- Result for ALL
v1/beta
attempts (fromcurl
and my app):HTTP/2 404 Not Found
with an Nginx HTML error page. No JSON error response.- Example
cf-ray
for a recent failing call:947fa4f91e073c7f-LHR
- Example
C. API Logs Are Missing Entirely:
- Despite successful calls (like
/v1/models
), absolutely no API requests appear in my API logs dashboard (https://platform.openai.com/logs?api=responses
) whatsoever.
Troubleshooting Already Exhausted:
- Ensured
OpenAI-Beta: assistants=v2
header is sent. - Used fresh Assistants, new
sk-proj-
API keys, and even a completely new OpenAI project. - Confirmed Assistant IDs and API keys match the project context (and I only have one project).
- Performed aggressive
node_modules
,package-lock.json
,.next
cleanup and rebuilds. - Verified Supabase client setup (client-side cookies, server-side
createServerClient
withJWT_SECRET
), which is now fully functional. - Tried different Node.js versions (e.g., v20 LTS).
- Checked for environment proxy/firewall (none found).
Conclusion & Request for Help:
The evidence strongly points to a systemic provisioning, routing, or feature-flag misconfiguration on OpenAI’s infrastructure, affecting the entire https://api.openai.com/v1/beta
namespace for my account/project. Requests are consistently being met with a 404 Not Found
at the Nginx layer, preventing them from even reaching your backend API system to be logged.
Has anyone encountered this specific issue where v1/beta
endpoints consistently 404
despite working v1
endpoints, UI functionality, and missing API logs? Could this be an account-level provisioning issue? Any insights or suggestions would be greatly appreciated, as standard troubleshooting has yielded no resolution.