OpenAI Responses API
Create stateless model responses for Codex, SDKs, and other OpenAI-compatible clients.
api.langdock.com with your deployment’s base URL: <deployment-url>/api/publicPOST /openai/{region}/v1/responses. Langdock implements the OpenAI Responses request and response shape for the fields listed below, so you can use the OpenAI SDK responses.create method and other Responses-compatible clients with a Langdock API key.
input items and read Responses output items. For integrations that send messages and read choices, use OpenAI Chat Completions.
Supported fields
Pass a string, message items, or tool results ininput. Langdock forwards supported values for instructions, max_output_tokens, temperature, top_p, reasoning, text, metadata, include, truncation, service_tier, tools, tool_choice, and parallel_tool_calls. The endpoint supports native server-sent event streaming and function tools, including parallel function calls. Which settings apply depends on the selected model.
The {region} path value must be eu, us, or global, and must match a region where your model is available. Call GET /openai/{region}/v1/models with the same region to list models available in your workspace. The list may differ when your workspace uses Bring your own key (BYOK).
Differences from the OpenAI API
- Omit
storeor set it tofalse.store=trueis rejected. previous_response_idis not supported and is rejected. Pass previous messages and tool results ininput.- Background responses are not supported. Omit
backgroundor set it tofalse. - Hosted tools such as web search, file search, code interpreter, image generation, computer use, and MCP are not supported.
- Function tools are supported, including parallel function calls.
Using the OpenAI Python library
Set Langdock as the base URL and useresponses.create:
Stream a response
Setstream=True to receive native Responses API events:
Continue a stateless tool conversation
Append the returned output items and the matchingfunction_call_output to the next request:
Connect Codex
Create a personal API key, then open Connect your tools > Codex on Settings > Account > API keys. Choose an available OpenAI-compatible model and follow the generated setup steps for your operating system. The setup points Codex at Langdock’s Responses endpoint (wire_api = "responses") and your selected model.
Rate limits
The default limits are 500 RPM (requests per minute) and 60,000 TPM (tokens per minute).- RPM is enforced per workspace, model, and API key.
- TPM is shared by all API keys using the same model in a workspace.
- On dedicated deployments, admins can configure custom limits per model in Settings > Workspace > Products > API.
429 Too Many Requests. Successful and rate-limited responses include x-ratelimit-limit-requests, x-ratelimit-limit-tokens, x-ratelimit-remaining-requests, and x-ratelimit-remaining-tokens.
Personal API key usage counts toward the member’s extra usage budget together with chat and agent usage. Workspace API key usage counts toward the workspace API spend limit. See Personal API keys and Pricing.
Authorizations
API key as Bearer token. Format "Bearer YOUR_API_KEY"
Path Parameters
The region of the API to use.
eu, us, global Body
The model ID. Use the models endpoint to list models available in your workspace.
The input text or full conversation state to process.
Instructions added to the model context.
The maximum number of output tokens.
x >= 1Controls response randomness.
Controls nucleus sampling.
Whether to return native Responses API server sent events.
Function tool definitions. Hosted tools are not supported.
Controls whether the model can call a function.
none, auto, required Whether the model can return multiple function calls.
OpenAI Responses reasoning configuration.
OpenAI Responses text output configuration.
String metadata attached to the request.
Responses are not persisted. Omit this field or set it to false.
false Background responses are not supported.
false Additional response fields to include.
auto, disabled The OpenAI service tier forwarded to the model provider.
Response
Successful response or event stream.
A response returned by the OpenAI-compatible Responses endpoint.
Unique identifier for the response.
"resp_09e99d1f7f163d10016a678387353481"
The object type, which is always response.
response Unix timestamp in seconds when the response was created.
1785168775
Current response status.
completed, failed, in_progress, cancelled, queued, incomplete "completed"
Model used to generate the response.
"gpt-5-mini-2025-08-07"
Output items generated by the model.
Reasoning information generated by a reasoning model.
- Option 1
- Option 2
- Option 3
Unix timestamp in seconds when the response completed.
1785168778
Langdock does not support background responses.
false Aggregated text from all output_text items.
Error information when the response failed.
Details explaining why the response is incomplete.
Instructions used for the response.
Maximum number of output tokens configured for the response.
Whether the model can return multiple function calls.
Reasoning configuration used for the response.
Langdock Responses are never persisted.
false Sampling temperature used for the response.
Text output configuration used for the response.
Service tier used to process the response.
Tool choice used for the response.
Function tools available to the model.
Nucleus sampling value used for the response.
Truncation strategy used for the response.
auto, disabled Token usage for the response.
Metadata attached to the request.