submit_delegated_job
Submit a job paid from an existing USDC delegation. Provider works first, then pulls from your approved allowance—no per-job payment transaction required.
Instructions
Submit a job paid from your existing spl-approve USDC delegation: the provider does the work FIRST, then pulls from your delegated allowance - no per-job payment transaction from you. On an ordinary capability it pulls the advertised price. On a METERED one (the card carries a metered block) the advertised price is a CEILING and the pull is what the job actually consumed, never more than that ceiling - so a metered card is usually cheaper here than its listed price suggests. Requires an ACTIVE delegation to the delegate key this capability advertises (check with get_delegation). Within the approved cap the delegate can pull without your signature, so treat the cap as the max loss. Your per-session spend limit also applies: the job is refused if its ceiling does not fit the remaining session budget. An input too large to ride inline is sent via iroh automatically (needs a persistent agent); for a file on disk use submit_delegated_job_from_file. If max_price_lamports is not set, returns the price - or the range, when metered - for confirmation without publishing anything.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | ||
| capability | No | general | |
| kind_offset | No | ||
| timeout_secs | No | ||
| provider_npub | Yes | ||
| max_price_lamports | No | Confirmation cap in the card asset subunits (USDC has 6 decimals). The advertised price must not exceed it. Omit to get a price confirmation without publishing. |