id, and you read the answer from GET /v1/agent/{id}.
Make a request
Get an API key in the Quickstart. Agent needs an API key. This request reads one page, in one round, with a cap of $0.10. The cURL tab reads the run once. The TypeScript and Python tabs ask again until the run ends.Read the response
The call that starts the run answers at once.threadId names the thread of the run, and threadTurn is 1 for a first question. Starting a run costs nothing.
GET /v1/agent/{id} answers with status of processing, completed or failed. While it is processing, wait a few seconds and ask again. This is the real answer of the run above, a few seconds later.
data holds the fields the agent found, and confidence says how sure it is of each. sources gives the page and the exact words each value came from. transactionModes is not in data: the agent did not find it on the page in one round, so the field is left out. steps lists what the run did and what each step cost. stoppedBy says why it ended: done, rounds or maxCredits. See Runs for the rest.
Cap what a run spends
maxCredits is the most a run may spend. It counts in steps of $0.002, so `500` is $1 and the default of 2500 is $5. Every step is checked against what is left before it runs, so a run never goes over. What it spent before it stopped is charged.
A run that cannot answer inside the cap ends with status of failed and stopReason of credit_limit_reached. What it found is in partial, and partialSchemaValid says whether partial fills your schema. This real run was sent maxCredits of 1, which is $0.002, so it could not pay for a page and an answer. The answer is cut to the fields that matter.
Options
Price
Each search and page costs its normal price, plus $3 per 1,000 pages for each planning or answering step that returns something, up to your cap, which is $5 when you leavemaxCredits out. Starting the run is free, and each step is charged when it finishes. A run that finds nothing within the cap still pays for the steps it took. See Pricing.