Skip to main content

Finalize a public-view AI operation

1 min read
post/ai-capabilities/public-view/operations/{operationId}/finalize
Request example
Response
post/ai-capabilities/public-view/operations/{operationId}/finalize

Authorization

Authorizationstringheaderrequired#
Better Auth session token. Go resolves the token in the session table and maps it to users.id via auth_user_id. The profile is taken from the path param :studioId when applicable.

Path parameters

operationIdstringrequired#
Client-generated idempotency identifier for the AI operation.

Body

application/json
leaseOwnerstringrequired#
fencingTokenintegerrequired#

Range: >= 1

stateenum<string>required#
Options:appliedpartialunchangedstaleineligiblebusyerror
outcomeCodestring#
outcomeDataany#
Capability-specific valid JSON, limited to 32 KiB.
evaluatedCountintegerrequired#

Range: >= 0

appliedCountintegerrequired#

Range: >= 0

skippedCountintegerrequired#

Range: >= 0

errorCodestring#
undoablebooleanrequired#

Responses

application/json
Terminal operation state.
dataobjectrequired#
Show child attributes
operationIdstringrequired#
capabilitystringrequired#
capabilityVersionintegerrequired#

Range: >= 1

targetKeystringrequired#
stateenum<string>required#
Options:runningappliedpartialunchangedstaleineligiblebusyerror
outcomeCodestring#
outcomeDataanyrequired#
Capability-specific JSON outcome, limited to 32 KiB on finalization.
leaseOwnerstring#
fencingTokenintegerrequired#

Range: >= 1

leaseExpiresAtstring#
evaluatedCountintegerrequired#

Range: >= 0

appliedCountintegerrequired#

Range: >= 0

skippedCountintegerrequired#

Range: >= 0

undoneCountintegerrequired#

Range: >= 0

errorCodestring#
undoExpiresAtstring#
Present for undoable operations with applied effects; currently 24 hours after completion.
completedAtstring#
createdAtstringrequired#
updatedAtstringrequired#
request_idstring#