Skip to content
Dashboard

Create a new response

client.responses.create(ResponseCreateParams { input, instructions, max_output_tokens, 6 more } body, RequestOptionsoptions?): ResponsesResponse { id, computer_id, created_at, 9 more }
POST/v1/responses

Create a model response. Supports text conversations and computer-use (CUA) workflows. Set stream=true for server-sent events. Include tools with type "computer_use" for CUA mode, which returns structured computer_call actions. Use previous_response_id to chain multi-turn conversations.

ParametersExpand Collapse
body: ResponseCreateParams { input, instructions, max_output_tokens, 6 more }
input?: Array<Input>
call_id?: string
content?: Array<ContentBlock { image_url, text, type } >
image_url?: string
text?: string
type?: "input_text" | "output_text" | "summary_text" | "input_image"
One of the following:
"input_text"
"output_text"
"summary_text"
"input_image"
output?: ContentBlock { image_url, text, type }
image_url?: string
text?: string
type?: "input_text" | "output_text" | "summary_text" | "input_image"
One of the following:
"input_text"
"output_text"
"summary_text"
"input_image"
role?: string
type?: "computer_call_output"
instructions?: string
max_output_tokens?: number
model?: string
previous_response_id?: string
stream?: boolean
temperature?: number
tools?: Array<Tool>
display_height?: number
display_width?: number
environment?: string
type?: "computer_use"
top_p?: number
ReturnsExpand Collapse
ResponsesResponse { id, computer_id, created_at, 9 more }
id?: string
computer_id?: string
created_at?: string
max_output_tokens?: number
model?: string
object?: string
output?: Array<V2GoBackendInternalServiceOutputItem { id, action, call_id, 5 more } >
id?: string
action?: V2GoBackendInternalServiceAction { button, end_x, end_y, 10 more }
button?: string
end_x?: number
end_y?: number
keys?: Array<string>
result?: string
scroll_x?: number
scroll_y?: number
status?: string
text?: string
type?: "click" | "double_click" | "triple_click" | 14 more
One of the following:
"click"
"double_click"
"triple_click"
"right_click"
"type"
"key"
"keypress"
"key_down"
"key_up"
"scroll"
"hscroll"
"navigate"
"drag"
"wait"
"terminate"
"answer"
"done"
url?: string
x?: number
y?: number
call_id?: string
content?: Array<ContentBlock { image_url, text, type } >
image_url?: string
text?: string
type?: "input_text" | "output_text" | "summary_text" | "input_image"
One of the following:
"input_text"
"output_text"
"summary_text"
"input_image"
role?: string
status?: string
summary?: Array<ContentBlock { image_url, text, type } >
image_url?: string
text?: string
type?: "input_text" | "output_text" | "summary_text" | "input_image"
One of the following:
"input_text"
"output_text"
"summary_text"
"input_image"
type?: "reasoning" | "computer_call" | "computer_call_output" | "message"
One of the following:
"reasoning"
"computer_call"
"computer_call_output"
"message"
status?: string
temperature?: number
top_p?: number
usage?: V2GoBackendInternalServiceResponsesUsage { input_tokens, output_tokens, total_tokens }
input_tokens?: number
output_tokens?: number
total_tokens?: number
viewport?: V2GoBackendInternalServiceViewport { environment, height, width }
environment?: string
height?: number
width?: number

Create a new response

import Lightcone from '@tzafon/lightcone';

const client = new Lightcone({
  apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted
});

const responsesResponse = await client.responses.create();

console.log(responsesResponse.id);
{
  "id": "id",
  "computer_id": "computer_id",
  "created_at": "created_at",
  "max_output_tokens": 0,
  "model": "model",
  "object": "object",
  "output": [
    {
      "id": "id",
      "action": {
        "button": "button",
        "end_x": 0,
        "end_y": 0,
        "keys": [
          "string"
        ],
        "result": "result",
        "scroll_x": 0,
        "scroll_y": 0,
        "status": "status",
        "text": "text",
        "type": "click",
        "url": "url",
        "x": 0,
        "y": 0
      },
      "call_id": "call_id",
      "content": [
        {
          "image_url": "image_url",
          "text": "text",
          "type": "input_text"
        }
      ],
      "role": "role",
      "status": "status",
      "summary": [
        {
          "image_url": "image_url",
          "text": "text",
          "type": "input_text"
        }
      ],
      "type": "reasoning"
    }
  ],
  "status": "status",
  "temperature": 0,
  "top_p": 0,
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "viewport": {
    "environment": "environment",
    "height": 0,
    "width": 0
  }
}
Returns Examples
{
  "id": "id",
  "computer_id": "computer_id",
  "created_at": "created_at",
  "max_output_tokens": 0,
  "model": "model",
  "object": "object",
  "output": [
    {
      "id": "id",
      "action": {
        "button": "button",
        "end_x": 0,
        "end_y": 0,
        "keys": [
          "string"
        ],
        "result": "result",
        "scroll_x": 0,
        "scroll_y": 0,
        "status": "status",
        "text": "text",
        "type": "click",
        "url": "url",
        "x": 0,
        "y": 0
      },
      "call_id": "call_id",
      "content": [
        {
          "image_url": "image_url",
          "text": "text",
          "type": "input_text"
        }
      ],
      "role": "role",
      "status": "status",
      "summary": [
        {
          "image_url": "image_url",
          "text": "text",
          "type": "input_text"
        }
      ],
      "type": "reasoning"
    }
  ],
  "status": "status",
  "temperature": 0,
  "top_p": 0,
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "viewport": {
    "environment": "environment",
    "height": 0,
    "width": 0
  }
}