1. Send a query
A run is asynchronous.create returns at
once with the run in pending state; the SDKs’ create_and_wait /
createAndWait starts a run and blocks until it finishes, which is the
easiest way to get a result end to end. The only required field is
query. See
Basic run for the cURL form, which only starts the
run and needs a separate poll to read the result.
Runs typically finish in well under a minute for a simple question, but a
harder one can take several minutes and up to around an hour.
create_and_wait /
createAndWait block until then; pass timeout / timeoutMs to bound the
client-side wait.2. Read the result
create_and_wait / createAndWait only return once the run is done, so this
part is safe: a completed run’s
output.text is
a cited Markdown report, with inline [n] markers pointing at
output.sources.
Checking a run that is not done yet, over cURL or your own poll loop, gets
you back status:
"running" (or "pending") instead, with output’s fields still unset.
See Basic run for what that looks like.
Example output
Next steps
To learn more about Seltz Agent, check out the following topics:- Concepts: the run lifecycle, output shapes, and citations
- Basic run: the full request/response cycle, including the cURL poll
- Structured output: requesting a JSON result instead of Markdown
- List runs: paging this org’s runs, newest first
- Poll for completion: managing the wait yourself
- Cancel a run: best-effort cancellation, and why it can lose the race to completion
- Handle errors: rejected requests versus failed runs
- Reference: endpoints, fields, limits and errors
- Agent API Reference: full REST request and response specification