Skip to main content
Some operations run a model and take a while: gcai chat create and gcai playbooks run. The CLI handles the waiting for you.

Wait by default

chat create and playbooks run submit the job, poll it to completion, and print the finished result. You do not need to run a separate poll loop. If the job ends in an error, the command exits non-zero with the error message.
Two flags control the wait:

Polling a job yourself

If you used --async (or want to check on a job later), poll it with jobs get:
gcai jobs get keeps its own --wait <seconds> for a single server-side long-poll. Re-run it until status is succeeded, failed, or canceled.

File processing

Uploads process after they land (text extraction and embeddings). This is not a job envelope: poll the file itself until it is ready.