Menu

Agent

Agent parameters

Every field of an Agent request, the processors and the model tiers, and everything a run returns.

Copy as MarkdownOpen in ChatGPT (opens in a new tab)Open in Claude (opens in a new tab)

CallDoesCost
POST https://api.millionshort.com/v1/agentStarts a run. Answers 202 with the runMetered: see Pricing
GET https://api.millionshort.com/v1/agent/{id}Status, progress and steps; the result once the run has endedFree
GET https://api.millionshort.com/v1/agent/{id}/resultsThe result alone. 202 with "ready": false while the run is goingFree
GET https://api.millionshort.com/v1/agent/{id}/eventsThe steps as server-sent eventsFree
DELETE https://api.millionshort.com/v1/agent/{id}Cancels the runFree; work already done is charged

Request

Only prompt is required. Any field not listed here is a 400 INVALID_PARAM.

The question

FieldTypeDefaultExampleNotes
promptstring, 3 to 4,000 charactersrequired"prompt": "Which provinces changed their minimum wage in 2026, and to what?"The question, or the task. Say what you want to know, and for when
urlsarray of URLs, 1 to 10none"urls": ["https://example.org/report-2026"]Pages to read first, before any search. They pass the same URL rules, robots.txt and limits per site as Extract
schemaobject: a JSON Schemanone"schema": { "type": "object", "properties": { "founded": { "type": "integer" } } }Must have "type": "object" and properties. The result then comes back as output in this shape, and answer is null. See With a schema

Where the run may look

Each of these applies to every search the run makes.

FieldTypeDefaultExampleNotes
sourcesarray of source slugs, 1 or morethe run chooses among all of them"sources": ["web", "news"]The sources the run may search
spacestringnone"space": "curated:home-cooking"A Space: its sites and filters apply to every search. The request's own include_domains and exclude_domains win over the Space's
remove_top_sitesinteger, 0 to 1,000,0000"remove_top_sites": 1000Removes the N most popular sites from every search
include_domainsarray of strings, 1 to 20none"include_domains": ["canada.ca", "ontario.ca"]Search only these sites
exclude_domainsarray of strings, 1 to 50none"exclude_domains": ["pinterest.com"]Leave these sites out
start_datestring, YYYY-MM-DDnone"start_date": "2026-01-01"Only results from this day on, on the sources that carry dates

How much work, and who writes

FieldTypeDefaultExampleNotes
processorlite, standard or prostandard"processor": "lite"How much work the run may do. A ceiling on work, not a price. See Processors
modelauto or one of the tiers in Modelsauto"model": "balanced"The model that writes the answer, by tier. Any other value is a 400
max_creditsinteger, 10 up to your plan's per-run capThe lesser of your plan's per-run cap and what the tier needs: 40, 120 and 1,500 for lite, standard and pro, raised to the least the chosen tier needs"max_credits": 60The most the run may cost. Held when the run starts. Above your plan's per-run cap, the request is refused with 400 INVALID_PARAM. See The per-run cap and The cap

The per-run cap

max_credits may be at most your plan's per-run cap: Free 200, Starter 1,000, Growth 2,500, Scale 5,000, Business 10,000, Enterprise by agreement.

Being told

FieldTypeDefaultExampleNotes
webhook_idstringnone"webhook_id": "wh_01jd3v9k2m8q4r6s0t1u2v3w4x"An active webhook endpoint of your team. An agent.completed event is delivered there when the run ends

The Idempotency-Key header

HeaderTypeExampleNotes
Idempotency-Keystring, up to 255 charactersIdempotency-Key: fares-2026-11-20Optional. Honoured for 24 hours

Processors

processor sets the most a run may do. A run often does less: it stops searching when it has what the question needs.

ProcessorSearchesPages readFollow-up searchesSecond pass over citationsWrites onDefault max_credits
liteup to 3up to 6nonenofast40
standardup to 6up to 12up to 2yesfast120
proup to 12up to 24up to 4yesbalanced1,500

Choosing a processor has advice.

Models

model chooses which model writes the answer. You choose a tier, not a model by name: which model runs a tier is ours to choose, and it can change.

modelWhat it isPrice of its tokensInput, per 1,000 tokensOutput, per 1,000 tokensLeast max_credits
autoThe processor's own: fast on lite and standard, balanced on proas that tier
fastThe quickest and the cheapest (the default on lite and standard)1×0.4210
balancedA larger model, at a higher price (the default on pro)20×840125
bestOur top-tier model, at the highest price40×1680245

The run

Every call returns the run in data, in the usual envelope with request_id, usage and warnings.

FieldTypeNotes
idstringagt_ and 26 characters. Names the run in every other call
statusstringSee Status
processorstringAs asked for, or standard
modelstringThe model that writes. auto is shown as the model it became
max_creditsnumberThe cap of this run, after any rise to what the tier needs or cut to the plan's per-run cap
requestobjectThe request as it was understood: the processor, the model, the cap and the fields you sent. schema is shown as true
progressobjectWhere the run is: step, searches, pages_read, model_calls, and credits spent so far
stop_reasonstring or nullWhy the run ended. null until it has, and it stays null on a failed run: error says why. See Stop reasons
webhook_idstring or nullThe endpoint named at the start
created_at, started_at, finished_attimestampsstarted_at and finished_at are null until they happen
errorobjectOn a failed run only: code and message
stepsarrayWhat the run has done so far. On GET /v1/agent/{id}. See Steps

Once the run has ended, GET /v1/agent/{id} also carries the result:

FieldTypeNotes
answerstring or nullThe answer, with [n] markers. Every statement has at least one. null with schema, and when nothing could be supported
outputobject or nullWith schema: the answer as data, in your shape
citationsarrayOne entry for each [n]. See Citations
sourcesarrayEvery page the writer was given. See Sources
uncited_removedintegerStatements removed because no quote of theirs was kept
verifiedbooleanOn standard and pro only: true when the second pass over the citations was made. false when it could not be afforded, reached or read; the quote check alone then stands, and the answer is kept. Absent on lite, and on a standard or pro run that ended before it reached the second pass
field_citationsobjectWith schema: each cited field of output, and its citation numbers
uncited_fieldsarray of stringsWith schema: the filled top-level fields that no checked quote supports
not_answeredstringWhen the writer could tell: what the pages read did not answer
schema_errorstringWith schema: why no output could be given
attributionobjectOn a run that looked places up: the credit line (text, url) every Places answer carries. Show it, or a link to the page it names, wherever you show the answer. No parameter removes it

sources lists the pages the writer was given. When the pages read do not fit in the writing step (in what is left of max_credits, or in one model call), the last ones are left out of the run: they are not in sources, and nothing can cite them. The writer is given each page up to a length: 6,000 characters on lite, 8,000 on standard and pro.

Runs are kept for 30 days after they end.

Status

statusMeaning
queuedAccepted, not started yet
runningWorking. progress says where
cancellingA cancel was asked for and the current step is stopping
completedEnded with an answer. stop_reason is done
incompleteEnded early. It carries what it has, which may be an answer, a partial one or none. stop_reason says why
failedEnded without a result and without a charge: a fault on our side, which includes a run that was not started within 30 minutes, or a team that could not cover the run when it ended. error says which. stop_reason stays null
cancelledEnded because you cancelled it

The last four are endings: a run in one of them does not change again.

Stop reasons

stop_reasonGoes withMeaning
donecompletedThe run finished
budgetincompleteThe next step would have gone past max_credits
timeincompleteThe run reached 10 minutes
no_sourcesincompleteThe searches found nothing the run could read
no_supportincompletePages were read, and no statement could be supported by a quote
no_answerincompleteThe model would not, or could not, write an answer in a form that can be checked
cancelledcancelledYou cancelled it

Errors says what to try for each.

Steps

Each entry of steps has seq, a number that only goes up, type, and at, when it happened. The rest depends on the type.

typeAlso carries
startedprocessor, model
plansearches: the searches planned, each with query and source. places, when the question names somewhere
searchquery, source, results, and new: how many of them the run had not seen. A search that could not be served has skipped and is not charged
placesThe lookup, and results
readasked and read: pages asked for, and pages that came back
gap_checksearches: the follow-up searches. On standard and pro
writestatements and quotes_checked. With schema: schema_valid and fields_with_quotes
verifychecked and unsupported: the second pass. On standard and pro
checkstatements_kept and statements_removed. With schema: fields_cited and fields_uncited

The steps say what the run did, not what it read: page text is never in a step. The list keeps the most recent steps of a long run. Treat the fields beyond seq, type and at as information for a person or a log; new ones can be added.

Citations

FieldTypeNotes
nintegerThe number of the [n] marker. citations[n-1] is citation n
urlstring or nullThe page. null for a citation of places
titlestring or null
sourcestringThe source the page came from
quotestringThe words of the page that support the statement: one unbroken run of the text we fetched, at least 3 words and 12 characters

Sources

FieldTypeNotes
urlstring or null
titlestring or null
sourcestring
howstringWhere the text came from: search (it came with the search result), cached (a stored copy), live (fetched for this run) or places
citedbooleanWhether the answer cites it

With a schema

Usage

usage is in the envelope, beside data. It is all zeros and empty objects until the run ends, because a run is charged once, at its end. progress.credits is the running figure before then.

FieldNotes
creditsWhat the run was charged
cost_usdThe same amount in US dollars
breakdownThe charge by line. See below
stepsThe counts behind it: searches, pages_read, places_lookups, model_calls, input_tokens, output_tokens
Line of breakdownWhat it is
searchThe searches, per source searched
search_contentThe page text that came with search results
extract_cachedPages read from a stored copy
extract_livePages fetched live
placesPlaces lookups
model_input, model_outputThe model's tokens, in and out
minimumWhat was added to bring a small completed or incomplete run up to the least such a run is charged. Never on a cancelled run
over_cap_not_chargedNegative. The part of a step that cost more than it was sized for. It is not charged, and the cap stands

A line that is zero is left out. Pricing and limits has the price of each.

The result alone

Text
GET https://api.millionshort.com/v1/agent/{id}/results
FieldNotes
id, statusAs on the run
readyfalse while the run is going: the answer is 202, with a Retry-After header. true once it has ended
stop_reason, answer, output, citations, sources, uncited_removedOnce ready is true. As on the run, with verified, field_citations, uncited_fields, not_answered, schema_error and attribution where they apply

The event stream

Text
GET https://api.millionshort.com/v1/agent/{id}/events

Server-sent events. ?after=<seq> skips the steps up to that number.

Eventdata
agent.stepOne step
agent.doneid, status, stop_reason and usage. Sent once, when the run has ended

A stream closes after agent.done, or after 5 minutes, whichever comes first. A team may have 2 open at once (429 RATE_LIMITED beyond). There is also a limit shared by all teams: when it is full the answer is 429 CAPACITY, and you should poll instead. The quickstart shows one being read.

The webhook event

agent.completed is delivered to webhook_id when the run ends, whatever its ending. Its data has id, status, stop_reason and credits_used. Webhooks says how deliveries are signed and retried.

Limits

LimitValue
Runs going at once, per team3
Event streams open at once, per team2
The longest a run may take10 minutes
The longest one event stream stays open5 minutes
The longest a run waits to be started30 minutes; after that it ends failed, free
How long a run is kept after it ends30 days
prompt3 to 4,000 characters
urlsup to 10
include_domains, exclude_domainsup to 20 and 50
max_credits10 or more, up to the plan's per-run cap; above it, 400 INVALID_PARAM naming the cap
Idempotency-Keyup to 255 characters, honoured for 24 hours

Polling is free and does not count against your plan's requests a minute. It has a limit of its own, high enough for a poll every second on each of your runs; past it a poll is 429 RATE_LIMITED with Retry-After.

This page as Markdown · llms.txt