Endpoints
Responses
Use POST /responses on api14 with the OpenAI Responses API format, including input items, tools, streaming and structured output.
Try it in the playgroundThe Responses endpoint accepts the OpenAI Responses API format, so client.responses.create(...) in the official SDKs works without changes. It runs on the same models as Chat completions. api14 forwards the body upstream unchanged and bills the usage that comes back.
POST https://api14.com/api/v1/responses
Authorization: Bearer sk-api14-...
Content-Type: application/json
Request
| Parameter | Type | Description |
|---|---|---|
model | string, required | Model id, e.g. openai/gpt-5-mini. |
input | string | array, required | A prompt string or an array of input items ({ role, content } messages, function_call_output, …). |
instructions | string | System-level instructions. |
stream | boolean | Stream semantic events (response.output_text.delta, response.completed, …) over SSE. |
max_output_tokens | integer | Upper bound on generated tokens. |
temperature, top_p | number | Sampling controls. |
tools, tool_choice, parallel_tool_calls | Function tools. Web search is also available as a tool or through plugins. | |
text | object | Output format, e.g. { "format": { "type": "json_schema", "name": "...", "schema": {...} } }. |
reasoning | object | { "effort": "low" | "medium" | "high" }. See Reasoning. |
provider, models, plugins | Same gateway extensions as chat completions. |
The gateway doesn't store your conversations, so pass the full context in input with every call. Stateful options like previous_response_id may not be supported.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "openai/gpt-5-mini",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
The example above uses chat completions. With the Node SDK, the Responses equivalent looks like this:
const response = await client.responses.create({
model: "openai/gpt-5-mini",
input: "Write a haiku about APIs.",
});
console.log(response.output_text);
Response
{
"id": "resp-1760000000-abc123",
"object": "response",
"created_at": 1760000000,
"model": "openai/gpt-5-mini",
"status": "completed",
"output": [
{
"type": "message",
"role": "assistant",
"content": [{ "type": "output_text", "text": "Requests in flight,\nJSON answers drifting back,\none key opens all." }]
}
],
"usage": {
"input_tokens": 14,
"output_tokens": 22,
"total_tokens": 36,
"input_tokens_details": { "cached_tokens": 0 },
"output_tokens_details": { "reasoning_tokens": 0 },
"cost": 0.0000475
}
}
The gateway reads usage from the final object, or from the response.completed event when streaming, and debits cost in USD from your balance.
Errors
Same as chat completions: 400 model_required, 400 invalid_json, 401 invalid_api_key, 402 insufficient_balance, 403 model_not_allowed / plan_required, 404 model_not_found, 413 payload_too_large, 429 rate_limited / daily_limit_reached, 502 upstream_unavailable. See Errors.