---
title: "Creates a stateless model response."
method: POST
path: "/openai/{region}/v1/responses"
tags: ["Responses"]
---

# Creates a stateless model response.

`POST /openai/{region}/v1/responses`

## Request

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

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.

## Path parameters

- `region` 'eu' | 'us' | 'global' | 'ch', required

## Request body

- object
  - `model` string, required: The model ID. Use the models endpoint to list models available in your workspace.
  - `input` union, required: The input text or full conversation state to process.
    - string
    - unknown[]
      - unknown
    - object
  - `instructions` string, nullable: Instructions added to the model context.
  - `max_output_tokens` integer, nullable: The maximum number of output tokens.
  - `temperature` number, nullable: Controls response randomness.
  - `top_p` number, nullable: Controls nucleus sampling.
  - `stream` boolean, nullable: Whether to return native Responses API server sent events.
  - `tools` object[]: Function tool definitions. Hosted tools are not supported.
    - `type` 'function', required
    - `name` string, required
    - `description` string, nullable
    - `parameters` object, nullable
    - `strict` boolean, nullable
  - `tool_choice` union: Controls whether the model can call a function.
    - 'none' | 'auto' | 'required'
    - object
      - `type` 'function', required
      - `name` string, required
  - `parallel_tool_calls` boolean, nullable: Whether the model can return multiple function calls.
  - `reasoning` object: OpenAI Responses reasoning configuration.
  - `text` object: OpenAI Responses text output configuration.
  - `metadata` object, nullable: String metadata attached to the request.
  - `store` false, nullable: Responses are not persisted. Omit this field or set it to false.
  - `background` false, nullable: Background responses are not supported.
  - `include` string[], nullable: Additional response fields to include.
  - `truncation` 'auto' | 'disabled', nullable
  - `service_tier` string, nullable: The OpenAI service tier forwarded to the model provider.

## Response `200`

Successful response or event stream.

- CreateResponseResponse: A response returned by the OpenAI-compatible Responses endpoint.
  - `id` string, required: Unique identifier for the response.
  - `object` 'response', required: The object type, which is always `response`.
  - `created_at` integer, required: Unix timestamp in seconds when the response was created.
  - `completed_at` integer, nullable: Unix timestamp in seconds when the response completed.
  - `background` false: Langdock does not support background responses.
  - `status` 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete', required: Current response status.
  - `model` string, required: Model used to generate the response.
  - `output` union[], required: Output items generated by the model.
    - union
      - ResponseReasoningItem: Reasoning information generated by a reasoning model.
        - `id` string, required
        - `type` 'reasoning', required
        - `summary` object[], required
        - `content` object[]
        - `encrypted_content` string, nullable: Encrypted reasoning content when requested.
        - `status` 'in_progress' | 'completed' | 'incomplete', nullable
      - ResponseOutputMessage: A message generated by the model.
        - `id` string, required
        - `type` 'message', required
        - `status` 'in_progress' | 'completed' | 'incomplete', required
        - `role` 'assistant', required
        - `content` union[], required
          - union
            - ResponseOutputText: Text generated by the model.
              - …
            - ResponseOutputRefusal: A refusal returned by the model.
              - …
      - ResponseFunctionToolCall: A function call requested by the model.
        - `id` string, required
        - `type` 'function_call', required
        - `status` 'in_progress' | 'completed' | 'incomplete'
        - `call_id` string, required
        - `name` string, required
        - `arguments` string, required: JSON-encoded arguments for the function.
  - `output_text` string: Aggregated text from all `output_text` items.
  - `error` object, nullable: Error information when the response failed.
    - `code` string, nullable
    - `message` string
  - `incomplete_details` object, nullable: Details explaining why the response is incomplete.
    - `reason` 'max_output_tokens' | 'content_filter'
  - `instructions` string, nullable: Instructions used for the response.
  - `max_output_tokens` integer, nullable: Maximum number of output tokens configured for the response.
  - `parallel_tool_calls` boolean: Whether the model can return multiple function calls.
  - `reasoning` object, nullable: Reasoning configuration used for the response.
  - `store` false: Langdock Responses are never persisted.
  - `temperature` number, nullable: Sampling temperature used for the response.
  - `text` object, nullable: Text output configuration used for the response.
  - `service_tier` string, nullable: Service tier used to process the response.
  - `tool_choice` union: Tool choice used for the response.
    - string
    - object
  - `tools` object[]: Function tools available to the model.
  - `top_p` number, nullable: Nucleus sampling value used for the response.
  - `truncation` 'auto' | 'disabled': Truncation strategy used for the response.
  - `usage` ResponseUsage: Token usage for the response.
    - `input_tokens` integer, required
    - `input_tokens_details` object
      - `cached_tokens` integer
    - `output_tokens` integer, required
    - `output_tokens_details` object
      - `reasoning_tokens` integer
    - `total_tokens` integer, required
  - `metadata` object, nullable: Metadata attached to the request.

## Other responses

- `400`: Invalid fields, unsupported features, or an unavailable model.
- `401`: Missing, invalid, or expired API key.
- `403`: API key without the Completion API scope.
- `413`: Request body exceeds 20 MB.
- `429`: Usage or rate limit exceeded.
- `500`: Internal server or upstream provider error.
- `default`: Error returned by the upstream model provider.

## Changes

- **2026-11-03** `c62bf90b4013`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/langdock/apis/langdock-api/changes/openai/:region/v1/responses/post.md)

---

[API](https://skmtc.dev/langdock/apis/langdock-api.md) - [All operations](https://skmtc.dev/langdock/apis/langdock-api/llms.txt) - [OpenAPI document](https://skmtc.dev/langdock/apis/langdock-api/revisions/c62bf90b4013?raw)
