POST /v1/infer/responses
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).

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)

Request Body required

application/json
model string REQUIRED
input string | (object | object | object | object)[] REQUIRED
Any of:
Option 1string
Option 2
Array of:
Any of:
Option 1
type string | null
Enum: message, null
role string REQUIRED
Enum: user, assistant, system, developer
content string | (object | object | object | object)[] REQUIRED
Any of:
Option 1string
Option 2
Array of: ...
id string | null
status string | null
phase string | null
Option 2
type string REQUIRED
Enum: function_call
call_id string REQUIRED
name string REQUIRED
arguments string REQUIRED
id string | null
status string | null
caller object | null
namespace string | null
async boolean | null
Accepted and ignored.
Option 3
type string REQUIRED
Enum: function_call_output
call_id string REQUIRED
output string | (object | object)[] REQUIRED
Any of:
Option 1string
Option 2
Array of: ...
id string | null
status string | null
caller object | null
name string | null
namespace string | null
Option 4
type string REQUIRED
Enum: reasoning
id string | null
summary object[] | null
Array of:
type string REQUIRED
Enum: reasoning_text, summary_text
text string REQUIRED
content object[] | null
Array of:
type string REQUIRED
Enum: reasoning_text, summary_text
text string REQUIRED
encrypted_content string | null
status string | null
instructions string | null
max_output_tokens integer | null
temperature number | null
top_p number | null
Nucleus sampling. `0` keeps only the most probable token (passed to the runtime as 1e-9, the same thing, since vLLM takes values above 0 only).
tools object[] | null
Array of:
type string REQUIRED
Enum: function
name string REQUIRED
Unique within `tools`.
description string | null
parameters object | null
A JSON Schema object (at most 64 KiB serialized and 32 levels deep); absent means no arguments.
strict boolean | null
allowed_callers string[] | null
Array of: string
defer_loading boolean | null
Enum: false, null
output_schema object | null
Accepted (a JSON Schema object) and ignored.
tool_choice string | null | object
Any of:
Option 1string | null
Option 2
type string REQUIRED
Enum: function
name string REQUIRED
parallel_tool_calls boolean | null
text object | null
format object | null
type string REQUIRED
Enum: text, json_object, json_schema
name string
Required with `json_schema`.
schema object
`json_schema` only: the JSON Schema the answer matches (at most 64 KiB and 32 levels).
description string | null
strict boolean | null
verbosity string | null
Accepted and ignored.
Enum: low, medium, high, null
reasoning object | null
effort string | null
`low` and above turn the reasoning phase on; unset, `none` and `minimal` leave it off.
Enum: none, minimal, low, medium, high, xhigh, null
summary string | null
Accepted and ignored.
Enum: auto, concise, detailed, null
generate_summary string | null
Accepted and ignored.
Enum: auto, concise, detailed, null
stream boolean | null
stream_options object | null
include_obfuscation boolean | null
Accepted and ignored.
store boolean | null
Accepted and ignored; nothing is stored.
metadata object | null
Echoed in the response.
user string | null
safety_identifier string | null
prompt_cache_key string | null
service_tier string | null
truncation string | null
`auto` is refused: the node never drops input items.
Enum: disabled, null
background boolean | null
Enum: false, null
include string[] | null
Array of: string
previous_response_id string | null
Null only: responses are not stored; send the conversation as `input`.
Enum: null
conversation string | null
Null only.
Enum: null
prompt object | null
Null only.
Enum: null
top_logprobs integer | null
Null only.
Enum: null
max_tool_calls integer | null
Null only.
Enum: null

Responses

200 The response, or the event stream with `stream: true`.
application/json
id string REQUIRED
object string REQUIRED
Enum: response
created_at integer REQUIRED
completed_at integer
status string REQUIRED
Enum: in_progress, completed, incomplete, failed
background 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
Array of:
Any of:
Option 1
type string REQUIRED
Enum: message
id string REQUIRED
status string REQUIRED
Enum: in_progress, completed, incomplete
role string REQUIRED
Enum: assistant
content object[] REQUIRED
Array of:
type string REQUIRED
Enum: output_text
text string REQUIRED
annotations object[] | null
Array of: ...
logprobs object[] | null
Array of: ...
Option 2
type string REQUIRED
Enum: reasoning
id string REQUIRED
status string
Enum: in_progress, completed, incomplete
summary object[] REQUIRED
Array of:
type string REQUIRED
Enum: reasoning_text, summary_text
text string REQUIRED
content object[]
Array of:
type string REQUIRED
Enum: reasoning_text, summary_text
text string REQUIRED
Option 3
type string REQUIRED
Enum: function_call
id string REQUIRED
status string REQUIRED
Enum: in_progress, completed, incomplete
call_id string REQUIRED
name string REQUIRED
arguments string REQUIRED
parallel_tool_calls boolean
previous_response_id string | null
Enum: null
reasoning object
store boolean
Enum: false
temperature number | null
text object
tool_choice unknown
tools object[]
Array of: 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
B3OS extension; OpenAI SDKs ignore it. On a stream it rides on the last chunk: the usage chunk with `stream_options.include_usage`, else the chunk with `finish_reason`.
route string
Enum: local, gateway
node string
timing object
Server-side milliseconds from the request head (`ttft_ms` on streams, `model_ms` without).
ttft_ms number
model_ms number
total_ms number
400 The request is invalid (`invalid_request`, `unsupported_parameter`, `context_length_exceeded`).
401 Missing or invalid credentials (`unauthorized`).
403 The key lacks `infer:run` or `infer:read` (`forbidden`), or the egress guard refused an image URL (`egress_denied`).
404 The model is not served on this node (`model_not_available`).
413 The request body exceeds the model's `max_request_bytes` (`payload_too_large`).
415 The body is not JSON (`unsupported_media_type`): send `Content-Type: application/json`.
429 A limit applies (`rate_limited` for requests, tokens or remote image bytes per minute, `concurrency_limited` for requests in flight for the organization, `quota_exceeded`; `credits_exhausted` arrives as 402).
500 Something failed inside B3OS (`internal`).
503 The model runtime, the voice service or the B3IQ gateway route is restarting, overloaded or not set up on this node (`infer_backend_unavailable`, `capacity_unavailable`), or the node is unavailable (`node_unavailable`).
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())
200 Response
{  "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    }  }}
Ask a question... ⌘I