Responses
https://api.steerwise.s3techpulse.com/v1/responsesA stateless subset of the OpenAI Responses API: text input and function tools. Responses are not stored, so send the full input every time. Needs a key with the inference scope.
Example
curl https://api.steerwise.s3techpulse.com/v1/responses \
-H "Authorization: Bearer $STEERWISE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "auto",
"instructions": "Answer in one sentence.",
"input": "What is the capital of France?"
}' import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.steerwise.s3techpulse.com/v1",
api_key=os.environ["STEERWISE_API_KEY"],
)
resp = client.responses.create(
model="auto",
instructions="Answer in one sentence.",
input="What is the capital of France?",
)
print(resp.model, resp.output_text)import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.steerwise.s3techpulse.com/v1",
apiKey: process.env.STEERWISE_API_KEY,
});
const resp = await client.responses.create({
model: "auto",
instructions: "Answer in one sentence.",
input: "What is the capital of France?",
});
console.log(resp.model, resp.output_text);{
"id": "resp_<x-request-id>",
"object": "response",
"created_at": <unix time>,
"status": "completed",
"model": "<the model that served the call>",
"output": [
{
"type": "message",
"id": "<item id>",
"status": "completed",
"role": "assistant",
"content": [ { "type": "output_text", "text": "<the reply>", "annotations": [] } ]
}
],
"store": false,
"usage": { "input_tokens": <n>, "output_tokens": <n>, "total_tokens": <n> }
}Request body
modelstringRequiredauto, or a model id fromGET /v1/models.inputstring or arrayRequiredA string (one user message) or a list of items: messages with text content, earlier
function_callitems and theirfunction_call_output. Only text content is supported.instructionsstringThe system prompt.
toolsarrayFunction tools, at most 128. Any other tool type is a 400.
tool_choicestring or objectnone,auto,required, or{"type": "function", "name": …}, with the same rules as chat completions.parallel_tool_callsbooleanfalseasks for at most one tool call per turn.max_output_tokensintegerOutput token limit, thinking included. Omitted: the model’s default.
reasoningobjecteffort, with the same values as chat completions’reasoning_effort.textobjectformat:text,json_objectorjson_schema.streambooleanNamed server-sent events; see Streaming.
temperaturenumberDropped on models without sampling control and named in
x-steerwise-ignored-params.top_pnumberAs
temperature.userstringAn end-user id, sent upstream only as an opaque hash.
safety_identifieris the same and wins when both are sent.
Response
idstringresp_followed by the request id.statusstringcompleted, orincompletewithincomplete_details.reasonmax_output_tokensorcontent_filter.modelstringThe model that served the call.
outputarraymessageitems withoutput_textcontent, andfunction_callitems withcall_id,nameandarguments.usageobjectinput_tokens(cached and cache-written tokens included),output_tokens(thinking included),total_tokens, and the cached and reasoning details.storebooleanAlways
false.
Response headers
The same as chat completions: x-request-id, x-steerwise-routed-from, x-steerwise-fallback-from, x-steerwise-ignored-params, x-steerwise-run and the rate limit headers.
Streaming
With "stream": true the response is named events (event: <type>, then data: <JSON>), each with an increasing sequence_number:
response.created,response.in_progress.- For each text item:
response.output_item.added,response.content_part.added,response.output_text.delta(repeated),response.output_text.done,response.content_part.done,response.output_item.done. - For each function call:
response.output_item.added,response.function_call_arguments.delta(repeated),response.function_call_arguments.done,response.output_item.done. - One of
response.completed,response.incompleteorresponse.failed. There is no[DONE]line.
: ping comments arrive every 15 seconds while the model is quiet. Failures after the first 5 seconds arrive as response.failed.
Parameter policy
Unknown fields are ignored, so newer SDK fields do not break requests. Known fields that Steerwise cannot honour follow a fixed policy:
Rejected
The request fails with 400 unsupported_parameter and param names the field, because ignoring it would change the result.
previous_response_id: responses are not stored; send the full inputconversation: responses are not stored; send the full inputbackground: when trueprompt: stored prompts are not supportedtop_logprobs: always
Ignored
Accepted and dropped silently.
store: the response always reportsstore: falsemetadata:service_tier:prompt_cache_key:truncation:include:
Errors
Errors use the OpenAI shape, as on chat completions.
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | The body is malformed, a field is missing or invalid, or the model rejected the request (the message then starts with “Upstream rejected the request”). |
| 400 | unsupported_parameter | A parameter this API rejects (see the parameter policy on each API page), or a file part with file_id. |
| 400 | unsupported_value | A value this API or the chosen model cannot honour: for example a forced tool_choice on a model without forced tool use, an image for a model without vision, or an effort level the model lacks. |
| 400 | context_length_exceeded | The prompt is over your plan’s or key’s context limit. |
| 401 | missing_api_key | No key was sent. |
| 401 | invalid_api_key | The key is malformed, unknown, revoked or expired. |
| 402 | insufficient_balance | The wallet balance is too low for this request. |
| 402 | spend_cap_reached | Spend has reached a daily or monthly cap of the key or the organisation, or the agent run’s cap. |
| 402 | request_cost_cap_exceeded | This request’s worst case (the model, the prompt and the full output limit) is over the per-request cap. |
| 403 | account_suspended | The organisation or user is suspended. |
| 403 | wallet_frozen | Staff have put the organisation’s wallet on hold. |
| 403 | key_paused | The key is paused, usually by the runaway-spend detector after its spend jumped far past its usual rate. |
| 403 | missing_scope | The key lacks the scope this endpoint needs. |
| 403 | model_not_allowed | Your plan does not include the model. |
| 403 | model_not_allowed_for_key | The key’s allowed models exclude this model. |
| 404 | model_not_found | No active model has that id. |
| 413 | request_too_large | The body is over 32 MiB, or the model rejected the request as too large. |
| 429 | rate_limit_exceeded | A per-minute request or token limit, or the limit on calls at once, of the organisation, user, key or model. |
| 429 | insufficient_quota | The monthly token quota cannot cover this call’s reservation. |
| 429 | spend_cap_pending | Calls still in flight could reach a spend cap. |
| 500 | internal_error | Something failed on our side. Details are logged under the request id, never returned. |
| 502 | upstream_error | The model failed after retries and fallback. |
| 503 | upstream_overloaded | The model was overloaded or unavailable after retries and fallback, or Steerwise is holding back calls to it. |
| 503 | wallet_unavailable | The balance check could not run, so the request was not started. |
| 503 | limits_unavailable | The rate-limit check could not run, so the request was not started. |
| 503 | server_overloaded | The server is at its limit of requests at once. |
| 503 | service_unavailable | The key could not be checked in time. With x-should-retry: false and no Retry-After: no model that could serve the call is available right now. |
| 503 | service_restarting | The server is restarting and cancelled the request. |
| 504 | upstream_timeout | The model did not start, or went quiet for too long, after retries and fallback. |
What to do about each one: Errors and limits.
Every field and schema: Full API reference.