What happens at submission
Before accepting a task, Yir verifies that the API key is eligible and that enough credits are available. It reserves a bounded amount so concurrent long-running tasks cannot spend the same balance. An idempotent retry of the same logical request does not create a second independent charge. Reuse the sameIdempotency-Key and identical request data.
What happens at completion
- Confirmed success: Yir settles the task against the actual user price and releases any unused reservation.
- Confirmed failure: Yir releases the reservation according to the confirmed failure fact.
- Unknown or reconciling: Yir keeps the accounting state explicit while it resolves the missing fact. It does not invent a zero charge or treat a timeout as a confirmed failure.