Create response
curl https://api.waibee.com/v1/responses \ -H "Authorization: Bearer $WAIBEE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "openai/gpt-5.1-codex", "input": "Hello!" }'from openai import OpenAI
client = OpenAI(base_url="https://api.waibee.com/v1", api_key="sk_live_...")resp = client.responses.create( model="openai/gpt-5.1-codex", input="Hello!",)print(resp.output_text)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.waibee.com/v1", apiKey: process.env.WAIBEE_API_KEY,});const resp = await client.responses.create({ model: "openai/gpt-5.1-codex", input: "Hello!",});console.log(resp.output_text);OpenAI-compatible Responses call. Send the conversation as input,
receive one response with its output items. Set stream: true for a
Server-Sent Events stream of named events.
Stateless: the four fields that ask the server to remember the
conversation for you are refused with feature_not_supported (400):
store: true, previous_response_id, conversation and
background: true. Send the whole conversation in input instead.
The built-in {"type": "web_search"} tool is executed by the router.
Each search is billed on top of tokens, and the answer carries a
waibee:web_search item naming the query and the sources.
Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Stateless subset of the Responses format. store: true,
previous_response_id, conversation and background: true are
refused with feature_not_supported (400): send the whole conversation
in input instead.
object
<provider>/<model> from GET /v1/models. waibee/auto lets the router pick.
object
System prompt for this call.
Stream the response as named Server-Sent Events.
Cap on the answer. It covers the whole request including the rounds a web search adds, not each round separately.
Function definitions (max 256), and the built-in
{"type": "web_search"}, which the router executes itself.
object
Reasoning controls, e.g. {"effort": "low"}.
object
Per-request plugins.
object
Data-loss-prevention scan, mask or block. Optional: a DLP policy set for your API key applies as a floor of strictness even when this object is absent, and this object can only make the check stricter. entity_types is unioned with the policy’s categories, so the scan may be wider than the list you send.
object
Applies to the rules you declare yourself. Where the key’s policy declares the same rule, the stricter of the two modes wins; the policy’s own categories keep the mode the administrator set.
Unioned with the categories of the key’s policy, never narrowing them.
Which messages’ findings come back to you. Narrowing it does not narrow the scan: every message is still scanned, and the block decision counts every finding.
Values that are a finding on their own, whatever the categories say. Unioned with the key’s policy.
object
Exceptions, matched on the whole value only. They reach your own rules only: an exception never lifts a finding raised by a rule of the key’s policy. Within your own config a stop word beats an exception on the same value.
object
Exact only. A substring exception would exempt every lookalike containing it.
Named patterns, run by RE2. Unioned with the key’s policy.
object
Marks a message as inserted by the platform rather than typed by a person, by the value of its name field, and takes it out of the scan. Ignored while a policy applies to your key: on this path the same caller supplies both the marker and the content, so it would be a way to opt out of the check.
Reserved, and currently changes nothing: alert reports the findings and forwards the request, so there is no hold to confirm.
Only false is accepted; true is refused as unsupported.
Responses
Заголовок раздела «Responses»Model response.
One response. output carries the items the model produced: reasoning,
messages, function calls, and a waibee:web_search item for each search
the router ran.
object
completed, or incomplete when the answer was cut short. The
reason is in incomplete_details.reason.
Present when status is incomplete.
object
object
input_tokens, output_tokens, total_tokens, summed over every round.
object
Example
{ "id": "resp_b6dc6e06093b437394bc2005fcfaff25", "object": "response", "status": "completed"}Invalid request. Codes: validation_error, feature_not_supported.
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "invalid_request_error", "code": "feature_not_supported", "message": "'store' is not supported: this endpoint is stateless. Send the whole conversation in `input`.", "param": "store" }}Missing or invalid API key.
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "authentication_error", "code": "invalid_api_key", "message": "Invalid API key" }}Request refused. The code names the reason: insufficient_funds, policy_violation, dlp_violation, model_not_found, payload_too_large, rate_limited.
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "invalid_request_error", "code": "model_not_found", "message": "Model is not available" }}Request refused. The code names the reason: insufficient_funds, policy_violation, dlp_violation, model_not_found, payload_too_large, rate_limited.
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "invalid_request_error", "code": "model_not_found", "message": "Model is not available" }}Request refused. The code names the reason: insufficient_funds, policy_violation, dlp_violation, model_not_found, payload_too_large, rate_limited.
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "invalid_request_error", "code": "model_not_found", "message": "Model is not available" }}Upstream trouble: provider_timeout (408), provider_unavailable (502), service_unavailable and dlp_unavailable (503).
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "api_error", "code": "provider_unavailable", "message": "Provider unavailable" }}Request refused. The code names the reason: insufficient_funds, policy_violation, dlp_violation, model_not_found, payload_too_large, rate_limited.
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "invalid_request_error", "code": "model_not_found", "message": "Model is not available" }}Invalid request. Codes: validation_error, feature_not_supported.
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "invalid_request_error", "code": "feature_not_supported", "message": "'store' is not supported: this endpoint is stateless. Send the whole conversation in `input`.", "param": "store" }}Request refused. The code names the reason: insufficient_funds, policy_violation, dlp_violation, model_not_found, payload_too_large, rate_limited.
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "invalid_request_error", "code": "model_not_found", "message": "Model is not available" }}Upstream trouble: provider_timeout (408), provider_unavailable (502), service_unavailable and dlp_unavailable (503).
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "api_error", "code": "provider_unavailable", "message": "Provider unavailable" }}Upstream trouble: provider_timeout (408), provider_unavailable (502), service_unavailable and dlp_unavailable (503).
Responses-format error envelope (used by POST /v1/responses).
object
object
Coarse category, e.g. invalid_request_error, authentication_error.
The field the request was rejected for, when one field is to blame.
object
Example
{ "error": { "type": "api_error", "code": "provider_unavailable", "message": "Provider unavailable" }}