API-key reference
Create a Research run
Create a durable thread and start its first Research investigation. Use this route when you want a new question to become a collection of source-grounded results that can be revisited later.
/ api/ v1/ research/ runRequired boundary headers
x-api-key or Authorization: BearerIdempotency-KeyWhat this route does
Use this route when a new investigation needs its own durable thread. The service validates the request, admits bounded work, and returns before discovery finishes.
Request parameters
Request body
Only fields in this request contract are accepted. The route rejects any undocumented field with a validation error and uses these fields to keep the work bounded and predictable.
promptRequiredstringThe question that gives the investigation its direction and keeps each source artifact tied to the caller's goal. Keep it between 1 and 20,000 characters so the request remains focused and bounded.
request_schema_versionOptional1 | 2Selects the request shape the service should interpret. Use version 2 when sending reference_artifact_ids, because explicit prior-artifact context is supported only by that contract version.
Default: 2
sizeOptionalsmall | medium | largeChooses a preset level of source coverage and discovery effort for the run. Use it when a simple capacity choice is more useful than setting each target separately; the supported values map to 15, 50, or 100 sources.
target_sourcesOptionalintegerSets how many sources the investigation should try to examine. The value can be from 1 through 1,000, keeping the requested scope visible and bounded before work starts.
search_callsOptionalintegerSets how many discovery searches the run must make while looking for useful material, from 1 through 100. When searches come back empty the run may make up to 4 more, never more than 100 in all, and its wallet hold covers that maximum.
resource_kindsOptionalpaper[] | web[]Chooses whether the investigation searches scholarly papers, general web resources, or both. At least one and no more than two implemented values may be supplied, and the default includes both surfaces.
Default: ["paper", "web"]
source_sitesOptionalstring[]Suggests reviewed source sites that should influence discovery. These are soft preferences, so unknown site values may be ignored rather than preventing the rest of the run from completing.
include_domainsOptionalstring[]Limits discovery to the listed hosts, and every host must be one of these 39 reviewed scholarly sites: arxiv.org, biorxiv.org, medrxiv.org, ssrn.com, osf.io, zenodo.org, semanticscholar.org, openreview.net, openalex.org, core.ac.uk, doaj.org, dblp.org, paperswithcode.com, aclanthology.org, proceedings.mlr.press, neurips.cc, huggingface.co, pubmed.ncbi.nlm.nih.gov, europepmc.org, nature.com, science.org, sciencedirect.com, link.springer.com, onlinelibrary.wiley.com, ieeexplore.ieee.org, dl.acm.org, jstor.org, plos.org, pnas.org, cell.com, thelancet.com, nejm.org, bmj.com, frontiersin.org, mdpi.com, tandfonline.com, journals.sagepub.com, cambridge.org, academic.oup.com. Any other host returns 422. You may provide up to 50 hostname-only values, and none may also appear in exclude_domains.
exclude_domainsOptionalstring[]Keeps the listed hostnames out of discovery; unlike include_domains, any hostname is accepted. You may provide up to 50 hostname-only values, and none may overlap include_domains because a domain cannot be both required and excluded.
published_afterOptionalYYYY-MM-DDFavors material published after the supplied calendar date. The value must be a real date in YYYY-MM-DD format so the filter has an unambiguous meaning.
languageOptionalstringTells discovery which language should be preferred when selecting material. Values must be between 2 and 12 characters, and the default is en.
Default: en
max_run_cost_centsOptionalintegerLimits what the run is charged, including the 5-cent run fee and 25% margin: the run stops before the next provider or model operation that would pass the cap, and the fee and margin never take the run past it. The value can be from 25 through 2,500 cents and defaults to 500 or your saved setting; a cap below what discovery must hold before it starts is refused, and the error names the minimum.
provider_keysOptionalstring[]Accepted as up to 20 reference names and stored with the run's request, but the current service never reads them, so they change nothing about the run. Never place raw provider credentials in a request.
reference_artifact_idsOptionalencrypted_id[]Adds a deliberate set of previously saved artifacts as context for the next investigation, when appending to a thread. Supply up to 15 unique encrypted public tokens and use request schema version 2; the service does not load every old artifact automatically. Create refuses any value with 422, because a new thread has no saved artifacts.
Request and response
Example request
curl -X POST "https://vidbyte-backend.onrender.com/api/v1/research/run" \
-H "x-api-key: $VIDBYTE_API_KEY" \
-H "Idempotency-Key: research-001" \
-H "Content-Type: application/json" \
-d '{"prompt":"Map evidence for AI tutoring","resource_kinds":["paper","web"]}'Example response
{
"encrypted_id": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"run_id": "rrun_example",
"status": "accepted"
}Response and errors
- Returns 202 Accepted with encrypted_id, run_id, and status.
- The run executes asynchronously after durable admission.