Jobs
Training and inference are durable async jobs. Routes that start work return a job id instead of waiting for model execution to finish.
Lifecycle
Section titled “Lifecycle”stateDiagram-v2
[*] --> pending
pending --> started
started --> success
started --> failure
Typical statuses are:
pending: The job record exists but execution has not started.started: A handler is running or has been dispatched.success: The handler completed successfully and output is available when supplied.failure: The handler failed and error details are available when supplied.
Polling
Section titled “Polling”Use the global lookup route when you only have a job id:
curl "https://staging-pie.streamline.enterprises/v2/jobs/<job_id>" \ -H "Authorization: Bearer ${TOKEN}"Poll with backoff. Do not spin aggressively; model work may run in Lambda, ECS, or another handler backend.
Inputs, outputs, and errors
Section titled “Inputs, outputs, and errors”Jobs can store:
input: The request payload or handler input.output: Handler output metadata, such as an S3 URI.error: Structured failure details from the handler.assignment_id: Present when the job was launched through an assignment.- timestamps: creation, start, and completion times.
Output and error shapes are model-specific. Use handler contracts and the model documentation for the payload semantics.
Completion callbacks
Section titled “Completion callbacks”External handlers report completion through the job completion route. Normal consumers usually do not call this route unless they are implementing a handler or worker.