Skip to main content

Setup

Put them in your environment or .env; Data APIs covers the other ways.

Notes

  • The header is x-api-key, not Authorization: Bearer.
  • Pay per use from a credit balance; paid plans unlock specialist sources (SEC filings, trials, patents); a 403 can mean a plan too low for a dataset.
  • Async patterns: contents with async true returns a job_id (poll valyu.contents.job); DeepResearch returns a task id (poll valyu.research.status).
  • The streaming Answer endpoint (POST /v1/answer, server-sent events) is left out.
  • Web search (POST /v1/search) is served by search(provider=“valyu”), so it is not listed here.

Endpoints

Extract content from URLs

  • A read over POST, billed per URL; with async true it starts a billed job instead of answering at once.
  • Asynchronous when async is true: the response carries a job_id. Poll valyu.contents.job with it.
  • 0.2 credits per extracted URL, 0.6 with summary; failed URLs are free. Inspect each result: a 206 means some URLs failed.

Poll an async extraction job

  • Polls the job started by valyu.contents.extract. Only the key that created a job can read it.

Start a DeepResearch task

  • Starts a billed job that only produces data, so it is kind read.
  • Asynchronous: the response carries a task id. Poll valyu.research.status with that id; instant mode finishes in under 30 seconds, heavier modes take minutes.
  • Billed a fixed number of credits per task by mode.

Get a DeepResearch task’s status and result

  • Polls the task started by valyu.research.create.

List DeepResearch tasks

List data sources

List data source categories