Create Execution Job
curl --request POST \
--url https://api.example.com/v1/execution_jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serialized_function": "<string>",
"environment": {
"python_version": "3.12",
"pypi_dependencies": [],
"environment_variables": {}
},
"resources": {
"cpu": 1,
"memory_mib": 1,
"gpu": "<string>",
"timeout_seconds": 300
},
"arguments": {
"positional": [],
"keyword": {}
}
}
'import requests
url = "https://api.example.com/v1/execution_jobs"
payload = {
"serialized_function": "<string>",
"environment": {
"python_version": "3.12",
"pypi_dependencies": [],
"environment_variables": {}
},
"resources": {
"cpu": 1,
"memory_mib": 1,
"gpu": "<string>",
"timeout_seconds": 300
},
"arguments": {
"positional": [],
"keyword": {}
}
}
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({
serialized_function: '<string>',
environment: {python_version: '3.12', pypi_dependencies: [], environment_variables: {}},
resources: {cpu: 1, memory_mib: 1, gpu: '<string>', timeout_seconds: 300},
arguments: {positional: [], keyword: {}}
})
};
fetch('https://api.example.com/v1/execution_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://api.example.com/v1/execution_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([
'serialized_function' => '<string>',
'environment' => [
'python_version' => '3.12',
'pypi_dependencies' => [
],
'environment_variables' => [
]
],
'resources' => [
'cpu' => 1,
'memory_mib' => 1,
'gpu' => '<string>',
'timeout_seconds' => 300
],
'arguments' => [
'positional' => [
],
'keyword' => [
]
]
]),
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://api.example.com/v1/execution_jobs"
payload := strings.NewReader("{\n \"serialized_function\": \"<string>\",\n \"environment\": {\n \"python_version\": \"3.12\",\n \"pypi_dependencies\": [],\n \"environment_variables\": {}\n },\n \"resources\": {\n \"cpu\": 1,\n \"memory_mib\": 1,\n \"gpu\": \"<string>\",\n \"timeout_seconds\": 300\n },\n \"arguments\": {\n \"positional\": [],\n \"keyword\": {}\n }\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://api.example.com/v1/execution_jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"serialized_function\": \"<string>\",\n \"environment\": {\n \"python_version\": \"3.12\",\n \"pypi_dependencies\": [],\n \"environment_variables\": {}\n },\n \"resources\": {\n \"cpu\": 1,\n \"memory_mib\": 1,\n \"gpu\": \"<string>\",\n \"timeout_seconds\": 300\n },\n \"arguments\": {\n \"positional\": [],\n \"keyword\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/execution_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 \"serialized_function\": \"<string>\",\n \"environment\": {\n \"python_version\": \"3.12\",\n \"pypi_dependencies\": [],\n \"environment_variables\": {}\n },\n \"resources\": {\n \"cpu\": 1,\n \"memory_mib\": 1,\n \"gpu\": \"<string>\",\n \"timeout_seconds\": 300\n },\n \"arguments\": {\n \"positional\": [],\n \"keyword\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}execution
Create Execution Job
Persist one Python function and its portable arguments as a job.
POST
/
v1
/
execution_jobs
Create Execution Job
curl --request POST \
--url https://api.example.com/v1/execution_jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"serialized_function": "<string>",
"environment": {
"python_version": "3.12",
"pypi_dependencies": [],
"environment_variables": {}
},
"resources": {
"cpu": 1,
"memory_mib": 1,
"gpu": "<string>",
"timeout_seconds": 300
},
"arguments": {
"positional": [],
"keyword": {}
}
}
'import requests
url = "https://api.example.com/v1/execution_jobs"
payload = {
"serialized_function": "<string>",
"environment": {
"python_version": "3.12",
"pypi_dependencies": [],
"environment_variables": {}
},
"resources": {
"cpu": 1,
"memory_mib": 1,
"gpu": "<string>",
"timeout_seconds": 300
},
"arguments": {
"positional": [],
"keyword": {}
}
}
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({
serialized_function: '<string>',
environment: {python_version: '3.12', pypi_dependencies: [], environment_variables: {}},
resources: {cpu: 1, memory_mib: 1, gpu: '<string>', timeout_seconds: 300},
arguments: {positional: [], keyword: {}}
})
};
fetch('https://api.example.com/v1/execution_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://api.example.com/v1/execution_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([
'serialized_function' => '<string>',
'environment' => [
'python_version' => '3.12',
'pypi_dependencies' => [
],
'environment_variables' => [
]
],
'resources' => [
'cpu' => 1,
'memory_mib' => 1,
'gpu' => '<string>',
'timeout_seconds' => 300
],
'arguments' => [
'positional' => [
],
'keyword' => [
]
]
]),
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://api.example.com/v1/execution_jobs"
payload := strings.NewReader("{\n \"serialized_function\": \"<string>\",\n \"environment\": {\n \"python_version\": \"3.12\",\n \"pypi_dependencies\": [],\n \"environment_variables\": {}\n },\n \"resources\": {\n \"cpu\": 1,\n \"memory_mib\": 1,\n \"gpu\": \"<string>\",\n \"timeout_seconds\": 300\n },\n \"arguments\": {\n \"positional\": [],\n \"keyword\": {}\n }\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://api.example.com/v1/execution_jobs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"serialized_function\": \"<string>\",\n \"environment\": {\n \"python_version\": \"3.12\",\n \"pypi_dependencies\": [],\n \"environment_variables\": {}\n },\n \"resources\": {\n \"cpu\": 1,\n \"memory_mib\": 1,\n \"gpu\": \"<string>\",\n \"timeout_seconds\": 300\n },\n \"arguments\": {\n \"positional\": [],\n \"keyword\": {}\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/execution_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 \"serialized_function\": \"<string>\",\n \"environment\": {\n \"python_version\": \"3.12\",\n \"pypi_dependencies\": [],\n \"environment_variables\": {}\n },\n \"resources\": {\n \"cpu\": 1,\n \"memory_mib\": 1,\n \"gpu\": \"<string>\",\n \"timeout_seconds\": 300\n },\n \"arguments\": {\n \"positional\": [],\n \"keyword\": {}\n }\n}"
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
An API key or OAuth2/OIDC access token sent as Authorization: Bearer <token>.
Body
application/json
One Python function plus independently portable arguments.
Minimum string length:
1Available options:
3.12, 3.13, 3.14 A reproducible Python runtime for an execution.
Cloudpickle, PyArrow, Pydantic, outerproduct-dataframe,
outerproduct-hpo, and outerproduct-serialization are supplied and
versioned by the execution runtime. Environment variables are invocation
inputs rather than image inputs, so changing one does not invalidate the
dependency image cache. They are ordinary, non-secret values; secret
injection is a separate runtime capability.
Show child attributes
Show child attributes
Compute capacity and deadline requested for one execution.
Show child attributes
Show child attributes
Show child attributes
Show child attributes