chat

Create a response

Changed on

Creates a model response using the Responses API format.

post/api/v1/responses

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/v1/responses
  • Auth: HTTP bearer

Request body

backgroundboolean nullable

Run in background

context_managementobject[]

Context management directives. Forwarded verbatim to providers that support server-side compaction (OpenAI, Azure OpenAI); for others the field is ignored at the adapter layer. See OpenAI's compaction guide for the schema; the canonical entry is {"type": "compaction", "compact_threshold": <tokens>}.

frequency_penaltynumber double nullable

Hadrian Extension: Frequency penalty (-2.0 to 2.0)

includestring[]

Items to include in response.

Hadrian Extension: also accepts "usage.incremental", which emits cumulative response.usage.updated SSE events at server-tool turn boundaries (stripped before forwarding upstream).

inputobject

Input messages/items

instructionsstring nullable

System instructions

max_output_tokensnumber double nullable

Maximum output tokens

metadataobject

Request metadata

modelstring nullable

Model to use

modelsstring[] nullable

Hadrian Extension: List of models for multi-model routing (alternative to single model)

parallel_tool_callsboolean nullable

Allow parallel tool calls

pluginsobject[]

Hadrian Extension: Plugins to enable for this request

presence_penaltynumber double nullable

Hadrian Extension: Presence penalty (-2.0 to 2.0)

previous_response_idstring nullable

Previous response ID for conversation continuation

promptobject

Prompt template reference

prompt_cache_keystring nullable

Prompt cache key

providerobject

Hadrian Extension: Provider routing configuration

reasoningobject

Reasoning configuration

safety_identifierstring nullable

Safety identifier

service_tierobject

Service tier

skillsobject[]

Hadrian Extension: Skills to mount into the shell-tool session. Hadrian treats skills as a top-level request field rather than threading them through the OpenAI shell-tool environment block, so they're accepted on every responses request regardless of whether the upstream provider has its own skills surface.

Mirrors OpenAI's typed shape — each entry is either a reference to a stored skill or an inline bundle:

[
  {"type": "skill_reference", "skill_id": "skill_…", "version": "latest"},
  {"type": "inline", "name": "extract-csv", "description": "...",
   "source": {"type": "base64", "media_type": "text/markdown", "data": "..."}}
]

For skill_reference, skill_id is a prefixed id (skill_…), a bare UUID, or the skill's name slug, owned by the caller's org. version is optional: omit for the skill's default version, "latest" for the newest, or a positive integer for that exact version (default and latest can differ).

For inline, the decoded source.data is mounted as an ephemeral skill bundle: text/markdown is treated as the SKILL.md content; other media types are rejected today. The name must be a lowercase slug — it becomes the mount directory.

Each resolved skill's SKILL.md is prepended to instructions so the model knows the skill is available; all skill files are materialized under /skills/<name>-<version>/ (stored skills) or /skills/<name>/ (inline skills) inside the sandbox. The path mirrors OpenAI's <name>-<version> container layout under Hadrian's /skills root.

storeboolean nullable

Store response

streamboolean

Enable streaming

temperaturenumber double nullable

Sampling temperature (0.0 to 2.0)

textobject

Text configuration

tool_choiceobject

Tool choice configuration

top_knumber double nullable

Hadrian Extension: Top-k sampling (supported by some providers like Anthropic)

top_pnumber double nullable

Nucleus sampling probability (0.0 to 1.0)

truncationobject

Truncation strategy

userstring nullable

User identifier for abuse detection

Response

Response object (streaming or non-streaming)

Changes

    • info

      added the new optional request property

    • breaking

      the / request property type changed from object to no type

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      the request property became nullable

    • info

      added to the / request property oneOf list