Create A Response
Header parameters
AuthorizationstringRequiredExample:
sk-lZxzBody
modelstringRequired
instructionsstringRequired
parallel_tool_callsbooleanRequired
max_output_tokensintegerRequired
top_logprobsintegerRequired
max_tool_callsintegerRequired
presence_penaltynumberRequired
frequency_penaltynumberRequired
top_kintegerRequired
modalitiesstring[]Required
prompt_cache_keystringRequired
includestring[]Required
backgroundbooleanRequired
safety_identifierstringRequired
storebooleanRequired
service_tierstringRequired
truncationstringRequired
streambooleanRequired
Responses
200Success
application/json
backgroundbooleanRequired
completed_atintegerRequired
costnumberRequired
created_atintegerRequired
errornullRequired
frequency_penaltyintegerRequired
idstringRequired
incomplete_detailsnullRequired
instructionsstringRequired
max_output_tokensintegerRequired
max_tool_callsnullRequired
modelstringRequired
objectstringRequired
parallel_tool_callsbooleanRequired
presence_penaltyintegerRequired
previous_response_idnullRequired
prompt_cache_keynullRequired
prompt_cache_retentionnullRequired
safety_identifiernullRequired
service_tierstringRequired
statusstringRequired
storebooleanRequired
temperatureintegerRequired
top_logprobsintegerRequired
top_pnumberRequired
truncationstringRequired
usernullRequired
post/v1/responses
POST /v1/responses HTTP/1.1
Host: llm.onerouter.pro
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 5134
{
"model": "openai/gpt-5.4",
"input": [
{
"type": "message",
"role": "developer",
"content": [
{
"type": "input_text",
"text": "You are a meticulous multimodal analysis assistant. Follow the instructions exactly, use tools when needed, and return valid structured English output."
}
]
},
{
"type": "message",
"role": "system",
"content": [
{
"type": "input_text",
"text": "Prioritize accuracy, cite uncertainty clearly, and summarize the image and PDF before giving recommendations."
}
]
},
{
"type": "message",
"role": "user",
"content": [
{
"type": "input_text",
"text": "Analyze the attached image and PDF. Extract the key facts, identify possible risks, suggest next actions, and return a structured response in English."
},
{
"type": "input_image",
"image_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGNgAAAAAgABSK+kcQAAAABJRU5ErkJggg==",
"detail": "low"
},
{
"type": "input_file",
"filename": "brief.pdf",
"file_data": "data:application/pdf;base64,JVBERi0xLjEKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMjAwXSA+PgplbmRvYmoKdHJhaWxlcgo8PCAvUm9vdCAxIDAgUiA+PgolJUVPRgo="
}
]
},
{
"type": "function_call",
"call_id": "call_weather_001",
"name": "get_weather",
"arguments": "{\"location\":\"San Francisco, CA\",\"unit\":\"celsius\"}"
},
{
"type": "function_call_output",
"call_id": "call_weather_001",
"output": "{\"location\":\"San Francisco, CA\",\"temperature_c\":18,\"condition\":\"Sunny\",\"humidity\":60}"
}
],
"instructions": "Provide a thorough, structured English analysis. First summarize the image and PDF, then list key findings, risks, action items, and a confidence score.",
"metadata": {
"environment": "production",
"application": "infron-responses-demo",
"tenant": "acme-corp",
"priority": "high",
"region": "us-west",
"workflow": "document-analysis",
"request_purpose": "schema-coverage-example",
"customer_tier": "enterprise",
"feature_flag": "full-parameter-test",
"compliance_mode": "standard",
"trace_label": "demo-trace",
"release_channel": "stable",
"locale": "en-US",
"department": "engineering",
"scenario": "multimodal-analysis",
"owner": "platform-team"
},
"tools": [
{
"type": "function",
"name": "get_weather",
"description": "Get the current weather for a city.",
"strict": true,
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City and region, for example San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
],
"description": "Temperature unit"
}
},
"required": [
"location",
"unit"
],
"additionalProperties": false
}
},
{
"type": "web_search",
"engine": "native",
"max_results": 5,
"user_location": {
"type": "approximate",
"city": "San Francisco",
"region": "California",
"country": "US"
}
},
{
"type": "web_search_preview",
"engine": "native",
"max_results": 3
},
{
"type": "web_search_preview_2025_03_11",
"engine": "exa",
"max_results": 3
},
{
"type": "web_search_2025_08_26",
"engine": "auto",
"max_results": 3
}
],
"tool_choice": {
"type": "function",
"name": "get_weather"
},
"parallel_tool_calls": true,
"text": {
"verbosity": "high",
"format": {
"type": "json_schema",
"name": "analysis_response",
"strict": true,
"schema": {
"type": "object",
"properties": {
"summary": {
"type": "string"
},
"key_findings": {
"type": "array",
"items": {
"type": "string"
}
},
"risks": {
"type": "array",
"items": {
"type": "string"
}
},
"actions": {
"type": "array",
"items": {
"type": "string"
}
},
"confidence": {
"type": "number",
"minimum": 0,
"maximum": 1
}
},
"required": [
"summary",
"key_findings",
"risks",
"actions",
"confidence"
],
"additionalProperties": false
}
}
},
"reasoning": {
"effort": "low"
},
"max_output_tokens": 2048,
"top_logprobs": 5,
"max_tool_calls": 8,
"presence_penalty": 0.1,
"frequency_penalty": 0.1,
"top_k": 40,
"image_config": {
"size": "1024x1024",
"quality": "high",
"background": "transparent"
},
"modalities": [
"text"
],
"prompt_cache_key": "acme-project-brief-v1",
"prompt": {
"id": "pmpt_project_brief_001",
"version": "3",
"variables": {
"customer_name": "Acme Corporation",
"document_title": "Project Brief",
"reference_image_data_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAAAAAA6fptVAAAACklEQVR4nGNgAAAAAgABSK+kcQAAAABJRU5ErkJggg==",
"reference_pdf_data_url": "data:application/pdf;base64,JVBERi0xLjEKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCAyMDAgMjAwXSA+PgplbmRvYmoKdHJhaWxlcgo8PCAvUm9vdCAxIDAgUiA+PgolJUVPRgo=",
"analysis_goal": "Generate a detailed multimodal analysis in English."
}
},
"include": [
"file_search_call.results",
"message.input_image.image_url",
"computer_call_output.output.image_url",
"reasoning.encrypted_content",
"code_interpreter_call.outputs"
],
"background": false,
"safety_identifier": "acct_demo_001",
"store": false,
"service_tier": "auto",
"truncation": "auto",
"stream": false,
"usage": {
"include": true
},
"provider": {
"allow_fallbacks": true,
"require_parameters": false,
"data_collection": "allow",
"zdr": false,
"enforce_distillable_text": false,
"order": [
"openai",
"azure"
],
"only": [],
"ignore": [],
"quantizations": [],
"sort": "latency",
"preferred_min_throughput": {
"p50": 25,
"p90": 15
},
"preferred_max_latency": {
"p50": 2.5,
"p90": 5
}
}
}200Success
{
"background": false,
"completed_at": 1774347124,
"content_filters": [
{
"blocked": false,
"content_filter_offsets": {
"check_offset": 0,
"end_offset": 2802,
"start_offset": 0
},
"content_filter_raw": [],
"content_filter_results": {
"hate": {
"filtered": false,
"severity": "safe"
},
"protected_material_code": {
"detected": false,
"filtered": false
},
"protected_material_text": {
"detected": false,
"filtered": false
},
"self_harm": {
"filtered": false,
"severity": "safe"
},
"sexual": {
"filtered": false,
"severity": "safe"
},
"violence": {
"filtered": false,
"severity": "safe"
}
},
"source_type": "completion"
}
],
"cost": 0.0112,
"cost_details": {
"audio_cost": 0,
"byok_cost": 0,
"completion_cost": 0,
"discount_rate": 1,
"image_cost": 0,
"is_byok": false,
"native_web_search_cost": 0,
"plugin_web_search_cost": 0,
"prompt_cache_read_cost": 0.0112,
"prompt_cache_write_1_h": 0,
"prompt_cache_write_5_min": 0,
"prompt_cache_write_cost": 0,
"prompt_cost": 0,
"reasoning_cost": 0,
"tools_cost": 0,
"video_cost": 0
},
"created_at": 1774347120,
"error": null,
"frequency_penalty": 0,
"id": "resp_06a76bce2088302b0069c2636ff7f88193a493b0ce77ae16cb",
"incomplete_details": null,
"instructions": "Provide a thorough, structured English analysis. First summarize the image and PDF, then list key findings, risks, action items, and a confidence score.",
"max_output_tokens": 2048,
"max_tool_calls": null,
"metadata": {
"application": "infron-responses-demo",
"compliance_mode": "standard",
"customer_tier": "enterprise",
"department": "engineering",
"environment": "production",
"feature_flag": "full-parameter-test",
"locale": "en-US",
"owner": "platform-team",
"priority": "high",
"region": "us-west",
"release_channel": "stable",
"request_purpose": "schema-coverage-example",
"scenario": "multimodal-analysis",
"tenant": "acme-corp",
"trace_label": "demo-trace",
"workflow": "document-analysis"
},
"model": "openai/gpt-5.4",
"object": "response",
"output": [
{
"id": "rs_06a76bce2088302b0069c263709a30819397144c8314ec3873",
"summary": [],
"type": "reasoning"
},
{
"arguments": "{\"location\":\"San Francisco, CA\",\"unit\":\"celsius\"}",
"call_id": "call_srZTBnkzgqFI9CQJTUf4BQ7L",
"id": "fc_06a76bce2088302b0069c26373fff88193ad007f7ae0609021",
"name": "get_weather",
"status": "completed",
"type": "function_call"
}
],
"parallel_tool_calls": true,
"presence_penalty": 0,
"previous_response_id": null,
"prompt_cache_key": null,
"prompt_cache_retention": null,
"reasoning": {
"effort": "low",
"summary": null
},
"safety_identifier": null,
"service_tier": "default",
"status": "completed",
"store": true,
"temperature": 1,
"text": {
"format": {
"description": null,
"name": "analysis_response",
"schema": {
"additionalProperties": false,
"properties": {
"actions": {
"items": {
"type": "string"
},
"type": "array"
},
"confidence": {
"maximum": 1,
"minimum": 0,
"type": "number"
},
"key_findings": {
"items": {
"type": "string"
},
"type": "array"
},
"risks": {
"items": {
"type": "string"
},
"type": "array"
},
"summary": {
"type": "string"
}
},
"required": [
"summary",
"key_findings",
"risks",
"actions",
"confidence"
],
"type": "object"
},
"strict": true,
"type": "json_schema"
},
"verbosity": "high"
},
"tool_choice": {
"name": "get_weather",
"type": "function"
},
"tools": [
{
"description": "Get the current weather for a city.",
"name": "get_weather",
"parameters": {
"additionalProperties": false,
"properties": {
"location": {
"description": "City and region, for example San Francisco, CA",
"type": "string"
},
"unit": {
"description": "Temperature unit",
"enum": [
"celsius",
"fahrenheit"
],
"type": "string"
}
},
"required": [
"location",
"unit"
],
"type": "object"
},
"strict": true,
"type": "function"
},
{
"filters": null,
"search_context_size": "medium",
"type": "web_search",
"user_location": {
"city": null,
"country": "US",
"region": null,
"timezone": null,
"type": "approximate"
}
}
],
"top_logprobs": 0,
"top_p": 0.98,
"truncation": "auto",
"usage": {
"input_tokens": 4617,
"input_tokens_details": {
"cached_tokens": 4480
},
"output_tokens": 154,
"output_tokens_details": {
"reasoning_tokens": 126
},
"total_tokens": 4771
},
"user": null
}Last updated