Migrate new work to v2
This page intentionally does not render v1 snippets. Use the v2 reference and quickstart for current request and response shapes.
Use the research resource
Create jobs with POST /api/v2/research and poll GET /api/v2/research/{job_id_or_slug}. v2 also exposes timeline, files, quota, and billing endpoints. Use effort: low, medium, high, or build. Older compatibility aliases should not be used in new integrations. Use report.markdown, structured_output, revisions, files, and timeline.items. Avoid legacy result parsing and status: complete as the primary shape. Expect { error: { code, message, details, request_id } } and use X-Request-ID plus X-Grep-* correlation headers when debugging.