Create job
curl --request POST \
--url https://app.factorize.sh/api/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"promptTemplate": "<string>",
"executionTargetId": "<string>",
"runNameTemplate": "<string>",
"concurrencyLimit": 1,
"model": "<string>",
"effort": "<string>",
"triggers": []
}
'import requests
url = "https://app.factorize.sh/api/v1/jobs"
payload = {
"name": "<string>",
"slug": "<string>",
"promptTemplate": "<string>",
"executionTargetId": "<string>",
"runNameTemplate": "<string>",
"concurrencyLimit": 1,
"model": "<string>",
"effort": "<string>",
"triggers": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
promptTemplate: '<string>',
executionTargetId: '<string>',
runNameTemplate: '<string>',
concurrencyLimit: 1,
model: '<string>',
effort: '<string>',
triggers: []
})
};
fetch('https://app.factorize.sh/api/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.factorize.sh/api/v1/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'promptTemplate' => '<string>',
'executionTargetId' => '<string>',
'runNameTemplate' => '<string>',
'concurrencyLimit' => 1,
'model' => '<string>',
'effort' => '<string>',
'triggers' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.factorize.sh/api/v1/jobs"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"promptTemplate\": \"<string>\",\n \"executionTargetId\": \"<string>\",\n \"runNameTemplate\": \"<string>\",\n \"concurrencyLimit\": 1,\n \"model\": \"<string>\",\n \"effort\": \"<string>\",\n \"triggers\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.factorize.sh/api/v1/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"promptTemplate\": \"<string>\",\n \"executionTargetId\": \"<string>\",\n \"runNameTemplate\": \"<string>\",\n \"concurrencyLimit\": 1,\n \"model\": \"<string>\",\n \"effort\": \"<string>\",\n \"triggers\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.factorize.sh/api/v1/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"promptTemplate\": \"<string>\",\n \"executionTargetId\": \"<string>\",\n \"runNameTemplate\": \"<string>\",\n \"concurrencyLimit\": 1,\n \"model\": \"<string>\",\n \"effort\": \"<string>\",\n \"triggers\": []\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}jobs
Create job
Requires the flows:write scope.
Accepts a scoped bearer token or interactive owner session.
POST
/
api
/
v1
/
jobs
Create job
curl --request POST \
--url https://app.factorize.sh/api/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"promptTemplate": "<string>",
"executionTargetId": "<string>",
"runNameTemplate": "<string>",
"concurrencyLimit": 1,
"model": "<string>",
"effort": "<string>",
"triggers": []
}
'import requests
url = "https://app.factorize.sh/api/v1/jobs"
payload = {
"name": "<string>",
"slug": "<string>",
"promptTemplate": "<string>",
"executionTargetId": "<string>",
"runNameTemplate": "<string>",
"concurrencyLimit": 1,
"model": "<string>",
"effort": "<string>",
"triggers": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
promptTemplate: '<string>',
executionTargetId: '<string>',
runNameTemplate: '<string>',
concurrencyLimit: 1,
model: '<string>',
effort: '<string>',
triggers: []
})
};
fetch('https://app.factorize.sh/api/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.factorize.sh/api/v1/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'promptTemplate' => '<string>',
'executionTargetId' => '<string>',
'runNameTemplate' => '<string>',
'concurrencyLimit' => 1,
'model' => '<string>',
'effort' => '<string>',
'triggers' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.factorize.sh/api/v1/jobs"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"promptTemplate\": \"<string>\",\n \"executionTargetId\": \"<string>\",\n \"runNameTemplate\": \"<string>\",\n \"concurrencyLimit\": 1,\n \"model\": \"<string>\",\n \"effort\": \"<string>\",\n \"triggers\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.factorize.sh/api/v1/jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"promptTemplate\": \"<string>\",\n \"executionTargetId\": \"<string>\",\n \"runNameTemplate\": \"<string>\",\n \"concurrencyLimit\": 1,\n \"model\": \"<string>\",\n \"effort\": \"<string>\",\n \"triggers\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.factorize.sh/api/v1/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"promptTemplate\": \"<string>\",\n \"executionTargetId\": \"<string>\",\n \"runNameTemplate\": \"<string>\",\n \"concurrencyLimit\": 1,\n \"model\": \"<string>\",\n \"effort\": \"<string>\",\n \"triggers\": []\n}"
response = http.request(request)
puts response.read_body{}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Required string length:
1 - 120Pattern:
^[a-z][a-z0-9_-]{0,29}$Required string length:
1 - 50000Minimum string length:
1Maximum string length:
500Required range:
1 <= x <= 50Maximum string length:
120Maximum string length:
40Maximum array length:
50- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Response
Created
The response is of type object.