Generation and recovery
Quote actual inputs, submit within an approved USD budget, and recover the original task after a timeout.
Plan a first task
- Use
recommend_modelsfor a task and its constraints, or look up a named model withget_model_params.list_modelshasmediaType,category,search,limit, andoffsetfilters. - Build inputs against the selected model's contract. Supply a reachable HTTPS reference or upload an approved file as described below.
- Send
modelIdandinputstoprepare_generation. ReadmaximumReservation,normalized, andexpectedRevision. Resolvereview_adjustmentsorover_budgetbefore submitting. Preflight checks the request and price without uploading or reserving funds. - Once the user approves, submit
create_taskwith the samemodelIdandinputs, approvedmaxCostUsd,expectedRevision, and a stableidempotencyKey. For OAuth submissions that should be recoverable, also setrecoveryScope: "connection". Keep the task ID and submission key. - Check the same ID with
get_task, using a backoff between polls. When successful, use the returned output URLs. The local stdio wrapper can save them into your configured workspace.
An approved budget is a decimal USD string, such as "0.25000000". A model revision change requires a fresh plan. The service reads the current account quote again at submission and rejects a quote above the cap. Eligible free-model entitlements can yield an explicit zero USD quote. See for reservations and settlement.
Upload a reference
Call create_upload_url with , , and . PUT exactly those bytes using the supplied , then call with . Use the verified asset URL in your model inputs. Send the API key only to i2v.ai. The signed storage upload uses its own credentials. With local stdio, handles these steps for an allowed workspace path.

