Jobs
A job is one run of the extraction pipeline on one source video. Submit a job with a source URI and a schema, poll for status, then read back the typed result.
Create a job#
/v1/jobsIdempotency-Key header and an optional X-Lirovo-Model-Stack header to override model routing. Returns 202 with the queued job.Provide a source URI and either a registered schema_id or an inline schema_inline (the two are mutually exclusive; sending both returns 422 CONFLICTING_SCHEMA_REF). The job is accepted with 202 and processed asynchronously.
source_urirequiredURL of the source video. Must resolve to a supported source.
schema_idA registered schema id (sch_...). Mutually exclusive with schema_inline.
schema_inlineAn inline JSON Schema. Mutually exclusive with schema_id.
destination_idsUp to 10 destination ids to push results to once succeeded.
webhook_urlReceive a POST when the job reaches a terminal state.
curl -X POST https://api.lirovo.ai/v1/jobs \
-H "Authorization: Bearer $LIROVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source_uri": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"schema_id": "sch_a1b2c3"
}'List jobs#
/v1/jobslimit (1 to 100, default 25), cursor, and a status filter. Returns { data, next_cursor }.The status filter accepts one of queued, running, succeeded, failed, or cancelled. Pass the opaque next_cursor from a previous response as cursor to page forward.
curl "https://api.lirovo.ai/v1/jobs?status=succeeded&limit=25" \
-H "Authorization: Bearer $LIROVO_API_KEY"Get a job#
/v1/jobs/{id}404 if it does not exist for this tenant.Job object
idrequiredJob id, e.g. job_x9k2m4.
statusrequiredOne of queued, running, succeeded, failed, cancelled.
current_stageThe pipeline stage currently running.
source_typerequiredOne of youtube, vimeo, loom, s3, upload, url.
source_urirequiredThe submitted source URL.
source_duration_sSource duration in seconds, once probed.
schema_idThe schema used, if registered.
extraction_idPresent once succeeded, e.g. ext_7p4q2r.
error_codeSet on failed or cancelled jobs.
error_messageHuman-readable failure reason.
webhook_urlThe webhook URL, if one was provided.
created_atrequiredSubmission timestamp.
started_atWhen processing began.
finished_atWhen the job reached a terminal state.
curl https://api.lirovo.ai/v1/jobs/job_x9k2m4 \
-H "Authorization: Bearer $LIROVO_API_KEY"Cancel a job#
/v1/jobs/{id}/cancelcancelled with error_code=CANCELLED. Returns 200 with the updated job.Cancel is idempotent: re-cancelling an already-cancelled job returns 200 with the existing state. A job already in a different terminal state (succeeded or failed) returns 409 JOB_ALREADY_TERMINAL: cancel does not apply.
curl -X POST https://api.lirovo.ai/v1/jobs/job_x9k2m4/cancel \
-H "Authorization: Bearer $LIROVO_API_KEY"Get the result#
/v1/jobs/{id}/result404 JOB_RESULT_NOT_READY if the job has not yet succeeded, or 404 JOB_NOT_FOUND if it does not exist.Job result object
job_idrequiredThe job this result belongs to.
extraction_idrequiredThe extraction id, e.g. ext_7p4q2r.
schema_idThe schema the output conforms to.
resultrequiredThe typed JSON output. Shape is tenant-defined by the job's schema.
validation_statusrequiredOne of clean, repaired, partial, failed.
model_usedThe model that produced the result.
tokens_inPrompt tokens consumed.
tokens_outCompletion tokens produced.
cost_centsCost of the run in cents.
created_atrequiredWhen the result was written.
curl https://api.lirovo.ai/v1/jobs/job_x9k2m4/result \
-H "Authorization: Bearer $LIROVO_API_KEY"Delete a job#
/v1/jobs/{id}deleted_at and keeps the row so artifacts and evidence keep their foreign keys; every read path then treats the resource as gone. Idempotent; returns { id, deleted_at }.Refuses with 409 JOB_NOT_TERMINAL on queued or running jobs: cancel first, or wait for the workflow to finish.
curl -X DELETE https://api.lirovo.ai/v1/jobs/job_x9k2m4 \
-H "Authorization: Bearer $LIROVO_API_KEY"