Capture & Release
A mark after a model call that shows where its hold is settled — Slen settles the hold itself, with or without the node.
2 min read
Capture & Release marks the step where the hold of a model call is settled: what the call cost is captured, and the rest of the hold goes back. Slen settles the hold itself after the call, whether or not the flow has the node.
- Node
- Capture & Release
- Type
capture_release- Category
- Money
- Ports
- Default
defaultmust be connected
- Default
- Ends the path
- No
What it does
The node stands right after AI Model, on its Success port. When the execution passes it, the node writes the captured event of the call into the trace, with the tokens of the call, and passes the execution on through Default.
The capture itself is made in the background after the provider has answered. What the call cost is known shortly after the execution ends: it is cost.actual of the execution. When a call fails or is refused, its hold is given back before the execution leaves the model node, and the execution does not reach this node.
The node also takes over the cost of the call in the metrics of the builder: with the node in the flow the cost is counted on it, and without it on the model node. The attempts of the call stay under the model node.
When to use it
To show on the canvas and in the trace where the money of a call is settled.
To see the cost of a call on its own node in the metrics of the builder.
The node does not decide whether a call is captured or released, and the flow needs no node for the hold to be settled.
Settings
The node has no settings.
Ports
The node has one port, Default, and it is required.
Output
{ "captured": true, "cost": "0.00048000" }cost is what the call was estimated at — the figure its hold was taken on, before the safety multiplier — and not what was captured. What the call cost is cost.actual of the execution, once the capture is made.
Errors
The node raises no error of its own and has no setting to check. Its place is checked when the flow is published: every connection that arrives at the node comes from the Success port of an AI Model node. Any other is misplaced_finance_node — The money chain.
Example
- Request — Default → AI Model
- AI Model — Success → Capture & Release
- Capture & Release — Default → Return Response
AI Model holds the money and calls the model. On its answer the execution passes Capture & Release, which writes the captured event, and Return Response answers the caller. The hold is captured in the background, and cost.actual of the execution follows.
Related
The money chain — the four nodes around a model call.
Reserve Budget — the mark of the hold before the call.
How budget reservations work — how a hold ends.
Built from openapi b070e1f, sdk contract 5cc7055, php ae4a53b, node 84bc62d