POST /v1/responses accepts the OpenAI Responses request shape. It organizes content as input and typed output items and is useful for clients that need newer tool, multimodal, or reasoning fields.
Endpoints
POST /v1/responses
POST /v1/responses/compact
/v1/responses/compact requests a compacted response. Availability and retained fields depend on the selected model and channel, so validate its output shape before production use.
Basic request
curl https://api.nbility.ai/v1/responses \
-H "Authorization: Bearer $NBILITY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.4",
"input": "Explain API gateways in one sentence."
}'
Python SDK
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["NBILITY_API_KEY"],
base_url="https://api.nbility.ai/v1",
)
response = client.responses.create(
model="gpt-5.4",
instructions="Be accurate and concise.",
input="Explain API gateways in one sentence.",
)
print(response.output_text)
Common fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | yes | A model ID that supports Responses |
input | string | array | yes | A string or typed input items |
instructions | string | no | High-priority instructions for this response |
stream | boolean | no | Returns incremental events |
max_output_tokens | integer | no | Maximum output tokens |
tools | array | no | Tool definitions; support varies by model and channel |
previous_response_id | string | no | Continues a previous response only when that backend supports and retains the state |
Text normally appears inside message content in the output array. The official SDK exposes an output_text convenience property, but custom clients should traverse typed output items and handle tool calls, refusals, and other non-text items.
Built-in tools, server-side state continuation, and reasoning fields are not universal across compatible channels. For the broadest compatibility, use Chat Completions.