Responses
Send input and instructions. Receive a response containing typed output items.
POST/openai/v1/responses
Create a response
Use your OpenAI key and model gpt-5.6-luna. For a simple request, input can be a string.
curl · whole response
curl "https://proxy.litechat.ai/openai/v1/responses" \
-H "Authorization: Bearer $BUILD_OPENAI_KEY" \
-H "Content-Type: application/json" \
--data '{
"model": "gpt-5.6-luna",
"input": "Say hello in one sentence.",
"max_output_tokens": 128,
"reasoning": {"effort": "none"},
"store": false
}'
Read output items
Check status, then inspect output. A message item can contain an output_text part. Other items can represent reasoning or tool calls. In the Python SDK, response.output_text is a convenience accessor, not a top-level REST field.
Illustrative whole response · selected fields
{
"id": "resp_example",
"object": "response",
"model": "gpt-5.6-luna",
"status": "completed",
"output": [{
"id": "msg_example",
"type": "message",
"role": "assistant",
"status": "completed",
"content": [{"type": "output_text", "text": "Hello! How can I help?", "annotations": []}]
}],
"usage": {"input_tokens": 12, "output_tokens": 8, "total_tokens": 20}
}
IDs, text, and usage are illustrative. incomplete and failed are distinct from completed. A completed response can still require a tool action.
Common parameters
inputandinstructions- Use a string or input items, with optional instructions. Send the required conversation and tool history in subsequent requests. Stored response retrieval and
previous_response_idare not supported. max_output_tokensandreasoning- Set an output limit and an effort level. Use
{"effort":"none"}to disable reasoning, as in the example. text.format- Select text, JSON object, or JSON Schema output. Generated schema output is validated. Use local schema references.
tools,store, andbackground- Your backend executes function tools and returns results with the same call IDs. Hosted search and code execution are unavailable. Use
falsefor storage and background options; stored and background responses are unsupported.
Streaming
Add "stream": true to the request body above and pass --no-buffer to curl. SSE events have a type; text increments use response.output_text.delta. Check the terminal response.completed, response.incomplete, or response.failed event and handle errors or interruptions. There is no [DONE] sentinel.
See the OpenAI Responses streaming reference.