# Responses ## Create `client.responses.create(ResponseCreateParamsbody, RequestOptionsoptions?): ResponsesResponse` **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. ### Parameters - `body: ResponseCreateParams` - `input?: Array` - `call_id?: string` - `content?: Array` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `output?: ContentBlock` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `role?: string` - `type?: "computer_call_output"` - `"computer_call_output"` - `instructions?: string` - `max_output_tokens?: number` - `model?: string` - `previous_response_id?: string` - `stream?: boolean` - `temperature?: number` - `tools?: Array` - `display_height?: number` - `display_width?: number` - `environment?: string` - `type?: "computer_use"` - `"computer_use"` - `top_p?: number` ### Returns - `ResponsesResponse` - `id?: string` - `computer_id?: string` - `created_at?: string` - `max_output_tokens?: number` - `model?: string` - `object?: string` - `output?: Array` - `id?: string` - `action?: V2GoBackendInternalServiceAction` - `button?: string` - `end_x?: number` - `end_y?: number` - `keys?: Array` - `result?: string` - `scroll_x?: number` - `scroll_y?: number` - `status?: string` - `text?: string` - `type?: "click" | "double_click" | "triple_click" | 14 more` - `"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` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `role?: string` - `status?: string` - `summary?: Array` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `type?: "reasoning" | "computer_call" | "computer_call_output" | "message"` - `"reasoning"` - `"computer_call"` - `"computer_call_output"` - `"message"` - `status?: string` - `temperature?: number` - `top_p?: number` - `usage?: V2GoBackendInternalServiceResponsesUsage` - `input_tokens?: number` - `output_tokens?: number` - `total_tokens?: number` - `viewport?: V2GoBackendInternalServiceViewport` - `environment?: string` - `height?: number` - `width?: number` ### Example ```typescript 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); ``` ## Retrieve `client.responses.retrieve(stringid, RequestOptionsoptions?): ResponsesResponse` **get** `/v1/responses/{id}` Retrieve a previously created response by its ID, including all output items. ### Parameters - `id: string` ### Returns - `ResponsesResponse` - `id?: string` - `computer_id?: string` - `created_at?: string` - `max_output_tokens?: number` - `model?: string` - `object?: string` - `output?: Array` - `id?: string` - `action?: V2GoBackendInternalServiceAction` - `button?: string` - `end_x?: number` - `end_y?: number` - `keys?: Array` - `result?: string` - `scroll_x?: number` - `scroll_y?: number` - `status?: string` - `text?: string` - `type?: "click" | "double_click" | "triple_click" | 14 more` - `"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` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `role?: string` - `status?: string` - `summary?: Array` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `type?: "reasoning" | "computer_call" | "computer_call_output" | "message"` - `"reasoning"` - `"computer_call"` - `"computer_call_output"` - `"message"` - `status?: string` - `temperature?: number` - `top_p?: number` - `usage?: V2GoBackendInternalServiceResponsesUsage` - `input_tokens?: number` - `output_tokens?: number` - `total_tokens?: number` - `viewport?: V2GoBackendInternalServiceViewport` - `environment?: string` - `height?: number` - `width?: number` ### Example ```typescript 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.retrieve('id'); console.log(responsesResponse.id); ``` ## Delete `client.responses.delete(stringid, RequestOptionsoptions?): ResponseDeleteResponse` **delete** `/v1/responses/{id}` Permanently delete a response and all its output items. ### Parameters - `id: string` ### Returns - `ResponseDeleteResponse` - `id?: string` - `deleted?: boolean` - `object?: string` ### Example ```typescript import Lightcone from '@tzafon/lightcone'; const client = new Lightcone({ apiKey: process.env['TZAFON_API_KEY'], // This is the default and can be omitted }); const response = await client.responses.delete('id'); console.log(response.id); ``` ## Cancel `client.responses.cancel(stringid, RequestOptionsoptions?): ResponsesResponse` **post** `/v1/responses/{id}/cancel` Cancel an in-progress response. Only responses with status "in_progress" can be cancelled. ### Parameters - `id: string` ### Returns - `ResponsesResponse` - `id?: string` - `computer_id?: string` - `created_at?: string` - `max_output_tokens?: number` - `model?: string` - `object?: string` - `output?: Array` - `id?: string` - `action?: V2GoBackendInternalServiceAction` - `button?: string` - `end_x?: number` - `end_y?: number` - `keys?: Array` - `result?: string` - `scroll_x?: number` - `scroll_y?: number` - `status?: string` - `text?: string` - `type?: "click" | "double_click" | "triple_click" | 14 more` - `"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` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `role?: string` - `status?: string` - `summary?: Array` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `type?: "reasoning" | "computer_call" | "computer_call_output" | "message"` - `"reasoning"` - `"computer_call"` - `"computer_call_output"` - `"message"` - `status?: string` - `temperature?: number` - `top_p?: number` - `usage?: V2GoBackendInternalServiceResponsesUsage` - `input_tokens?: number` - `output_tokens?: number` - `total_tokens?: number` - `viewport?: V2GoBackendInternalServiceViewport` - `environment?: string` - `height?: number` - `width?: number` ### Example ```typescript 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.cancel('id'); console.log(responsesResponse.id); ``` ## Domain Types ### Content Block - `ContentBlock` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` ### Responses Response - `ResponsesResponse` - `id?: string` - `computer_id?: string` - `created_at?: string` - `max_output_tokens?: number` - `model?: string` - `object?: string` - `output?: Array` - `id?: string` - `action?: V2GoBackendInternalServiceAction` - `button?: string` - `end_x?: number` - `end_y?: number` - `keys?: Array` - `result?: string` - `scroll_x?: number` - `scroll_y?: number` - `status?: string` - `text?: string` - `type?: "click" | "double_click" | "triple_click" | 14 more` - `"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` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `role?: string` - `status?: string` - `summary?: Array` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `type?: "reasoning" | "computer_call" | "computer_call_output" | "message"` - `"reasoning"` - `"computer_call"` - `"computer_call_output"` - `"message"` - `status?: string` - `temperature?: number` - `top_p?: number` - `usage?: V2GoBackendInternalServiceResponsesUsage` - `input_tokens?: number` - `output_tokens?: number` - `total_tokens?: number` - `viewport?: V2GoBackendInternalServiceViewport` - `environment?: string` - `height?: number` - `width?: number` ### V2 Go Backend Internal Service Action - `V2GoBackendInternalServiceAction` - `button?: string` - `end_x?: number` - `end_y?: number` - `keys?: Array` - `result?: string` - `scroll_x?: number` - `scroll_y?: number` - `status?: string` - `text?: string` - `type?: "click" | "double_click" | "triple_click" | 14 more` - `"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` ### V2 Go Backend Internal Service Output Item - `V2GoBackendInternalServiceOutputItem` - `id?: string` - `action?: V2GoBackendInternalServiceAction` - `button?: string` - `end_x?: number` - `end_y?: number` - `keys?: Array` - `result?: string` - `scroll_x?: number` - `scroll_y?: number` - `status?: string` - `text?: string` - `type?: "click" | "double_click" | "triple_click" | 14 more` - `"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` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `role?: string` - `status?: string` - `summary?: Array` - `image_url?: string` - `text?: string` - `type?: "input_text" | "output_text" | "summary_text" | "input_image"` - `"input_text"` - `"output_text"` - `"summary_text"` - `"input_image"` - `type?: "reasoning" | "computer_call" | "computer_call_output" | "message"` - `"reasoning"` - `"computer_call"` - `"computer_call_output"` - `"message"` ### V2 Go Backend Internal Service Responses Usage - `V2GoBackendInternalServiceResponsesUsage` - `input_tokens?: number` - `output_tokens?: number` - `total_tokens?: number` ### V2 Go Backend Internal Service Viewport - `V2GoBackendInternalServiceViewport` - `environment?: string` - `height?: number` - `width?: number`