responses

Create Response

Changed on

OpenAI-compatible Responses endpoint.

Supports MCP tool-use loops, sandboxed code execution, and SearXNG web_search in both standalone mode and hybrid mode. Hybrid-mode requests resolve credentials via the platform service and get multi-attempt fallback across the resolved route, tool-loop requests included (fallback applies up to the pre-lock-in point, same as chat).

post/api/v1/responses

Request

  • The document declares no server URL.
  • Auth: one of:
    • API key in header Otari-Key
    • API key in header x-api-key

Headers

Idempotency-Keystring nullable

A unique value, such as a UUID, that makes a non-streaming request safe to retry. A retry with the same key and body returns the original response, request ID and cost without calling the provider or billing again. A retry while the original is still running is answered 409 with Retry-After. Reusing a key for a different body is refused with 422. Ignored for streaming requests, in hybrid mode, and on a deployment without OTARI_SECRET_KEY, which encrypts the stored response.

Request body

backgroundboolean nullable
context_managementobject[] nullable
frequency_penaltynumber nullable
includestring[] nullable
inputunknown required
instructionsstring nullable
max_output_tokensinteger nullable
max_tool_callsinteger nullable
max_tool_iterationsinteger nullable
mcp_server_idsstring[] nullable
metadataobject nullable

Tags for cost attribution, recorded on the request's usage rows and filterable in the usage API: up to 16 string pairs, keys up to 64 characters and values up to 512. A null value is ignored. LiteLLM's nested spend_logs_metadata object is also read, and wins over a flat key of the same name; it is never forwarded to the provider.

modelstring required
parallel_tool_callsboolean nullable
presence_penaltynumber nullable
previous_response_idstring nullable
prompt_cache_keystring nullable
prompt_cache_retentionstring nullable
reasoningobject nullable
response_formatobject nullable
safety_identifierstring nullable
service_tierstring nullable
session_labelstring nullable

Optional caller-supplied label for cost attribution (per run, experiment, or conversation). In hybrid mode it is forwarded onto the platform usage report so spend can be sliced by session without standing up OpenTelemetry. Stripped before the request is forwarded upstream to the provider. Has no effect in standalone mode, where there is no platform to report it to.

storeboolean nullable
streamboolean
stream_optionsobject nullable
temperaturenumber nullable
textunknown
toolsobject[] nullable
tools_headerstring nullable
top_logprobsinteger nullable
top_pnumber nullable
truncationstring nullable
userstring nullable

Response

Successful Response

unknown required

Changes