Skip to main content
A fast call returns the rows straight away:
The cost line is what you were actually charged, and what that works out to per result. The held line is what was reserved before the call ran. The difference was released back to your balance.

Options

Plus the global options. -i and -f are mutually exclusive, and passing both is a usage error before anything is sent.

Input from a file or stdin

Long or generated inputs are easier from a file:

Sending a local image

The video tools animate a starting image. --image is the whole file intake in one flag:
The CLI reads the file’s leading bytes to work out what it really is, asks the gateway for a one-shot upload URL, PUTs the bytes straight to storage and puts the handle in your input. Nothing about encoding, handles or content types reaches you, and a .jpg that is really a PNG still works. JPEG, PNG and WEBP, up to 10 MB. The upload happens before the run, so a file the gateway will not take costs nothing: no hold, no run row. --image supplies the image on its own, so setting image_handle, image_urls or image_base64 in the input as well is a usage error before anything is sent.
The two requests behind that one flag exist for agents rather than for you. Tool arguments pass through a model’s context window, so an image sent inline as base64 costs a million tokens and gets truncated. Uploads explains the flow and the 10 and 30 minute clocks on an uploaded file.

Slow calls

Some calls take minutes. If a run does not finish inside the gateway’s synchronous window, you get the run id back instead of the rows:
Add --wait to block until it finishes instead. The CLI polls with exponential backoff up to --timeout seconds:
Ctrl-C during --wait stops the waiting, not the run. The run keeps going and you can pick it up later with goro runs get -r <runId>.
If the timeout passes and the run is still going, the CLI exits 4 and tells you how to keep waiting. The run itself is unaffected.

Saving the output

Human output prints the first three rows and then points you at the full result. To keep everything:
runs get returns a run’s status and cost forever, but its rows only until you collect them and at most 24 hours after the run finished. After that output is null. Capture anything you need with -o or -j.

When it does not work

A 402 prints what it needs and where to fix it:

Next: runs

Poll a run, and see what you have spent.