Skip to content

DocsAPI reference

Responses

POST /v1/responses — OpenAI's Responses API, served natively by vLLM, used by Codex CLI and the newer OpenAI SDK helpers.

HTTP
POST https://osarai.xyz/v1/responses

OpenAI's Responses API takes input instead of messages and returns typed output items. Your instance's vLLM serves it natively. It works best with gpt-oss models, for which it is the reference format; with Qwen3.8 prefer Chat Completions for tool calls.

Request

Terminal
curl "https://osarai.xyz/v1/responses" \
  -H "Authorization: Bearer $OSARAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-oss-20b",
    "instructions": "You are a concise assistant.",
    "input": "What is a KV cache?",
    "reasoning": {"effort": "low"}
  }'
FieldNotes
modelYour instance's model id
inputA string, or a list of input items (messages, function call outputs)
instructionsSystem instructions
max_output_tokensCapped at the model's max output; on your own instance, unset means no extra cap
reasoning.effortlow, medium or high
toolsFunction tools ({"type": "function", "name": …, "parameters": …})
streamStream typed events (response.output_text.delta, response.completed, …)
temperature, top_pSampling

Hosted OpenAI tools (web search, file search, code interpreter) and stored conversations (previous_response_id across instances) are not available: each request runs on your instance alone, so send the whole conversation in input.

Response

JSON
{
  "id": "resp_6a1f0c2e9b",
  "object": "response",
  "model": "gpt-oss-20b",
  "status": "completed",
  "output": [
    { "type": "reasoning", "summary": [], "content": [{ "type": "reasoning_text", "text": "Explain briefly…" }] },
    {
      "type": "message",
      "role": "assistant",
      "content": [{ "type": "output_text", "text": "A KV cache stores the attention keys and values…" }]
    }
  ],
  "usage": { "input_tokens": 30, "output_tokens": 96, "total_tokens": 126 }
}

The SDKs' output_text joins the text parts for you.

Used by

Codex CLI speaks only this API to custom providers. Zed can use it per model by turning off chat_completions in the model's capabilities.