Responses API
POST https://api.bve.me/v1/responsesRequires Authorization: Bearer sk-bve-YOUR_KEY.
The Responses API is OpenAI’s newer, stateful generation interface. BVE Gateway proxies this endpoint directly to Fuelix.
Request body
Section titled “Request body”{ "model": "gpt-4o", "input": "What is 2 + 2?", "max_output_tokens": 100}| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | GPT model ID (e.g. gpt-4o, gpt-4.1) |
input | string or array | Yes | Text prompt or message array |
max_output_tokens | integer | No | Max tokens (minimum 16) |
temperature | number | No | Sampling temperature |
top_p | number | No | Nucleus sampling |
stream | boolean | No | Enable SSE streaming |
tools | array | No | Tool definitions |
tool_choice | string or object | No | Tool selection strategy |
instructions | string | No | System instructions |
previous_response_id | string | No | For multi-turn conversations |
Response
Section titled “Response”{ "id": "resp_abc123", "object": "response", "created_at": 1716288000, "model": "gpt-4o-2024-11-20", "output": [ { "type": "message", "role": "assistant", "content": [ { "type": "output_text", "text": "4" } ] } ], "usage": { "input_tokens": 7, "output_tokens": 1, "total_tokens": 8 }}cURL example
Section titled “cURL example”curl https://api.bve.me/v1/responses \ -H "Authorization: Bearer sk-bve-YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "input": "What is 2 + 2?", "max_output_tokens": 100 }'Multi-turn with previous_response_id
Section titled “Multi-turn with previous_response_id”# First turncurl https://api.bve.me/v1/responses \ -H "Authorization: Bearer sk-bve-YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "input": "My name is Alice.", "max_output_tokens": 100 }'
# Second turn (reference the previous response)curl https://api.bve.me/v1/responses \ -H "Authorization: Bearer sk-bve-YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "input": "What is my name?", "previous_response_id": "resp_abc123", "max_output_tokens": 100 }'OpenAI SDK
Section titled “OpenAI SDK”import OpenAI from 'openai';
const client = new OpenAI({ apiKey: 'sk-bve-YOUR_KEY', baseURL: 'https://api.bve.me/v1',});
const response = await client.responses.create({ model: 'gpt-4o', input: 'What is 2 + 2?',});
console.log(response.output_text);- Only GPT models are supported upstream (e.g.
gpt-4o,gpt-4.1,gpt-5,o3,o4-mini). - For Claude or Gemini models, use
/v1/chat/completionsor/v1/messagesinstead. - The
max_output_tokensmust be at least 16.