Skip to content

OpenAI Responses API

Generate a response with the OpenAI SDK. Choose a model that lists /v1/responses in supported_endpoints.

POST /v1/responses

Authorization

Authorizationheader · string
Bearer $BOARDWALK_API_KEY. Requires inference:write and sufficient credits.
Content-Typeheader · stringrequired
application/json

Request

Request · cURL
curl https://api.boardwalk.cloud/v1/responses \
  -H "Authorization: Bearer $BOARDWALK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"support-agent","input":"Hello","max_output_tokens":256,"store":false}'

Request body

modelstringrequired
Public repository ID or private deployment name; optionally append @revision_id.
inputstring | object[]required
Text or ordered message, reasoning, function_call and function_call_output items. User messages accept input_text and qualified input_image blocks. Preserve returned IDs and item order for replay.
instructionsstring
System instructions for this request.
max_output_tokenspositive integer
Maximum generated tokens, including reasoning. Input and output share the context window.
streamboolean
Receive native Responses server-sent events.
storefalse
Defaults to false. true is rejected. Keep conversation history in your application.
backgroundfalse
Only synchronous execution is supported.
temperature / top_pnumber
temperature: 0–2; top_p: greater than 0 through 1.
toolsobject[]
Client function tools: {type:"function", name, description?, parameters, strict?}. Tool execution belongs to your application. Strict arguments require separate model support.
tool_choice"auto" | "none" | "required" | object
Named selection uses {type:"function", name}. Check the model’s tool_calling fields.
parallel_tool_callsboolean
Requires the corresponding model control. false is rejected on the current vLLM Responses binding.
textobject
format is {type:"text"}, {type:"json_object"}, or {type:"json_schema", name, schema, strict?}. Check endpoint-specific response formats.
reasoningobject
Only {effort:"none"} on models advertising thinking_toggle. Other effort levels and budgets are rejected.
truncation"disabled"
Automatic history truncation is not supported.

Response

Example response. IDs, token counts, and rates are illustrative.

200 · application/json
{
  "id": "resp_example",
  "object": "response",
  "model": "support-agent",
  "status": "completed",
  "output": [
    {
      "type": "message",
      "id": "msg_example",
      "role": "assistant",
      "status": "completed",
      "content": [
        { "type": "output_text", "text": "Hello!", "annotations": [] }
      ]
    }
  ],
  "usage": { "input_tokens": 12, "output_tokens": 3, "total_tokens": 15 }
}
outputobject[]
Ordered assistant message, reasoning and function-call items. The SDK’s output_text convenience property joins text output.
statusstring
completed, incomplete, or failed. A token limit produces incomplete; inspect incomplete_details.reason.
usageobject
input_tokens includes cache reads; output_tokens includes reasoning. Do not add detail counters a second time.

OpenAI SDK

TypeScript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.BOARDWALK_API_KEY,
  baseURL: "https://api.boardwalk.cloud/v1",
});

const response = await client.responses.create({
  model: "support-agent",
  input: "Hello",
  store: false,
  max_output_tokens: 256,
});
console.log(response.output_text);

History and tools

Keep history in your application and send earlier input and output items on each turn, including reasoning items when needed. After executing a tool, append a function_call_output with its original call_id.

Responses are not stored. previous_response_id, conversations, item references, hosted tools, and response retrieval are unsupported.

Streaming

Use client.responses.stream(...).finalResponse() to assemble text and tool argument deltas. Wait for response.completed, response.incomplete, or response.failed, then check the status before parsing output. A disconnect is not completion.

See image inputs and structured output for native content shapes and limits.

Errors

Errors use the shared error format. Save the x-request-id response header for receipts and support.