Responses

Creates a stateless model response.

Changed on

Creates a stateless OpenAI-compatible response. Supports text generation, streaming, and function tools. Do not send store=true, previous_response_id, background=true, or hosted tools.

post/openai/{region}/v1/responses

Request

  • Base URL
    https://api.langdock.com
  • URL
    https://api.langdock.com/openai/{region}/v1/responses
  • Auth
    HTTP bearer

Path parameters

region'eu' | 'us' | 'global' | 'ch' required

The region of the API to use.

Request body

modelstring required

The model ID. Use the models endpoint to list models available in your workspace.

instructionsstring nullable

Instructions added to the model context.

max_output_tokensinteger nullable

The maximum number of output tokens.

temperaturenumber nullable

Controls response randomness.

top_pnumber nullable

Controls nucleus sampling.

streamboolean nullable

Whether to return native Responses API server sent events.

parallel_tool_callsboolean nullable

Whether the model can return multiple function calls.

reasoningobject

OpenAI Responses reasoning configuration.

textobject

OpenAI Responses text output configuration.

metadataobject nullable

String metadata attached to the request.

storefalse nullable

Responses are not persisted. Omit this field or set it to false.

backgroundfalse nullable

Background responses are not supported.

includestring[] nullable

Additional response fields to include.

truncation'auto' | 'disabled' nullable
service_tierstring nullable

The OpenAI service tier forwarded to the model provider.

Response

Successful response or event stream.

idstring required

Unique identifier for the response.

object'response' required

The object type, which is always response.

created_atinteger required

Unix timestamp in seconds when the response was created.

completed_atinteger nullable

Unix timestamp in seconds when the response completed.

backgroundfalse

Langdock does not support background responses.

status'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete' required

Current response status.

modelstring required

Model used to generate the response.

output_textstring

Aggregated text from all output_text items.

instructionsstring nullable

Instructions used for the response.

max_output_tokensinteger nullable

Maximum number of output tokens configured for the response.

parallel_tool_callsboolean

Whether the model can return multiple function calls.

reasoningobject nullable

Reasoning configuration used for the response.

storefalse

Langdock Responses are never persisted.

temperaturenumber nullable

Sampling temperature used for the response.

textobject nullable

Text output configuration used for the response.

service_tierstring nullable

Service tier used to process the response.

toolsobject[]

Function tools available to the model.

top_pnumber nullable

Nucleus sampling value used for the response.

truncation'auto' | 'disabled'

Truncation strategy used for the response.

metadataobject nullable

Metadata attached to the request.

Example response

{
  "id": "resp_09e99d1f7f163d10016a678387353481",
  "created_at": 1785168775,
  "completed_at": 1785168778,
  "status": "completed",
  "model": "gpt-5-mini-2025-08-07",
  "output": [
    {
      "id": "rs_123"
    }
  ],
  "usage": {
    "input_tokens": 13,
    "output_tokens": 154,
    "output_tokens_details": {
      "reasoning_tokens": 64
    },
    "total_tokens": 167
  }
}

Changes