Skip to content

Assistants

BVE Gateway provides full pass-through support for the OpenAI Assistants v2 API.

GET /v1/assistants
POST /v1/assistants
GET /v1/assistants/:assistant_id
POST /v1/assistants/:assistant_id
DELETE /v1/assistants/:assistant_id
POST /v1/threads
GET /v1/threads/:thread_id
POST /v1/threads/:thread_id
DELETE /v1/threads/:thread_id
GET /v1/threads/:thread_id/messages
POST /v1/threads/:thread_id/messages
GET /v1/threads/:thread_id/messages/:message_id
POST /v1/threads/:thread_id/runs
GET /v1/threads/:thread_id/runs/:run_id
POST /v1/threads/:thread_id/runs/:run_id/cancel
GET /v1/threads/:thread_id/runs/:run_id/steps

All require Authorization: Bearer sk-bve-YOUR_KEY.

Many operations also require the OpenAI-Beta: assistants=v2 header.

Terminal window
curl https://api.bve.me/v1/assistants \
-H "Authorization: Bearer sk-bve-YOUR_KEY" \
-H "Content-Type: application/json" \
-H "OpenAI-Beta: assistants=v2" \
-d '{
"model": "gpt-4o",
"name": "My Assistant",
"instructions": "You are a helpful assistant."
}'

Response:

{
"id": "asst_abc123",
"object": "assistant",
"created_at": 1716288000,
"name": "My Assistant",
"model": "gpt-4o",
"instructions": "You are a helpful assistant.",
"tools": [],
"file_ids": []
}
Terminal window
# Create a thread
curl -X POST https://api.bve.me/v1/threads \
-H "Authorization: Bearer sk-bve-YOUR_KEY" \
-H "Content-Type: application/json" \
-H "OpenAI-Beta: assistants=v2" \
-d '{}'
# Add a message
curl -X POST https://api.bve.me/v1/threads/thread_abc123/messages \
-H "Authorization: Bearer sk-bve-YOUR_KEY" \
-H "Content-Type: application/json" \
-H "OpenAI-Beta: assistants=v2" \
-d '{
"role": "user",
"content": "What is the capital of France?"
}'
# Create a run
curl -X POST https://api.bve.me/v1/threads/thread_abc123/runs \
-H "Authorization: Bearer sk-bve-YOUR_KEY" \
-H "Content-Type: application/json" \
-H "OpenAI-Beta: assistants=v2" \
-d '{
"assistant_id": "asst_abc123"
}'
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'sk-bve-YOUR_KEY',
baseURL: 'https://api.bve.me/v1',
});
// Create assistant
const assistant = await client.beta.assistants.create({
name: 'My Assistant',
instructions: 'You are a helpful assistant.',
model: 'gpt-4o',
});
// Create thread and run
const thread = await client.beta.threads.create();
await client.beta.threads.messages.create(thread.id, {
role: 'user',
content: 'What is the capital of France?',
});
const run = await client.beta.threads.runs.createAndPoll(thread.id, {
assistant_id: assistant.id,
});
if (run.status === 'completed') {
const messages = await client.beta.threads.messages.list(thread.id);
console.log(messages.data[0].content);
}
  • All Assistants v2 routes are proxied directly — no gateway-level modifications.
  • Include OpenAI-Beta: assistants=v2 on requests that require it.
  • For file-based tools, upload files first via the Files API.
  • Vector stores for the file search tool are managed via the Vector Stores API.