For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Resources
Log inGet a demo
GuidesModelsAPI reference
GuidesModelsAPI reference
  • API Overview
      • POSTCreate Response

Get started

  • Overview
  • Introduction
  • Unified API
  • Linked Account
  • Merge Link
  • Use cases

Implementation

  • Sandboxes
  • SDKs
  • API access
  • Syncing data
  • Writing data
  • Data minimization
  • Supplemental data
  • Errors
  • Integration metadata

API reference

  • ATS
  • HRIS
  • Accounting
  • Ticketing
  • CRM
  • File Storage
  • Knowledge Base
  • Chat

Resources

  • Help Center
  • Merge.dev
  • Changelog
© Merge 2026Terms of usePrivacy policy
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
API OverviewResponses

Create Response

POST
https://api-gateway.merge.dev/responses
POST
/responses
$curl -X POST https://api-gateway.merge.dev/responses \
> -H "Content-Type: application/json" \
> -d '{
> "input": [
> {
> "type": "message",
> "content": "What is the capital of France?",
> "role": "user"
> }
> ],
> "model": "openai/gpt-5.1"
>}'
1{
2 "id": "resp_a1b2c3d4e5f6",
3 "created_at": "2026-03-23T12:00:00Z",
4 "model": "openai/gpt-5.1",
5 "output": [
6 {
7 "id": "msg_001",
8 "content": [
9 {
10 "type": "text",
11 "text": "The capital of France is Paris. It is the largest city in France and serves as the country's political, economic, and cultural center."
12 }
13 ],
14 "type": "message",
15 "role": "assistant",
16 "finish_reason": "stop"
17 }
18 ],
19 "usage": {
20 "input_tokens": 14,
21 "output_tokens": 28,
22 "total_tokens": 42
23 },
24 "object": "response",
25 "vendor": "openai",
26 "provider_request_id": "chatcmpl-abc123"
27}

Create an LLM response.

Supports both streaming and non-streaming modes via the stream parameter.

Was this page helpful?
Previous

Fetch a single vendor by ID

Next

Create Embedding

Request

This endpoint expects an object.
inputlist of objectsRequired
Conversation history
modelstring or nullOptional

Model ID in format ‘provider/model-name’. Optional if a routing policy is configured.

toolslist of objects or nullOptional
Available tools
tool_choicestring or map from strings to any or nullOptional

Tool choice policy: ‘auto’, ‘none’, ‘required’, or {‘type’: ‘function’, ‘function’: {‘name’: ’…’}}

max_tokensinteger or nullOptional
Maximum tokens to generate
temperaturedouble or nullOptional0-2
Sampling temperature
top_pdouble or nullOptional0-1
Nucleus sampling parameter
stoplist of strings or nullOptional
Stop sequences
response_formatobject or nullOptional
Response format
streambooleanOptionalDefaults to false
Whether to stream the response
tagslist of objects or nullOptional

Tags to attach to this request for categorization (key-value pairs)

project_idstring or nullOptional

Optional project ID (UUID) to associate with this request

routing_policy_idstring or nullOptional

Override the default routing policy (for testing)

include_routing_metadatabooleanOptionalDefaults to false
Include detailed routing metadata in response
vendorstring or nullOptional

Restrict routing to a specific vendor (hosting platform)

vendorslist of strings or nullOptional
Ordered list of acceptable vendors. First available wins.

Response

Successful Response
idstring
created_atdatetime
modelstring

The model that generated the response, in ‘provider/model-name’ format

outputlist of objects
usageobject
Token usage statistics.
object"response"
vendorstring or null
The execution vendor that served the request
provider_request_idstring or null
The upstream provider's request ID
routingobject or null

Routing metadata (only present when include_routing_metadata=true)

Errors

422
Unprocessable Entity Error