v14

latestOpenAPI 3.0.3Proprietaryraw.githubusercontent.com2026-06-2763565.4 KB

Submit an async intelligence job

Submit a job for async execution. Request body is { kind, input } discriminated by kind.

Response shapes:

  • 200 + { fromCache: true, result, charged } — identical recent job within the per-kind freshness window; cached result returned synchronously and charged at full rate (no cache discount).
  • 202 + { dedup: true } — identical job currently queued/running; reuses the in-flight jobId.
  • 202 + { estimated_cost } — new job accepted; the credits were reserved at the estimate. Poll GET /intelligence/jobs/{id}.
  • 402 — insufficient credits; body recommends how to fit your budget.

For records / insights, window (in input) is REQUIRED — it drives the credit price (fresher windows cost more). estimated_cost is an upper bound; the final charge is computed from the records actually returned.

Input validation is strict: any undeclared field, type mismatch, or out-of-enum value is rejected with 400 (nothing is silently stripped or coerced).

post/intelligence/jobs

Request body

kind'insights' | 'records' required

Response

Successful response

dedupboolean
fromCacheboolean
jobIdstring required
resultBytesnumber

Size of the stored result in bytes (present alongside resultUrl).

resultExpiresAtstring

ISO-8601 expiry of resultUrl (clamped to the job's own retention).

resultStorage's3'

Set to "s3" when the result was too large to return inline; in that case result is omitted and resultUrl holds a short-lived presigned download URL instead. Fetch the URL directly; re-poll for a fresh one after it expires (see resultExpiresAt).

resultUrlstring

Short-lived presigned GET URL for a large result (present iff resultStorage === "s3").

status'failed' | 'queued' | 'running' | 'succeeded' required
statusUrlstring