Skip to main content
The standard loop is search, pick a doc_id, read it, optionally send feedback:
Keep returned source URLs and IDs (doc_id, search_id, capture_id, canonical_url) when you need to audit or cite a result. See provenance.

Commands

Global flags

Available on every command: --format is not a global flag — it belongs to search only. --format maps to the API’s response shaping verbosity: compact is the token-efficient choice for search-then-read loops, standard adds quotable passages, full adds capture provenance.

read

The target should be a full URL (https://…) or a doc_id UUID; a scheme-less target (e.g. example.com) is normalized to https:// by the API. A truncated read reports content.truncated: true plus content.char_count and content.start_char (omitted when 0). Continue with --start-char set to start plus count — don’t retry with a bigger --max-chars:

feedback

--event-type is required. Values: result_helpful, result_not_helpful, passage_used, read_abandoned, duplicate_result, stale_result, spam_or_low_quality, missing_expected_source, unsafe_or_policy_issue. Pair it with --search-id and/or --doc-id so the event lands on the right target.

files

Upload documents into your organization’s files knowledge base and search them with the workspace scope:
The upload PUTs the bytes straight to storage via a presigned URL — the API key is never sent to storage. --mode full on files index reprocesses everything instead of just new/changed files.

usage

See your organization’s API usage rendered in the terminal — headline totals, a request sparkline, per-endpoint and per-key tables, and billable spend:
Notes:
  • All numbers are scoped to the organization that owns the API key. The data matches the console’s usage dashboard.
  • Spend fields are spend_cents (exact, possibly fractional cents). The human view formats them as dollars.
  • The window is at most 92 days; --interval hour needs a range of 8 days or less.
  • --key sets the API key; the per-key filter is --key-id.

Reading from stdin

- reads stdin to EOF for the search query, the read target, auth login --key -, and api --input -:

JSON output

With --json, data is a single JSON object on stdout and errors are a JSON envelope on stderr (hint only when present):
All fields are snake_case, exactly as the API returns them. Human (non---json) output is not a stable interface — never parse it. -o <file> writes the data payload to the file and suppresses stdout entirely, so output limits can’t truncate JSON mid-parse. The agent pattern is write-then-read:
Errors still go to stderr, and the exit code is unchanged.

Exit codes

Branch on these, not on output parsing — see Scripting and CI.

For agents