Skip to main content
POST
Fast: 10 Credits · Ultra: 100 Credits Describe what you need to find in task. Answers searches the web, reads relevant pages, and returns json_content in your requested shape, along with the sources used.

Choose a mode

The default is ultra. Set mode in the JSON request body to select a level. Successful responses consume the selected mode’s credits, including answers with unknown values. Validation, research, and timeout failures are not charged. The X-Credits-Used response header reports the charge.

Shape the answer

Pass json_format as an example object. Its keys and placeholder values describe the answer you want. For example, use this request body to find a company’s pricing page and plan names:
The response puts the requested fields inside json_content and returns source URLs separately:
When you omit json_format, the answer uses {"result": ""}. Nonempty objects preserve their keys. Text, numbers, and true/false values preserve their types. Unknown values may be null. An example array describes the shape of its items; the returned array can contain any number of matching items. Empty objects accept arbitrary fields, empty arrays accept any JSON items, and a null placeholder accepts any JSON value. The example supports at most 8 levels, 500 values, and 16,000 serialized characters. Use an example object rather than a JSON Schema definition.

Sources and research scope

Include a domain or complete page URL in task to focus research on that site. The task can contain up to 2,000 characters after trimming. sources contains the URLs that supplied search results or readable page content, deduplicated in first-seen order. It does not map individual fields to citations. A listed URL may have contributed a search snippet without its full page being read. Page reads contribute a source only when they return readable content.

Timeouts and errors

Set timeoutOpts.behavior to "return-partial" to stop research before the deadline and return an answer from the evidence already gathered. A successful partial answer still matches json_format, includes partial: true, and costs the selected mode’s credits. If usable evidence or a valid answer is unavailable, the request fails without a charge. The default behavior is "fail"; see Timeouts and partial results. timeoutOpts.milliseconds accepts 1,000–300,000 milliseconds. A value below the selected mode’s research limit shortens the deadline; a larger value keeps the 30-second Fast or 50-second Ultra limit. Zero data retention is unsupported for Answers. Enabling it returns 400 ZDR_NOT_SUPPORTED before research and billing. Standard authentication and rate limits also apply.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <API_KEY>. Keys have full access by default.

Body

application/json
task
string
required

What to research and answer, in plain language. Naming a domain in the task (for example "pricing on context.dev") makes the agent read that site before it searches.

Required string length: 1 - 2000
mode
enum<string>

Research level: fast uses a smaller model and research budget for 10 credits; ultra uses deeper reasoning and research for 100 credits. Defaults to ultra. Only successful requests consume credits.

Available options:
fast,
ultra
json_format
object

An example object with placeholder values (for example {"pricing_page_url": "", "plans": [{"name": "", "price": 0}]}). Object keys and value types are preserved; unknown values may be null. Empty arrays accept any JSON items. Defaults to {"result": ""}. Maximum 8 levels, 500 values, and 16000 characters.

timeoutOpts
object

Optional request deadline and behavior on timeout. For GET requests, use timeoutOpts[milliseconds]=30000&timeoutOpts[behavior]=fail or a JSON-encoded timeoutOpts object.

tags
string[]

Optional tags for tracking usage. Up to 20 tags, each 1 to 50 characters.

Maximum array length: 20
Required string length: 1 - 50
Example:

Response

The requested JSON shape, plus the sources used

json_content
object
required

The answer, in the shape requested by json_format.

sources
string[]
required

URLs that supplied search results or readable page content, in first-seen order. Unreadable pages are excluded.

partial
boolean

True when the request deadline ended research and the answer uses the evidence collected so far.

key_metadata
object

Credit usage, included whenever a valid API key is provided.