Authorization: ********************{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Create Response Request",
"description": "Request body parameters for creating a model response",
"properties": {
"background": {
"type": "boolean",
"description": "Whether to run the model response in the background."
},
"context_management": {
"type": "array",
"description": "Context management configuration for this request.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Context management entry type. Currently only 'compaction' is supported."
},
"compact_threshold": {
"type": "number",
"description": "Token threshold that triggers compaction for this entry."
}
},
"required": [
"type"
]
}
},
"conversation": {
"anyOf": [
{
"type": "string",
"description": "Unique ID of the conversation."
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the conversation."
}
},
"required": [
"id"
]
}
],
"description": "The conversation this response belongs to. Items from this conversation are prepended to `input_items`, and input/output items are automatically added to this conversation after response completion."
},
"include": {
"type": "array",
"description": "Specifies additional output data to include in the model response.",
"items": {
"type": "string",
"enum": [
"file_search_call.results",
"web_search_call.results",
"web_search_call.action.sources",
"message.input_image.image_url",
"computer_call_output.output.image_url",
"code_interpreter_call.outputs",
"reasoning.encrypted_content",
"message.output_text.logprobs"
]
}
},
"input": {
"anyOf": [
{
"type": "string",
"description": "Plain text input as user role."
},
{
"type": "array",
"description": "List of one or more input items containing different content types.",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"user",
"assistant",
"system",
"developer"
],
"description": "Role of the message input."
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Content type, e.g. 'input_text', 'input_image', 'input_file', etc."
},
"text": {
"type": "string"
},
"image_url": {
"type": "string"
},
"file_id": {
"type": "string"
}
}
}
}
],
"description": "Text, image, or audio input for generating the response."
},
"type": {
"type": "string",
"default": "message",
"description": "Input type, defaults to 'message'."
},
"phase": {
"type": "string",
"enum": [
"commentary",
"final_answer"
],
"description": "Marks assistant message as intermediate commentary or final answer (for subsequent retries)."
},
"status": {
"type": "string",
"enum": [
"in_progress",
"completed",
"incomplete"
],
"description": "Item status."
}
}
}
}
],
"description": "Text, image, or file input to the model for generating the response."
},
"instructions": {
"type": "string",
"description": "System (or developer) message inserted into the model context. When used with `previous_response_id`, can easily replace the system message for a new response."
},
"max_output_tokens": {
"type": "number",
"description": "Maximum number of tokens the response can generate (including visible output tokens and reasoning tokens)."
},
"max_tool_calls": {
"type": "number",
"description": "Maximum number of tool calls in the responsecurl --location 'https://api-xmodel.nexconn.ai/bypass/openai/v1/responses' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"title": "Create Response Request",
"description": "Request body parameters for creating a model response",
"properties": {
"background": {
"type": "boolean",
"description": "Whether to run the model response in the background."
},
"context_management": {
"type": "array",
"description": "Context management configuration for this request.",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Context management entry type. Currently only '\''compaction'\'' is supported."
},
"compact_threshold": {
"type": "number",
"description": "Token threshold that triggers compaction for this entry."
}
},
"required": [
"type"
]
}
},
"conversation": {
"anyOf": [
{
"type": "string",
"description": "Unique ID of the conversation."
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique ID of the conversation."
}
},
"required": [
"id"
]
}
],
"description": "The conversation this response belongs to. Items from this conversation are prepended to `input_items`, and input/output items are automatically added to this conversation after response completion."
},
"include": {
"type": "array",
"description": "Specifies additional output data to include in the model response.",
"items": {
"type": "string",
"enum": [
"file_search_call.results",
"web_search_call.results",
"web_search_call.action.sources",
"message.input_image.image_url",
"computer_call_output.output.image_url",
"code_interpreter_call.outputs",
"reasoning.encrypted_content",
"message.output_text.logprobs"
]
}
},
"input": {
"anyOf": [
{
"type": "string",
"description": "Plain text input as user role."
},
{
"type": "array",
"description": "List of one or more input items containing different content types.",
"items": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"user",
"assistant",
"system",
"developer"
],
"description": "Role of the message input."
},
"content": {
"anyOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "Content type, e.g. '\''input_text'\'', '\''input_image'\'', '\''input_file'\'', etc."
},
"text": {
"type": "string"
},
"image_url": {
"type": "string"
},
"file_id": {
"type": "string"
}
}
}
}
],
"description": "Text, image, or audio input for generating the response."
},
"type": {
"type": "string",
"default": "message",
"description": "Input type, defaults to '\''message'\''."
},
"phase": {
"type": "string",
"enum": [
"commentary",
"final_answer"
],
"description": "Marks assistant message as intermediate commentary or final answer (for subsequent retries)."
},
"status": {
"type": "string",
"enum": [
"in_progress",
"completed",
"incomplete"
],
"description": "Item status."
}
}
}
}
],
"description": "Text, image, or file input to the model for generating the response."
},
"instructions": {
"type": "string",
"description": "System (or developer) message inserted into the model context. When used with `previous_response_id`, can easily replace the system message for a new response."
},
"max_output_tokens": {
"type": "number",
"description": "Maximum number of tokens the response can generate (including visible output tokens and reasoning tokens)."
},
"max_tool_calls": {
"type": "number",
"description": "Maximum number of tool calls in the response'{
"id": "string",
"object": "response",
"created_at": 0,
"completed_at": 0,
"status": "completed",
"error": {
"code": "string",
"message": "string"
},
"incomplete_details": {
"reason": "max_output_tokens"
},
"output_text": "string",
"output": [
{
"id": "string",
"type": "string",
"status": "string",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "string",
"refusal": "string"
}
],
"name": "string",
"arguments": "string",
"call_id": "string"
}
],
"usage": {
"input_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 0,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 0
},
"conversation": {
"id": "string"
},
"previous_response_id": "string",
"model": "string",
"instructions": "string",
"metadata": {
"property1": "string",
"property2": "string"
},
"prompt_cache_key": "string",
"prompt_cache_retention": "string",
"safety_identifier": "string",
"service_tier": "string",
"parallel_tool_calls": true,
"temperature": 0,
"top_p": 0,
"top_logprobs": 0,
"max_output_tokens": 0,
"max_tool_calls": 0,
"truncation": "string",
"user": "string",
"background": true
}