Docs pages

Responses

POSThttps://api.steerwise.s3techpulse.com/v1/responses

A 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

Code samples in
bashpythonjavascript
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);
Example response (json, 200)
{
  "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

  • modelstringRequired

    auto, or a model id from GET /v1/models.

  • inputstring or arrayRequired

    A string (one user message) or a list of items: messages with text content, earlier function_call items and their function_call_output. Only text content is supported.

  • instructionsstring

    The system prompt.

  • toolsarray

    Function tools, at most 128. Any other tool type is a 400.

  • tool_choicestring or object

    none, auto, required, or {"type": "function", "name": …}, with the same rules as chat completions.

  • parallel_tool_callsboolean

    false asks for at most one tool call per turn.

  • max_output_tokensinteger

    Output token limit, thinking included. Omitted: the model’s default.

  • reasoningobject

    effort, with the same values as chat completions’ reasoning_effort.

  • textobject

    format: text, json_object or json_schema.

  • streamboolean

    Named server-sent events; see Streaming.

  • temperaturenumber

    Dropped on models without sampling control and named in x-steerwise-ignored-params.

  • top_pnumber

    As temperature.

  • userstring

    An end-user id, sent upstream only as an opaque hash. safety_identifier is the same and wins when both are sent.

Response

  • idstring

    resp_ followed by the request id.

  • statusstring

    completed, or incomplete with incomplete_details.reason max_output_tokens or content_filter.

  • modelstring

    The model that served the call.

  • outputarray

    message items with output_text content, and function_call items with call_id, name and arguments.

  • usageobject

    input_tokens (cached and cache-written tokens included), output_tokens (thinking included), total_tokens, and the cached and reasoning details.

  • storeboolean

    Always 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:

  1. response.created, response.in_progress.
  2. 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.
  3. For each function call: response.output_item.added, response.function_call_arguments.delta (repeated), response.function_call_arguments.done, response.output_item.done.
  4. One of response.completed, response.incomplete or response.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 input
  • conversation: responses are not stored; send the full input
  • background: when true
  • prompt: stored prompts are not supported
  • top_logprobs: always

Ignored

Accepted and dropped silently.

  • store: the response always reports store: false
  • metadata:
  • service_tier:
  • prompt_cache_key:
  • truncation:
  • include:

Errors

Errors use the OpenAI shape, as on chat completions.

Errors for this endpoint
StatusCodeWhen
400invalid_requestThe body is malformed, a field is missing or invalid, or the model rejected the request (the message then starts with “Upstream rejected the request”).
400unsupported_parameterA parameter this API rejects (see the parameter policy on each API page), or a file part with file_id.
400unsupported_valueA 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.
400context_length_exceededThe prompt is over your plan’s or key’s context limit.
401missing_api_keyNo key was sent.
401invalid_api_keyThe key is malformed, unknown, revoked or expired.
402insufficient_balanceThe wallet balance is too low for this request.
402spend_cap_reachedSpend has reached a daily or monthly cap of the key or the organisation, or the agent run’s cap.
402request_cost_cap_exceededThis request’s worst case (the model, the prompt and the full output limit) is over the per-request cap.
403account_suspendedThe organisation or user is suspended.
403wallet_frozenStaff have put the organisation’s wallet on hold.
403key_pausedThe key is paused, usually by the runaway-spend detector after its spend jumped far past its usual rate.
403missing_scopeThe key lacks the scope this endpoint needs.
403model_not_allowedYour plan does not include the model.
403model_not_allowed_for_keyThe key’s allowed models exclude this model.
404model_not_foundNo active model has that id.
413request_too_largeThe body is over 32 MiB, or the model rejected the request as too large.
429rate_limit_exceededA per-minute request or token limit, or the limit on calls at once, of the organisation, user, key or model.
429insufficient_quotaThe monthly token quota cannot cover this call’s reservation.
429spend_cap_pendingCalls still in flight could reach a spend cap.
500internal_errorSomething failed on our side. Details are logged under the request id, never returned.
502upstream_errorThe model failed after retries and fallback.
503upstream_overloadedThe model was overloaded or unavailable after retries and fallback, or Steerwise is holding back calls to it.
503wallet_unavailableThe balance check could not run, so the request was not started.
503limits_unavailableThe rate-limit check could not run, so the request was not started.
503server_overloadedThe server is at its limit of requests at once.
503service_unavailableThe 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.
503service_restartingThe server is restarting and cancelled the request.
504upstream_timeoutThe model did not start, or went quiet for too long, after retries and fallback.

What to do about each one: Errors and limits.