responses

Responses Api

Follows the OpenAI Responses API spec: https://platform.openai.com/docs/api-reference/responses

Supports background mode with polling_via_cache for partial response retrieval. When background=true and polling_via_cache is enabled, returns a polling_id immediately and streams the response in the background, updating Redis cache.

# Normal request
curl -X POST http://localhost:4000/v1/responses     -H "Content-Type: application/json"     -H "Authorization: Bearer $LITELLM_MASTER_KEY"     -d '{
    "model": "gpt-4o",
    "input": "Tell me about AI"
}'

# Background request with polling
curl -X POST http://localhost:4000/v1/responses     -H "Content-Type: application/json"     -H "Authorization: Bearer $LITELLM_MASTER_KEY"     -d '{
    "model": "gpt-4o",
    "input": "Tell me about AI",
    "background": true
}'
post/openai/v1/responses

Request

  • Base URL: https://docs.litellm.com.cn (the document declares no server; this is the origin it was published from)
  • URL: https://docs.litellm.com.cn/openai/v1/responses
  • Auth: API key in header x-litellm-api-key

Request body

includestring[] nullable
instructionsstring nullable
max_output_tokensinteger nullable
metadataobject nullable
parallel_tool_callsboolean nullable
previous_response_idstring nullable
storeboolean nullable
backgroundboolean nullable
streamboolean nullable
temperaturenumber nullable
top_pnumber nullable
truncation'auto' | 'disabled' nullable
userstring nullable
service_tierstring nullable
safety_identifierstring nullable
max_tool_callsinteger nullable
prompt_cache_keystring nullable
prompt_cache_retentionstring nullable
top_logprobsinteger nullable
partial_imagesinteger nullable
modelstring required

Response

Successful Response

idstring required
created_atinteger required
errorobject nullable
instructionsstring nullable
metadataobject nullable
modelstring nullable
objectstring nullable
parallel_tool_callsboolean nullable
temperaturenumber nullable
top_pnumber nullable
max_output_tokensinteger nullable
previous_response_idstring nullable
reasoningobject nullable
statusstring nullable
truncation'auto' | 'disabled' nullable
userstring nullable
storeboolean nullable

Changes

No recorded changes to this operation across all 1 revision of this API.