Responses

Create response (OpenAI Responses API)

Creates a response using the OpenAI Responses API request shape. The model details must advertise the Responses request format and the model must be available. Unknown fields are accepted on a best-effort basis; model-specific support is not guaranteed.

post/v1/responses

Request

  • Base URL: https://api.tokenlab.sh
  • URL: https://api.tokenlab.sh/v1/responses
  • Auth: HTTP bearer

Headers

X-TokenLab-Delivery-Policy'auto' | 'verified' | 'official'

Per-request Delivery policy. Overrides the API key and Workspace defaults. Auto tries TokenLab Verified first and may switch once to Official only before output, request acceptance, or persistent resource creation.

Request body

modelstring required

Model to use

inputstring

Single string input.

instructionsstring

System instructions

max_output_tokensinteger

Maximum output tokens

temperaturenumber
streamboolean
toolsobject[]

Tools available to the model. Tool types and combinations are validated by the selected service.

includestring[]

Additional response sections to include when supported.

service_tierstring nullable

TokenLab serves this request at the standard service tier. auto and default are forwarded. Other values, such as flex, priority, fast and ultrafast, are ignored and billed at the standard price.

truncationstring

Truncation strategy for long conversations.

backgroundboolean

Whether to run the response asynchronously.

previous_response_idstring

ID of a previous response to continue.

promptobject

Reference to a reusable prompt template and variables.

storeboolean

Whether the response is stored for later retrieval.

reasoningobject

Reasoning configuration.

top_pnumber

Nucleus sampling probability.

parallel_tool_callsboolean

Whether the model may issue parallel tool calls.

metadataobject

Request metadata.

textobject

Text formatting options.

Response

Successful response

Changes

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