Create a job
Reuse connection setup and save this request asjob.json:
job.json
202 JobCreated: a Job with job_id as an additional alias of id. Set JOB_ID to that id. For safe submission retries, use an Idempotency-Key.
Required inputs
Dataset names must be distinct. Built-in agent models must appear on that harness’s
/api/meta roster; registered agents accept their own model names. Unknown request fields are refused rather than ignored. See full job input definitions for nested schemas and supported harness settings.
Run settings
max_trial_spend_usd caps agent model spend for each attempt. worst_case_spend_usd multiplies that cap by the trial count and allowed attempts, including retries; it excludes separate judge and analysis spend. Those charges can add to the bill. There is no enforced job-wide cap. Read the cost fields; an unmeasured cost is not evidence of free execution.
The optional retry object accepts:
See run settings for the default exclusions and retry behavior. This policy is separate from retrying a failed HTTP request.
Read and compare
scope (my, shared, org; default my) or org (slug/id), never both. Other optional filters are kind (job, check, all; default job), repeatable status, agent, model, and sandbox_provider, plus dataset, is_regrade, uploaded, and search. Sorting accepts sortField=created and sortDirection=asc|desc (default descending). Use catalog pagination.
Trial status filters accept repeated or comma-separated values from the trial status vocabulary. failed_only selects trials carrying exceptions, excluding cancelled trials, and combines with other filters. The list truncates exception messages to 2,000 characters; trial detail returns the full message.
Grep’s q is a case-insensitive POSIX pattern of at most 512 characters; type is at most 100. Results group matches by trial, with the exact count and up to five sample events. Use a trial’s trace endpoint to read all its matches.
Follow progress
GET /api/jobs/{jobId}/events returns 200 text/event-stream:
id (sequence), event (type), and JSON data. Resume after the last sequence with Last-Event-ID or ?after=<seq>. Heartbeat comments arrive every 15 seconds. curl does not reconnect automatically.
A trial.settled failure can be followed by trial.retrying; do not treat it alone as proof that automatic retries ended. trial.retry_circuit_broken explains why a retry was stopped. See job event fields.
Change execution
ScoringError, InfrastructureError, ApiUsageLimitError, and IncompleteTrialError, plus stopped trials and still-queued trials of a cancelled job.
Retry with no body retries every trial of a terminal job. failed_only: true selects failed trials, excluding scored and cancelled trials. Explicit trial_ids can select settled trials while the source job is still running. Do not combine trial_ids and failed_only.
Regrade requires a terminal source with recorded verifier inputs and eligible trials. See execution method details for eligibility and linked-job result fields.
Import recorded jobs
POST /api/jobs/upload accepts multipart data with exactly one archive (gzipped Harbor job directory) or public HTTPS archive_url. Optional dataset is name or name@version and links trial task names to that dataset.
202 JobImport, not a job. Poll GET /api/jobs/imports/{importId} until COMPLETED or FAILED; completion provides job_id. GET /api/jobs/imports accepts status, limit, and cursor. Import statuses are QUEUED, RUNNING, COMPLETED, and FAILED.
The archive must contain result.json and config.json at its root. Imported rewards are retained. Reported cost stays separate from platform-metered cost. See import fields for skipped trials, task linkage, and failures.
Large uploads use the resumable protocol with these job paths:
Share and delete
Share management and deletion require the creator. Team membership or an email share grants read access, not these operations.Errors
Creation can refuse an unready dataset (409 version_not_ready), an explicitly named failed task (409 task_failed_to_build), an unsupported task/provider combination (422 provider_unsupported), insufficient credits (402), or organization queue capacity (429 quota_exceeded). A bulk selection can exclude tasks whose builds failed; inspect build_exclusions on the accepted job.
Execution changes can return job_not_terminal, trial_not_settled, job_uploaded, or a code describing an empty eligible selection. Read the job and trial error catalog before deciding whether to retry.
