Responses
POST /v1/responses gives you the newer OpenAI Responses API style in a single endpoint.
Use it when
- You want a unified input/output shape
- Your app already uses OpenAI Responses
- You want schema-driven text output and reasoning controls
Code examples
1curl -X POST https://api.navy/v1/responses \
2 -H "Authorization: Bearer sk-navy-YOUR_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "gpt-5",
6 "input": "Summarize the changelog in four bullets."
7 }'Parameters
model(string, required) — Model ID to useinput(string or array, required) — Prompt or array of input itemsstream(boolean, optional) — Stream response as SSEinstructions(string, optional) — System-level instructionstools(array, optional) — Function tool definitionstool_choice(string or object, optional) —"auto","none","required"temperature(number, optional) — 0.0–2.0top_p(number, optional) — Nucleus sampling thresholdmax_output_tokens(integer, optional) — Maximum tokens to generatereasoning(object, optional) — Reasoning controls for thinking models (e.g.{ "effort": "high" })text(object, optional) — Text format controls including JSON schema
Streaming
Set "stream": true to receive an SSE stream of typed events like response.output_text.delta, response.output_item.added, and response.completed.
1from openai import OpenAI
2
3client = OpenAI(api_key="sk-navy-YOUR_KEY", base_url="https://api.navy/v1")
4
5with client.responses.stream(
6 model="gpt-5",
7 input="Stream a one-paragraph product update."
8) as stream:
9 for event in stream:
10 if event.type == "response.output_text.delta":
11 print(event.delta, end="", flush=True)Built-in tools
NavyAI accepts user-defined function tools on every model. Native OpenAI-owned models also support the OpenAI built-in tools (image_generation, code_interpreter, file_search, computer_use_preview, mcp); xAI models additionally support web_search_preview. When you call a non-native model with one of these built-in tools, NavyAI strips it from the request so the call still succeeds against the underlying provider.
The web_search / web_search_preview tool is always available — when used, it adds a small fixed surcharge to your token usage for that request.
Reasoning controls
Thinking models accept a reasoning object with an effort field ("minimal", "low", "medium", "high", "xhigh") to bias the depth of internal reasoning before the final answer.
1{
2 "model": "gpt-5",
3 "input": "Plan a launch checklist.",
4 "reasoning": { "effort": "high" }
5}Notes
- OpenAI-owned models are forwarded to the native OpenAI Responses API for full fidelity
- xAI-owned models are forwarded to xAI's native Responses-compatible endpoint
- Non-OpenAI / non-xAI models are adapted under the hood and returned in a compatible response shape
- The following fields are silently stripped before forwarding:
n,service_tier,background,user,safety_identifier,prompt_cache_key,prompt_cache_retention,metadata,context_management,plugins,provider