Create a response (OpenAI Responses API)
A stateless subset of the OpenAI Responses API on the node's own models, for SDKs and agent frameworks that speak Responses (the OpenAI Agents SDK among them) with only the base URL changed: `input` as a string or as items (`message` with `input_text` and `input_image` parts, or `output_text` for assistant turns; `function_call`, `function_call_output` and `reasoning` items), `instructions`, function tools with `tool_choice` and `parallel_tool_calls`, structured output through `text.format` (`json_schema`, `json_object`), `reasoning.effort` (`low` and above turn the model's reasoning phase on; its text arrives in `reasoning` items), `max_output_tokens`, `temperature`, `top_p`, and the Responses event stream (`response.created` ... `response.completed`, as OpenAI sends them). Nothing is stored: send the whole conversation as `input` items each turn. `previous_response_id`, `conversation`, `prompt`, `background: true` and `truncation: "auto"` are `400 unsupported_parameter`; `store`, `metadata` (echoed), `user`, `safety_identifier`, `prompt_cache_key`, `service_tier`, `text.verbosity`, `reasoning.summary` and `include: ["reasoning.encrypted_content"]` are accepted and ignored, and every response reports `store: false`. Tools other than `function` (web search, file search, computer use, code interpreter, MCP, image generation, shell) run on OpenAI's side and are `400 unsupported_parameter`. `null` means unset for every optional parameter. Images and JSON Schemas have the limits of chat completions. A stream that fails after it started ends with an `error` event; one that fails before the first token is a plain HTTP error. The response head of a stream waits for the first generated token, so `Server-Timing` can carry `ttft`. Bills input and output tokens, with the admission and limits of chat completions (the estimated prompt plus `max_output_tokens`, else 512 tokens, settled with the real counts; an abandoned stream is billed to its last token).
/v1/infer/responses
Authentication
Request Body required
application/jsonmodel
string
REQUIRED
input
string | (object | object | object | object)[]
REQUIRED
type
string | null
message, nullrole
string
REQUIRED
user, assistant, system, developercontent
string | (object | object | object | object)[]
REQUIRED
id
string | null
status
string | null
phase
string | null
type
string
REQUIRED
function_callcall_id
string
REQUIRED
name
string
REQUIRED
arguments
string
REQUIRED
id
string | null
status
string | null
caller
object | null
namespace
string | null
async
boolean | null
type
string
REQUIRED
function_call_outputcall_id
string
REQUIRED
output
string | (object | object)[]
REQUIRED
id
string | null
status
string | null
caller
object | null
name
string | null
namespace
string | null
type
string
REQUIRED
reasoningid
string | null
summary
object[] | null
type
string
REQUIRED
reasoning_text, summary_texttext
string
REQUIRED
content
object[] | null
type
string
REQUIRED
reasoning_text, summary_texttext
string
REQUIRED
encrypted_content
string | null
status
string | null
instructions
string | null
max_output_tokens
integer | null
temperature
number | null
top_p
number | null
tools
object[] | null
type
string
REQUIRED
functionname
string
REQUIRED
description
string | null
parameters
object | null
strict
boolean | null
allowed_callers
string[] | null
defer_loading
boolean | null
false, nulloutput_schema
object | null
tool_choice
string | null | object
type
string
REQUIRED
functionname
string
REQUIRED
parallel_tool_calls
boolean | null
text
object | null
format
object | null
type
string
REQUIRED
text, json_object, json_schemaname
string
schema
object
description
string | null
strict
boolean | null
verbosity
string | null
low, medium, high, nullreasoning
object | null
effort
string | null
none, minimal, low, medium, high, xhigh, nullsummary
string | null
auto, concise, detailed, nullgenerate_summary
string | null
auto, concise, detailed, nullstream
boolean | null
stream_options
object | null
include_obfuscation
boolean | null
store
boolean | null
metadata
object | null
user
string | null
safety_identifier
string | null
prompt_cache_key
string | null
service_tier
string | null
truncation
string | null
disabled, nullbackground
boolean | null
false, nullinclude
string[] | null
previous_response_id
string | null
nullconversation
string | null
nullprompt
object | null
nulltop_logprobs
integer | null
nullmax_tool_calls
integer | null
nullResponses
application/jsonid
string
REQUIRED
object
string
REQUIRED
responsecreated_at
integer
REQUIRED
completed_at
integer
status
string
REQUIRED
in_progress, completed, incomplete, failedbackground
boolean
error
object | null
incomplete_details
object | null
reason
string
instructions
string | null
max_output_tokens
integer | null
model
string
REQUIRED
output
(object | object | object)[]
REQUIRED
type
string
REQUIRED
messageid
string
REQUIRED
status
string
REQUIRED
in_progress, completed, incompleterole
string
REQUIRED
assistantcontent
object[]
REQUIRED
type
string
REQUIRED
output_texttext
string
REQUIRED
annotations
object[] | null
logprobs
object[] | null
type
string
REQUIRED
reasoningid
string
REQUIRED
status
string
in_progress, completed, incompletesummary
object[]
REQUIRED
type
string
REQUIRED
reasoning_text, summary_texttext
string
REQUIRED
content
object[]
type
string
REQUIRED
reasoning_text, summary_texttext
string
REQUIRED
type
string
REQUIRED
function_callid
string
REQUIRED
status
string
REQUIRED
in_progress, completed, incompletecall_id
string
REQUIRED
name
string
REQUIRED
arguments
string
REQUIRED
parallel_tool_calls
boolean
previous_response_id
string | null
nullreasoning
object
store
boolean
falsetemperature
number | null
text
object
tool_choice
unknown
tools
object[]
top_p
number | null
truncation
string
metadata
object
usage
object | null
input_tokens
integer
REQUIRED
input_tokens_details
object
REQUIRED
cached_tokens
integer
cache_write_tokens
integer
output_tokens
integer
REQUIRED
output_tokens_details
object
REQUIRED
reasoning_tokens
integer
total_tokens
integer
REQUIRED
b3os
object
route
string
local, gatewaynode
string
timing
object
ttft_ms
number
model_ms
number
total_ms
number
curl -X POST 'https://beta-api.b3os.org/v1/infer/responses' \ -H 'Authorization: Bearer YOUR_API_TOKEN' \ -H 'Content-Type: application/json' \ -d '{ "model": "string", "input": "string", "instructions": "string", "max_output_tokens": 1, "temperature": 0, "top_p": 0, "tools": [ { "type": "function", "name": "string", "description": "string", "parameters": {}, "strict": true, "allowed_callers": [ "direct" ], "defer_loading": false, "output_schema": {} } ], "tool_choice": "none", "parallel_tool_calls": true, "text": { "format": { "type": "text", "name": "string", "schema": {}, "description": "string", "strict": true }, "verbosity": "low" }, "reasoning": { "effort": "none", "summary": "auto", "generate_summary": "auto" }, "stream": true, "stream_options": { "include_obfuscation": true }, "store": true, "metadata": {}, "user": "string", "safety_identifier": "string", "prompt_cache_key": "string", "service_tier": "string", "truncation": "disabled", "background": false, "include": [ "reasoning.encrypted_content" ], "previous_response_id": null, "conversation": null, "prompt": null, "top_logprobs": null, "max_tool_calls": null}'
const response = await fetch('https://beta-api.b3os.org/v1/infer/responses', { method: 'POST', headers: { "Authorization": "Bearer YOUR_API_TOKEN", "Content-Type": "application/json" }, body: JSON.stringify({ "model": "string", "input": "string", "instructions": "string", "max_output_tokens": 1, "temperature": 0, "top_p": 0, "tools": [ { "type": "function", "name": "string", "description": "string", "parameters": {}, "strict": true, "allowed_callers": [ "direct" ], "defer_loading": false, "output_schema": {} } ], "tool_choice": "none", "parallel_tool_calls": true, "text": { "format": { "type": "text", "name": "string", "schema": {}, "description": "string", "strict": true }, "verbosity": "low" }, "reasoning": { "effort": "none", "summary": "auto", "generate_summary": "auto" }, "stream": true, "stream_options": { "include_obfuscation": true }, "store": true, "metadata": {}, "user": "string", "safety_identifier": "string", "prompt_cache_key": "string", "service_tier": "string", "truncation": "disabled", "background": false, "include": [ "reasoning.encrypted_content" ], "previous_response_id": null, "conversation": null, "prompt": null, "top_logprobs": null, "max_tool_calls": null })});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.post('https://beta-api.b3os.org/v1/infer/responses', headers=headers, json={ "model": "string", "input": "string", "instructions": "string", "max_output_tokens": 1, "temperature": 0, "top_p": 0, "tools": [ { "type": "function", "name": "string", "description": "string", "parameters": {}, "strict": true, "allowed_callers": [ "direct" ], "defer_loading": false, "output_schema": {} } ], "tool_choice": "none", "parallel_tool_calls": true, "text": { "format": { "type": "text", "name": "string", "schema": {}, "description": "string", "strict": true }, "verbosity": "low" }, "reasoning": { "effort": "none", "summary": "auto", "generate_summary": "auto" }, "stream": true, "stream_options": { "include_obfuscation": true }, "store": true, "metadata": {}, "user": "string", "safety_identifier": "string", "prompt_cache_key": "string", "service_tier": "string", "truncation": "disabled", "background": false, "include": [ "reasoning.encrypted_content" ], "previous_response_id": null, "conversation": null, "prompt": null, "top_logprobs": null, "max_tool_calls": null})print(response.json())
{ "id": "resp_01m5t5tmscqev5tf32q87tr1v5", "object": "response", "created_at": 1793001600, "completed_at": 1793001601, "status": "completed", "background": false, "error": null, "incomplete_details": null, "instructions": "You are a concise assistant.", "max_output_tokens": null, "model": "b3os/qwen3.5-9b", "output": [ { "type": "function_call", "id": "fc_01m5t5tmscqev5tf32q87tr1v5_0", "status": "completed", "call_id": "call_7f3a", "name": "get_weather", "arguments": "{\"city\":\"Eugene\"}" } ], "parallel_tool_calls": true, "previous_response_id": null, "reasoning": { "effort": null, "summary": null }, "store": false, "temperature": null, "text": { "format": { "type": "text" }, "verbosity": "medium" }, "tool_choice": "auto", "tools": [ { "type": "function", "name": "get_weather", "description": "Current weather for a city.", "parameters": { "type": "object", "properties": { "city": { "type": "string" } }, "required": [ "city" ] }, "strict": true } ], "top_p": null, "truncation": "disabled", "metadata": {}, "usage": { "input_tokens": 182, "input_tokens_details": { "cached_tokens": 0, "cache_write_tokens": 0 }, "output_tokens": 18, "output_tokens_details": { "reasoning_tokens": 0 }, "total_tokens": 200 }, "b3os": { "route": "local", "node": "n1", "timing": { "model_ms": 96.4, "total_ms": 97.1 } }}
Try this endpoint
/v1/infer/responses