Push New Job
Creates a new job.
This endpoint triggers either a function or a model with a given set of inputs. The structure of the inputs should match the inputs types specified in the function or model definition.
Example
A function that takes in a sieve.File
named video
and a sieve.File
named image
would be triggered with the following request:
{
"function": "sieve/sample_function",
"inputs": {
"video": {
"url": "{SOME_VIDEO_URL}"
},
"image": {
"url": "{SOME_IMAGE_URL}"
}
}
}
A function that takes in a string
named prompt
would be triggered with the following request:
{
"function": "sieve/some_function",
"inputs": {
"prompt": "some string"
}
}
Webhooks
Webhooks provide a way for notifications to be delivered to an external web server when various events related Sieve jobs occur.
The following is a full list of all webhook event types.
Event | Description |
---|---|
job.start | Occurs when a job starts. |
job.complete | Occurs when a job completes. |
job.complete.no_output | Occurs when a job completes — excludes the output payload from the response. |
job.new_output | Occurs when a job produces a new output. |
Authorizations
The Sieve API key to authenticate with.
Headers
Body
The name of the function, in the format of author/name[:version]
. Either function
or id
may be specified, but not both.
The ID of the function to be called.
The inputs to the job — read more about inputs here.
Webhooks — see more info here.
Environment variables for the given job.
Response
The ID of the job.
Internal metadata.
Whether the output will be streamed.
The status of the job. Possible values: 'queued', 'processing', 'error', 'finished', 'cancelled'
The ID of the organization.
The ID of the model.
The ID of the workflow.
Was this page helpful?