Worker complete callback
const url = 'https://api.ultimateteam.ai/internal/computer-use/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/complete';const options = { method: 'POST', headers: {'X-API-Key': '<X-API-Key>', 'Content-Type': 'application/json'}, body: '{"artifacts":[{"generation":"example","provider_response_id":"example","sha256_hash":"example","size_bytes":1,"step":1,"storage_uri":"example"}],"steps_executed":1,"tenant_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","usage":{"cache_creation_input_tokens":1,"cache_read_input_tokens":1,"input_tokens":1,"model":"example","output_tokens":1,"turns":1}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ultimateteam.ai/internal/computer-use/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/complete \ --header 'Content-Type: application/json' \ --header 'X-API-Key: <X-API-Key>' \ --data '{ "artifacts": [ { "generation": "example", "provider_response_id": "example", "sha256_hash": "example", "size_bytes": 1, "step": 1, "storage_uri": "example" } ], "steps_executed": 1, "tenant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "usage": { "cache_creation_input_tokens": 1, "cache_read_input_tokens": 1, "input_tokens": 1, "model": "example", "output_tokens": 1, "turns": 1 } }'Called by the Cloud Run container on successful completion. Requires the configured worker identity and execution receipt.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Request body for the worker complete callback.
Attributes: steps_executed: Number of screenshot-action iterations completed. tenant_id: Tenant UUID (passed by container for routing). usage: Required accumulated provider usage. artifacts: Actual immutable screenshot object receipts for every turn.
object
Worker-attested immutable GCS generation and provider observation.
object
Accumulated Anthropic token usage reported by the container.
The worker cannot bill from inside its isolated Cloud Run container
(no Redis, no Postgres, no CreditManager – same isolation as the
D-13 deviation documented in src/workers/computer_use_worker.py),
so it counts tokens across every turn of the computer-use loop and
reports the totals here. ComputerUseExecutor._meter_llm_usage
runs the reserve/settle against the tenant’s real balance on receipt.
Missing receipts remain unknown; required counters never default to zero.
Attributes:
model: Model the container actually called (priced against this).
input_tokens: Summed usage.input_tokens across all turns.
output_tokens: Summed usage.output_tokens across all turns.
cache_creation_input_tokens: Summed cache-write tokens.
cache_read_input_tokens: Summed cache-read tokens.
turns: Number of provider round-trips.
object
Examplegenerated
{ "artifacts": [ { "generation": "example", "provider_response_id": "example", "sha256_hash": "example", "size_bytes": 1, "step": 1, "storage_uri": "example" } ], "steps_executed": 1, "tenant_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "usage": { "cache_creation_input_tokens": 1, "cache_read_input_tokens": 1, "input_tokens": 1, "model": "example", "output_tokens": 1, "turns": 1 }}Responses
Section titled “ Responses ”Successful Response
object
Examplegenerated
{ "additionalProperty": "example"}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}