DocsCloud SDK reference

This reference is currently available in English. The Cloud console remains in your selected language.

BEEOS CLOUD / DEVELOPER REFERENCE

Responses

Run a task on a configured harness and read, stream, cancel, or delete it (UHP).

Overview

The responses domain runs a task on a configured harness and reads it back (UHP). With stream: false the server returns one Response object when the task reaches a terminal state; with stream: true it returns a text/event-stream of events.

6 operations · SDK resource: TypeScript cloud.responses · Python cloud.responses · Go cloud.Responses · API overview

Operations whose path starts with /uhp/v1 are served from https://api.cloud.beeos.ai/uhp/v1 instead of https://api.cloud.beeos.ai/v1; the SDKs switch automatically.

Main objects

UHPCreateResponseRequest

FieldTypeRequiredDescription
inputstring | array<map<string, JSONValue>>yesA bare string is shorthand for one user message.
modelstringnoModel id for this turn. Omitted means the harness default. Any requested id is dispatched as given.
metadataobjectnoClient metadata, the extension point of the Responses surface. harness_id selects the configured harness; environment names the environment this task reads, overriding the harness's (capability environments), refused with environment_not_found or environment_not_ready before the task starts.
metadata.harness_idstringnoID of the harness that runs the task. Optional when exactly one harness is in scope; required when there are several.
metadata.environmentstringnoName of an environment for the task to read. This server does not serve environments: a non-empty value is rejected with 404 environment_not_found.
streambooleannoWhen true the response is streamed as server-sent events; see UHPEvent. Otherwise the call returns the finished response. Defaults to false. Default: false.
previous_response_idstringnoID of an earlier response to continue. The new response runs in the same session. The earlier response must exist and belong to the same harness. Nullable.
instructionsstringnoInstructions placed before the input text and separated from it by a line containing ---.
storebooleannoWhether to keep the response so it can be fetched later. Defaults to true. Default: true.
max_output_tokensintegernoReserved and ignored. It is reported in metadata.ignored_fields of the response. Nullable.
max_stepintegernoAgent step (tool-call round) budget. Nullable.
timeout_secondsintegernoWall-clock budget. Nullable.
toolsarray<map<string, JSONValue>>noReserved and ignored. Accepted for wire compatibility, never acted on, and reported in metadata.ignored_fields on the response. A UHP harness invokes and executes tools itself and reports them in output; there is no input path for a tool result, so the client-executed tool loop this field implies cannot be completed by a conformant server. Configure tools on the harness instead — see Harnesses §4.1. Tasks §1.4.
includearray<string>noReserved and ignored. Accepted for wire compatibility, never acted on, and reported in metadata.ignored_fields on the response. No values are enumerated, so any string a server recognised would be one it named itself. Tasks §1.4.
backgroundbooleannoWhen true on a request that is not streamed, the call returns at once with the response still in_progress; fetch the result later. Ignored when stream is true. Default: false.

Every field, and the methods that use this object: appendix.

UHPResponse

FieldTypeRequiredDescription
idstringyesID of the response. It starts with resp_. Constraints: pattern=^resp_.
objectstringyesObject type. Allowed values: "response" — A response object.
created_atintegeryesUnix seconds
statusUHPResponseStatusyesStatus of the response. See UHPResponseStatus for the values. Allowed values: see the table below, UHPResponseStatus values.
errorUHPErrornoNon-null only when status is failed. Nullable.
incomplete_detailsmap<string, JSONValue>noWhy the response is incomplete. When status is incomplete it holds reason, which is timeout when the time limit was reached. The protocol also defines max_tokens for the output limit, but this service does not currently produce it. Otherwise null. Nullable.
previous_response_idstringnoID of the response this one continues, when the request set previous_response_id. Nullable.
modelstringyesThe model that actually ran.
outputarray<UHPOutputItem>yesOutput items produced so far, in order.
storebooleannoWhether the response is kept so it can be fetched later.
usageUHPUsagenonull when the server cannot account for usage. A fabricated zero would be worse than an honest absence, because a client cannot tell it from a free task. Nullable.
metadataobjectnoExtra information about the run.
metadata.session_idstringnoID of the session the response ran in. Responses chained with previous_response_id share it.
metadata.environmentstringnoThe environment the task read, when it read one (capability environments).
metadata.requested_modelstringnoThe id the client sent, when the client sent one.
metadata.model_fallbackbooleannoTrue only when the harness reported it could not switch to the requested model.
metadata.model_fallback_reasonstringnoWhy the harness ran its default model instead of the requested one. When the harness gives no reason, it is The harness ran its default model.
metadata.ignored_fieldsarray<string>noRequest fields the server did not act on, by name, in any order. Required when the request carried tools or include, which are reserved and ignored. A silently ignored field is indistinguishable from an honoured one. Tasks §1.1 and §1.4.

UHPResponseStatus values

ValueMeaning
"in_progress"The response is still running.
"completed"The response finished successfully.
"failed"The work could not be done.
"incomplete"A limit, such as the output limit or the time limit, stopped the work. It is usually worth continuing.
"cancelled"The client asked to stop. A cancelled response is never reported as failed.

Every field, and the methods that use this object: appendix.

UHPEvent

One streamed event. sequence_number starts at 0 and increases by exactly 1 per event, so a client can detect a dropped event rather than silently rendering a gap.

FieldTypeRequiredDescription
typestringyesKind of the event. Clients should ignore event types they do not know. Exactly one of response.completed, response.incomplete and response.failed ends a stream. Allowed values: see the table below, UHPEvent.type values. Structure by type: see the variant table.
sequence_numberintegeryesPosition of the event in the stream, starting at 0 and increasing by 1 per event. A gap means an event was lost. Constraints: minimum=0.
responseUHPResponsenoSnapshot of the response. Present on lifecycle events.
itemUHPOutputItemnoThe output item. Present on response.output_item.added and response.output_item.done.
partUHPContentPartnoThe content or summary part. Present on content part and reasoning summary part events.
annotationUHPAnnotationnoThe annotation. Present on response.output_text.annotation.added.
deltastringnoNew text, or new function arguments, since the previous delta.
textstringnoThe complete text. Present on response.output_text.done.
argumentsstringnoThe complete function arguments as a JSON string. Present on response.function_call_arguments.done.
item_idstringnoID of the output item the event belongs to.
output_indexintegernoPosition of the item in the output of the response. Constraints: minimum=0.
content_indexintegernoIndex of the content part within the item. Constraints: minimum=0.
summary_indexintegernoIndex of the summary part within the item. Constraints: minimum=0.
annotation_indexintegernoIndex of the annotation within the content part. Constraints: minimum=0.
codestringnoMachine-readable error code. Present on error events.
messagestringnoReadable error message. Present on error events.
paramstringnoDotted path of the field the error is about, or null. Present on error events. Nullable.

UHPEvent.type values

ValueMeaning
"response.created"The response was created. response is the initial snapshot with status in_progress.
"response.in_progress"The response is running. response is a snapshot.
"response.output_item.added"A new output item started. item is its initial form and output_index its position in the output.
"response.output_item.done"An output item is complete. item is its final form.
"response.content_part.added"A content part was added to a message item. part is its initial form.
"response.content_part.done"A content part of a message item is complete. part is its final form.
"response.output_text.delta"More text was appended to the text of a message item. delta is the new text.
"response.output_text.done"The text of a message item is complete. text is the full text.
"response.output_text.annotation.added"An annotation, such as a file citation, was added to the text of a message item.
"response.reasoning_summary_part.added"A summary part was added to a reasoning item.
"response.reasoning_summary_text.delta"More text was appended to the summary of a reasoning item. delta is the new text.
"response.reasoning_summary_part.done"A summary part of a reasoning item is complete. part is its final form.
"response.function_call_arguments.delta"The arguments of a function_call item were written. delta holds the arguments text.
"response.function_call_arguments.done"The arguments of a function_call item are complete. arguments holds them as a JSON string.
"response.completed"The response finished successfully. This is a terminal event: exactly one terminal event ends the stream.
"response.incomplete"The response stopped because of a limit, for example the output limit or the time limit. This is a terminal event.
"response.failed"The response failed or was cancelled; response.status is failed or cancelled. This is a terminal event.
"error"An error that did not end the response. code, message and param describe it, and a terminal event still follows.
"beeos.approval.requested"BeeOS extension. The agent asks for approval of an action. The approval property holds the approval request document.
"beeos.approval.resolved"BeeOS extension. An approval request was resolved. The approval property holds the resolution document.
"beeos.question.requested"BeeOS extension. The agent asks the user a question. The question property holds the question request document.
"beeos.question.resolved"BeeOS extension. A question request was resolved. The question property holds the resolution document.

Every field, and the methods that use this object: appendix.

UHPOutputItem

A client must tolerate item types it does not recognise. A client that renders only message items and ignores the rest is a valid client.

FieldTypeRequiredDescription
idstringnoID of the output item.
typestringyesKind of the output item. Clients should ignore item types they do not know. Allowed values: "message" — A message written by the agent. Its text is in content; "reasoning" — The agent's reasoning. Its summary is in summary; "function_call" — A tool call made by the agent, with name and arguments; "function_call_output" — The result of a tool call, in output. (enum table) Structure by type: see the variant table.
statusstringnoProgress of the item. Allowed values: "in_progress" — The item is still being produced; "completed" — The item is complete. (enum table)
rolestringnoWho wrote a message item. Allowed values: "assistant" — The agent.
contentarray<UHPContentPart>noContent parts of a message item.
summaryarray<map<string, JSONValue>>noSummary of a reasoning item.
call_idstringnoID of the function call. A function_call_output item refers to its call with the same call_id.
namestringnoName of the function the agent called.
argumentsstringnoJSON, as a string
outputstringnoResult of the function call, as text.

Every field, and the methods that use this object: appendix.

UHPContentPart

FieldTypeRequiredDescription
typestringyesKind of the part. Allowed values: "output_text" — Text of a message item, with optional annotations; "summary_text" — Summary text of a reasoning item. (enum table) Structure by type: see the variant table.
textstringnoText of the part.
annotationsarray<UHPAnnotation>noAnnotations that refer to ranges of text.

Every field, and the methods that use this object: appendix.

UHPAnnotation

FieldTypeRequiredDescription
typestringyesKind of the annotation. Allowed values: "container_file_citation" — The text refers to a file produced by the agent.
container_idstringnoID of the container that holds the file. BeeOS does not currently set it.
file_idstringnoID of the file. BeeOS does not currently set it.
filenamestringnoName of the file.
download_urlstringnoAbsolute URL the file can be downloaded from. Constraints: format=uri.
start_indexintegernoStart of the cited range in the text, counted in characters. BeeOS sets it to 0.
end_indexintegernoEnd of the cited range in the text, counted in characters. BeeOS sets it to the length of the text.

Every field, and the methods that use this object: appendix.

Typical flow

  1. Run a task with responses.create; retries must carry the same Idempotency-Key.
  2. Read the task back with responses.get, or follow or resume its events with responses.getEvents.
  3. Stop a running task with responses.cancel; cancelling a task that already ended succeeds and changes nothing.
  4. Read the original input with responses.getInputItems.
  5. Remove the stored response with responses.delete; deleting does not cancel a running task.

Methods

MethodHTTPSummary
responses.createPOST /uhp/v1/responsesRun a task
responses.getGET /uhp/v1/responses/{response_id}Read a task back
responses.deleteDELETE /uhp/v1/responses/{response_id}Delete a stored response
responses.cancelPOST /uhp/v1/responses/{response_id}/cancelCancel a running task
responses.getEventsGET /uhp/v1/responses/{response_id}/eventsStream or resume the events of a response
responses.getInputItemsGET /uhp/v1/responses/{response_id}/input_itemsThe input the task was created with

responses.create

POST /uhp/v1/responses · Operation ID createResponse

Run a task

The core of the protocol. With stream: false the server returns one Response object when the task reaches a terminal state. With stream: true it returns text/event-stream carrying the events defined in the Streaming chapter. Retries MUST carry Idempotency-Key: without one, a retry after a timeout runs the task a second time while the first may still be running.

SDK methods

LanguageMethodSignature
TypeScriptcloud.responses.createcreate(input: Models.UHPCreateResponseJSONRequest, idempotencyKey?: string, UHPVersion?: string): Promise<Models.CreateResponseResponse>
TypeScriptcloud.responses.createStreamcreateStream(input: Models.UHPCreateResponseStreamRequest, idempotencyKey?: string): Promise<AsyncIterable<Models.UHPEvent>>
Pythoncloud.responses.createdef create(self, input: UHPCreateResponseJSONRequest, options: CreateResponseOptions | None = None) -> UHPResponse
Pythoncloud.responses.create_streamdef create_stream(self, input: UHPCreateResponseRequest, options: CreateResponseOptions | None = None) -> Iterator[UHPEvent]
Gocloud.Responses.Createfunc (r *ResponsesResource) Create(ctx context.Context, input UHPCreateResponseJSONRequest, options CreateResponseOptions) (UHPResponse, error)
Gocloud.Responses.CreateStreamfunc (r *ResponsesResource) CreateStream(ctx context.Context, input UHPCreateResponseJSONRequest, options CreateResponseOptions) (*UHPEventStream, error)

cloud.responses.createStream: Creates a Response with stream: true and returns the server-sent events as an async iterable. The method spreads input and forces stream: true before calling POST /responses with responseType: "sse".

cloud.responses.create_stream: Creates a Response with stream: True and yields the server-sent events as decoded JSON values. It copies input, forces stream to True, and posts to /responses; options are sent as headers unchanged.

cloud.Responses.CreateStream: Creates a Response with stream forced to true and returns an *UHPEventStream. Read events with Next() until it returns io.EOF, and call Close() when done. options are sent as headers.

Parameters

ParameterInTypeRequiredDescription
Idempotency-KeyheaderstringnoRepeating a key returns the first request's result and does not re-execute. Constraints: maxLength=255.
UHP-VersionheaderstringnoProtocol version to use: 2026-10-04 (the default), 2026-09-28, 2026-09-12 or 2026-08-11. The version served is echoed in the same header of the response. An unsupported version is rejected with unsupported_protocol_version.

Request body

application/json · required · Schema: UHPCreateResponseRequest

FieldTypeRequiredDescription
inputstring | array<map<string, JSONValue>>yesA bare string is shorthand for one user message.
modelstringnoModel id for this turn. Omitted means the harness default. Any requested id is dispatched as given.
metadataobjectnoClient metadata, the extension point of the Responses surface. harness_id selects the configured harness; environment names the environment this task reads, overriding the harness's (capability environments), refused with environment_not_found or environment_not_ready before the task starts.
metadata.harness_idstringnoID of the harness that runs the task. Optional when exactly one harness is in scope; required when there are several.
metadata.environmentstringnoName of an environment for the task to read. This server does not serve environments: a non-empty value is rejected with 404 environment_not_found.
streambooleannoWhen true the response is streamed as server-sent events; see UHPEvent. Otherwise the call returns the finished response. Defaults to false. Default: false.
previous_response_idstringnoID of an earlier response to continue. The new response runs in the same session. The earlier response must exist and belong to the same harness. Nullable.
instructionsstringnoInstructions placed before the input text and separated from it by a line containing ---.
storebooleannoWhether to keep the response so it can be fetched later. Defaults to true. Default: true.
max_output_tokensintegernoReserved and ignored. It is reported in metadata.ignored_fields of the response. Nullable.
max_stepintegernoAgent step (tool-call round) budget. Nullable.
timeout_secondsintegernoWall-clock budget. Nullable.
toolsarray<map<string, JSONValue>>noReserved and ignored. Accepted for wire compatibility, never acted on, and reported in metadata.ignored_fields on the response. A UHP harness invokes and executes tools itself and reports them in output; there is no input path for a tool result, so the client-executed tool loop this field implies cannot be completed by a conformant server. Configure tools on the harness instead — see Harnesses §4.1. Tasks §1.4.
includearray<string>noReserved and ignored. Accepted for wire compatibility, never acted on, and reported in metadata.ignored_fields on the response. No values are enumerated, so any string a server recognised would be one it named itself. Tasks §1.4.
backgroundbooleannoWhen true on a request that is not streamed, the call returns at once with the response still in_progress; fetch the result later. Ignored when stream is true. Default: false.

Response

200 The finished Response (non-streaming), or the event stream (streaming). · application/json · Schema: UHPResponse

FieldTypeRequiredDescription
idstringyesID of the response. It starts with resp_. Constraints: pattern=^resp_.
objectstringyesObject type. Allowed values: "response" — A response object.
created_atintegeryesUnix seconds
statusUHPResponseStatusyesStatus of the response. See UHPResponseStatus for the values. Allowed values: see UHPResponseStatus values.
errorUHPErrornoNon-null only when status is failed. Nullable.
incomplete_detailsmap<string, JSONValue>noWhy the response is incomplete. When status is incomplete it holds reason, which is timeout when the time limit was reached. The protocol also defines max_tokens for the output limit, but this service does not currently produce it. Otherwise null. Nullable.
previous_response_idstringnoID of the response this one continues, when the request set previous_response_id. Nullable.
modelstringyesThe model that actually ran.
outputarray<UHPOutputItem>yesOutput items produced so far, in order.
storebooleannoWhether the response is kept so it can be fetched later.
usageUHPUsagenonull when the server cannot account for usage. A fabricated zero would be worse than an honest absence, because a client cannot tell it from a free task. Nullable.
metadataobjectnoExtra information about the run.
metadata.session_idstringnoID of the session the response ran in. Responses chained with previous_response_id share it.
metadata.environmentstringnoThe environment the task read, when it read one (capability environments).
metadata.requested_modelstringnoThe id the client sent, when the client sent one.
metadata.model_fallbackbooleannoTrue only when the harness reported it could not switch to the requested model.
metadata.model_fallback_reasonstringnoWhy the harness ran its default model instead of the requested one. When the harness gives no reason, it is The harness ran its default model.
metadata.ignored_fieldsarray<string>noRequest fields the server did not act on, by name, in any order. Required when the request carried tools or include, which are reserved and ignored. A silently ignored field is indistinguishable from an honoured one. Tasks §1.1 and §1.4.

stream=true returns text/event-stream; stream=false returns UHPResponse

Errors

StatusSchemaDescription
400UHPErrorEnvelopeUHP protocol error envelope
401UHPErrorEnvelopeMissing, malformed or unknown credential
404UHPErrorEnvelopeNo such object in the caller's scope. Servers return 404 rather than 403 for objects outside the caller's scope, so that an id's existence is not disclosed.
409UHPErrorEnvelopesession_busy or harness_mismatch
422UHPErrorEnvelopemodel_unavailable or unsupported_base
429UHPErrorEnveloperate_limited or quota_exhausted
503UHPErrorEnvelopeUHP protocol error envelope
other (default)UHPErrorEnvelopeUHP protocol error envelope

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.responses.create({ input: "example_input" });
console.log(result);

responses.get

GET /uhp/v1/responses/{response_id} · Operation ID getResponse

Read a task back

SDK methods

LanguageMethodSignature
TypeScriptcloud.responses.getget(response_id: string): Promise<Models.GetResponseResponse>
Pythoncloud.responses.getdef get(self, response_id: str) -> UHPResponse
Gocloud.Responses.Getfunc (r *ResponsesResource) Get(ctx context.Context, responseid string) (UHPResponse, error)

Parameters

ParameterInTypeRequiredDescription
response_idpathstringyesID of the response. It starts with resp_.

Response

200 The Response · application/json · Schema: UHPResponse

FieldTypeRequiredDescription
idstringyesID of the response. It starts with resp_. Constraints: pattern=^resp_.
objectstringyesObject type. Allowed values: "response" — A response object.
created_atintegeryesUnix seconds
statusUHPResponseStatusyesStatus of the response. See UHPResponseStatus for the values. Allowed values: see UHPResponseStatus values.
errorUHPErrornoNon-null only when status is failed. Nullable.
incomplete_detailsmap<string, JSONValue>noWhy the response is incomplete. When status is incomplete it holds reason, which is timeout when the time limit was reached. The protocol also defines max_tokens for the output limit, but this service does not currently produce it. Otherwise null. Nullable.
previous_response_idstringnoID of the response this one continues, when the request set previous_response_id. Nullable.
modelstringyesThe model that actually ran.
outputarray<UHPOutputItem>yesOutput items produced so far, in order.
storebooleannoWhether the response is kept so it can be fetched later.
usageUHPUsagenonull when the server cannot account for usage. A fabricated zero would be worse than an honest absence, because a client cannot tell it from a free task. Nullable.
metadataobjectnoExtra information about the run.
metadata.session_idstringnoID of the session the response ran in. Responses chained with previous_response_id share it.
metadata.environmentstringnoThe environment the task read, when it read one (capability environments).
metadata.requested_modelstringnoThe id the client sent, when the client sent one.
metadata.model_fallbackbooleannoTrue only when the harness reported it could not switch to the requested model.
metadata.model_fallback_reasonstringnoWhy the harness ran its default model instead of the requested one. When the harness gives no reason, it is The harness ran its default model.
metadata.ignored_fieldsarray<string>noRequest fields the server did not act on, by name, in any order. Required when the request carried tools or include, which are reserved and ignored. A silently ignored field is indistinguishable from an honoured one. Tasks §1.1 and §1.4.

Errors

StatusSchemaDescription
404UHPErrorEnvelopeNo such object in the caller's scope. Servers return 404 rather than 403 for objects outside the caller's scope, so that an id's existence is not disclosed.
other (default)UHPErrorEnvelopeUHP protocol error envelope

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.responses.get("response_123");
console.log(result);

responses.delete

DELETE /uhp/v1/responses/{response_id} · Operation ID deleteResponse

Delete a stored response

Must not cancel a running task — deletion and cancellation are different intentions.

SDK methods

LanguageMethodSignature
TypeScriptcloud.responses.deletedelete(response_id: string): Promise<Models.DeleteResponseResponse>
Pythoncloud.responses.deletedef delete(self, response_id: str) -> DeleteResponseResponse
Gocloud.Responses.Deletefunc (r *ResponsesResource) Delete(ctx context.Context, responseid string) (DeleteResponseResponse, error)

Parameters

ParameterInTypeRequiredDescription
response_idpathstringyesID of the response. It starts with resp_.

Response

200 Deleted · application/json

FieldTypeRequiredDescription
idstringnoID of the deleted response.
deletedbooleannoAlways true. A response that cannot be deleted returns an error instead.

Errors

StatusSchemaDescription
404UHPErrorEnvelopeNo such object in the caller's scope. Servers return 404 rather than 403 for objects outside the caller's scope, so that an id's existence is not disclosed.
other (default)UHPErrorEnvelopeUHP protocol error envelope

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.responses.delete("response_123");
console.log(result);

responses.cancel

POST /uhp/v1/responses/{response_id}/cancel · Operation ID cancelResponse

Cancel a running task

Idempotent. Cancelling an already-terminal task succeeds and changes nothing — a client retrying a cancel after a dropped connection must not be punished for having succeeded.

SDK methods

LanguageMethodSignature
TypeScriptcloud.responses.cancelcancel(response_id: string): Promise<Models.CancelResponseResponse>
Pythoncloud.responses.canceldef cancel(self, response_id: str) -> UHPResponse
Gocloud.Responses.Cancelfunc (r *ResponsesResource) Cancel(ctx context.Context, responseid string) (UHPResponse, error)

Parameters

ParameterInTypeRequiredDescription
response_idpathstringyesID of the response. It starts with resp_.

Response

200 The Response, now cancelling or terminal · application/json · Schema: UHPResponse

FieldTypeRequiredDescription
idstringyesID of the response. It starts with resp_. Constraints: pattern=^resp_.
objectstringyesObject type. Allowed values: "response" — A response object.
created_atintegeryesUnix seconds
statusUHPResponseStatusyesStatus of the response. See UHPResponseStatus for the values. Allowed values: see UHPResponseStatus values.
errorUHPErrornoNon-null only when status is failed. Nullable.
incomplete_detailsmap<string, JSONValue>noWhy the response is incomplete. When status is incomplete it holds reason, which is timeout when the time limit was reached. The protocol also defines max_tokens for the output limit, but this service does not currently produce it. Otherwise null. Nullable.
previous_response_idstringnoID of the response this one continues, when the request set previous_response_id. Nullable.
modelstringyesThe model that actually ran.
outputarray<UHPOutputItem>yesOutput items produced so far, in order.
storebooleannoWhether the response is kept so it can be fetched later.
usageUHPUsagenonull when the server cannot account for usage. A fabricated zero would be worse than an honest absence, because a client cannot tell it from a free task. Nullable.
metadataobjectnoExtra information about the run.
metadata.session_idstringnoID of the session the response ran in. Responses chained with previous_response_id share it.
metadata.environmentstringnoThe environment the task read, when it read one (capability environments).
metadata.requested_modelstringnoThe id the client sent, when the client sent one.
metadata.model_fallbackbooleannoTrue only when the harness reported it could not switch to the requested model.
metadata.model_fallback_reasonstringnoWhy the harness ran its default model instead of the requested one. When the harness gives no reason, it is The harness ran its default model.
metadata.ignored_fieldsarray<string>noRequest fields the server did not act on, by name, in any order. Required when the request carried tools or include, which are reserved and ignored. A silently ignored field is indistinguishable from an honoured one. Tasks §1.1 and §1.4.

Errors

StatusSchemaDescription
404UHPErrorEnvelopeNo such object in the caller's scope. Servers return 404 rather than 403 for objects outside the caller's scope, so that an id's existence is not disclosed.
other (default)UHPErrorEnvelopeUHP protocol error envelope

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.responses.cancel("response_123");
console.log(result);

responses.getEvents

GET /uhp/v1/responses/{response_id}/events · Operation ID getResponseEvents

Stream or resume the events of a response

SDK methods

LanguageMethodSignature
TypeScriptcloud.responses.getEventsgetEvents(response_id: string, LastEventID?: string, UHPVersion?: string): Promise<Models.GetResponseEventsResponse>
Pythoncloud.responses.get_eventsdef get_events(self, response_id: str, options: GetResponseEventsOptions | None = None) -> Iterator[UHPEvent]
Gocloud.Responses.GetEventsfunc (r *ResponsesResource) GetEvents(ctx context.Context, responseid string, options GetResponseEventsOptions) (*EventStream[UHPEvent], error)

Parameters

ParameterInTypeRequiredDescription
response_idpathstringyesID of the response. It starts with resp_.
Last-Event-IDheaderstringnoSequence number of the last event the client received. The stream resumes after it. Must be a non-negative integer.
UHP-VersionheaderstringnoProtocol version to use: 2026-10-04 (the default), 2026-09-28, 2026-09-12 or 2026-08-11. The version served is echoed in the same header of the response. An unsupported version is rejected with unsupported_protocol_version.

Response

200 Server-sent protocol events · text/event-stream · Schema: UHPEvent

Streams server-sent events.

FieldTypeRequiredDescription
typestringyesKind of the event. Clients should ignore event types they do not know. Exactly one of response.completed, response.incomplete and response.failed ends a stream. Allowed values: see UHPEvent.type values. Structure by type: see the variant table.
sequence_numberintegeryesPosition of the event in the stream, starting at 0 and increasing by 1 per event. A gap means an event was lost. Constraints: minimum=0.
responseUHPResponsenoSnapshot of the response. Present on lifecycle events.
itemUHPOutputItemnoThe output item. Present on response.output_item.added and response.output_item.done.
partUHPContentPartnoThe content or summary part. Present on content part and reasoning summary part events.
annotationUHPAnnotationnoThe annotation. Present on response.output_text.annotation.added.
deltastringnoNew text, or new function arguments, since the previous delta.
textstringnoThe complete text. Present on response.output_text.done.
argumentsstringnoThe complete function arguments as a JSON string. Present on response.function_call_arguments.done.
item_idstringnoID of the output item the event belongs to.
output_indexintegernoPosition of the item in the output of the response. Constraints: minimum=0.
content_indexintegernoIndex of the content part within the item. Constraints: minimum=0.
summary_indexintegernoIndex of the summary part within the item. Constraints: minimum=0.
annotation_indexintegernoIndex of the annotation within the content part. Constraints: minimum=0.
codestringnoMachine-readable error code. Present on error events.
messagestringnoReadable error message. Present on error events.
paramstringnoDotted path of the field the error is about, or null. Present on error events. Nullable.

Errors

StatusSchemaDescription
other (default)UHPErrorEnvelopeUHP protocol error envelope

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const stream = await cloud.responses.getEvents("response_123");
for await (const event of stream) {
  console.log(event);
}

responses.getInputItems

GET /uhp/v1/responses/{response_id}/input_items · Operation ID getResponseInputItems

The input the task was created with

SDK methods

LanguageMethodSignature
TypeScriptcloud.responses.getInputItemsgetInputItems(response_id: string): Promise<Models.GetResponseInputItemsResponse>
Pythoncloud.responses.get_input_itemsdef get_input_items(self, response_id: str) -> GetResponseInputItemsResponse
Gocloud.Responses.GetInputItemsfunc (r *ResponsesResource) GetInputItems(ctx context.Context, responseid string) (GetResponseInputItemsResponse, error)

Parameters

ParameterInTypeRequiredDescription
response_idpathstringyesID of the response. It starts with resp_.

Response

200 Input items · application/json

FieldTypeRequiredDescription
objectstringnoObject type of the list. Allowed values: "list" — A list of items.
dataarray<map<string, JSONValue>>noInput items of the response, as they were sent in the request. A string input appears as one message item with role user and an input_text content part.

Errors

StatusSchemaDescription
404UHPErrorEnvelopeNo such object in the caller's scope. Servers return 404 rather than 403 for objects outside the caller's scope, so that an id's existence is not disclosed.
other (default)UHPErrorEnvelopeUHP protocol error envelope

The error schemas are described in Errors.

Example

import { BeeOSClient } from "@beeos-ai/cloud-sdk";

const cloud = new BeeOSClient({
  baseURL: "https://api.cloud.beeos.ai/v1",
  apiKey: "YOUR_API_KEY", // bsk_ key: backend only
});
const result = await cloud.responses.getInputItems("response_123");
console.log(result);

Structures by discriminator

UHPContentPart by type

The structure of UHPContentPart depends on its own type value.

Value of typeDescriptionStructure
"output_text"Text of a message item, with optional annotations.UHPContentPartOutputText
"summary_text"Summary text of a reasoning item.UHPContentPartSummaryText

UHPEvent by type

The structure of UHPEvent depends on its own type value.

Value of typeDescriptionStructure
"response.created"The response was created. response is the initial snapshot with status in_progress.UHPEventResponse
"response.in_progress"The response is running. response is a snapshot.UHPEventResponse
"response.completed"The response finished successfully. This is a terminal event: exactly one terminal event ends the stream.UHPEventResponse
"response.incomplete"The response stopped because of a limit, for example the output limit or the time limit. This is a terminal event.UHPEventResponse
"response.failed"The response failed or was cancelled; response.status is failed or cancelled. This is a terminal event.UHPEventResponse
"response.output_item.added"A new output item started. item is its initial form and output_index its position in the output.UHPEventOutputItem
"response.output_item.done"An output item is complete. item is its final form.UHPEventOutputItem
"response.content_part.added"A content part was added to a message item. part is its initial form.UHPEventContentPart
"response.content_part.done"A content part of a message item is complete. part is its final form.UHPEventContentPart
"response.reasoning_summary_part.added"A summary part was added to a reasoning item.UHPEventReasoningSummaryPart
"response.reasoning_summary_part.done"A summary part of a reasoning item is complete. part is its final form.UHPEventReasoningSummaryPart
"response.output_text.delta"More text was appended to the text of a message item. delta is the new text.UHPEventOutputTextDelta
"response.reasoning_summary_text.delta"More text was appended to the summary of a reasoning item. delta is the new text.UHPEventReasoningSummaryTextDelta
"response.output_text.done"The text of a message item is complete. text is the full text.UHPEventOutputTextDone
"response.output_text.annotation.added"An annotation, such as a file citation, was added to the text of a message item.UHPEventAnnotationAdded
"response.function_call_arguments.delta"The arguments of a function_call item were written. delta holds the arguments text.UHPEventFunctionCallArgumentsDelta
"response.function_call_arguments.done"The arguments of a function_call item are complete. arguments holds them as a JSON string.UHPEventFunctionCallArgumentsDone
"error"An error that did not end the response. code, message and param describe it, and a terminal event still follows.UHPEventError
"beeos.approval.requested"BeeOS extension. The agent asks for approval of an action. The approval property holds the approval request document.UHPEventApproval
"beeos.approval.resolved"BeeOS extension. An approval request was resolved. The approval property holds the resolution document.UHPEventApproval
"beeos.question.requested"BeeOS extension. The agent asks the user a question. The question property holds the question request document.UHPEventQuestion
"beeos.question.resolved"BeeOS extension. A question request was resolved. The question property holds the resolution document.UHPEventQuestion

UHPOutputItem by type

The structure of UHPOutputItem depends on its own type value.

Value of typeDescriptionStructure
"message"A message written by the agent. Its text is in content.UHPOutputItemMessage
"reasoning"The agent's reasoning. Its summary is in summary.UHPOutputItemReasoning
"function_call"A tool call made by the agent, with name and arguments.UHPOutputItemFunctionCall
"function_call_output"The result of a tool call, in output.UHPOutputItemFunctionCallOutput