Responses
POST https://api.i14.ai/v1/responses
Send text or a list of input items and receive an array of output items. To use this endpoint, choose a model whose deployment supports Responses. List models to find the IDs your key can use. That list does not establish endpoint or tool support. Some models support only Chat Completions and Completions. Check which endpoints your model supports before choosing a client.
Request body
Section titled “Request body”Use Authorization: Bearer YOUR_API_KEY and Content-Type: application/json. See Authentication.
| Field | Type | What to send |
|---|---|---|
model |
string, required | A model ID your key can use on this endpoint. |
input |
string or array, required in this example | A prompt, or an ordered array of messages and tool-related items. Resend the relevant prior input and output items on subsequent turns. |
instructions |
string | Instructions that guide the model for this request. |
max_output_tokens |
integer | Upper bound on generated tokens. Leave room for reasoning if enabled. |
temperature, top_p |
number | Sampling controls. Prefer adjusting one at a time. |
stream |
boolean | Set to true for typed server-sent events instead of a single response object. |
store |
boolean | Omit or pass false. |
tools |
array | Client-side function definitions. Only type: "function" is accepted. |
tool_choice |
string or object | Choose whether a compatible model may call a function. See Function calling. |
reasoning.effort |
string | On supported models, none and minimal disable thinking, while medium enables it. The control is on/off, not a reasoning-token budget. |
Tool and input capabilities vary by model. The API does not fetch remote media URLs or resolve file IDs. Hosted tools such as web search, file search and remote MCP are not part of this endpoint.
Create a response
Section titled “Create a response”Set I14_MODEL to an ID that supports Responses and I14_API_KEY to your i14 key.
curl --fail-with-body --silent --show-error https://api.i14.ai/v1/responses \ -H "Authorization: Bearer $I14_API_KEY" \ -H "Content-Type: application/json" \ --data "$(jq -n --arg model "$I14_MODEL" '{model: $model, input: "What is an embedding in one sentence?", max_output_tokens: 256, store: false}')"import osfrom openai import OpenAI
client = OpenAI(base_url="https://api.i14.ai/v1", api_key=os.environ["I14_API_KEY"])response = client.responses.create( model=os.environ["I14_MODEL"], input="What is an embedding in one sentence?", max_output_tokens=256, store=False,)print(response.output_text)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.i14.ai/v1", apiKey: process.env.I14_API_KEY });const response = await client.responses.create({ model: process.env.I14_MODEL, input: "What is an embedding in one sentence?", max_output_tokens: 256, store: false,});console.log(response.output_text);The cURL example uses jq to put the model name into the JSON safely.
Response object
Section titled “Response object”| Field | What it means |
|---|---|
id, object, model |
The response identifier, object type (response) and model identifier. |
status |
The outcome. Check this before treating output as final. |
output |
An ordered array of items. A message item may contain output_text parts. Tool calls and reasoning can be separate items; do not assume the first item is assistant text. |
usage |
Token totals such as input_tokens, output_tokens and total_tokens, when reported. |
incomplete_details, error |
Optional details about an incomplete or failed response. |
Example response (selected fields):
{ "id": "resp_example", "object": "response", "model": "your-model-id", "status": "completed", "output": [ { "id": "msg_example", "type": "message", "role": "assistant", "status": "completed", "content": [ {"type": "output_text", "text": "An embedding represents an input as a vector.", "annotations": []} ] } ], "usage": {"input_tokens": 15, "output_tokens": 10, "total_tokens": 25}}output_text on the Python and Node.js response objects is an SDK accessor. For raw JSON, read the output array instead.
Stream a response
Section titled “Stream a response”Set stream: true and dispatch events by type. For text, append the delta from each response.output_text.delta event. Read final status and usage from the terminal response when present. Do not parse this stream as Chat Completions chunks or wait for a [DONE] sentinel. See the streaming guide.