Schedule a new task
curl --request POST \
--url https://staging.hdp.api.herodotus.cloud/tasks \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"destination_chain_id": "0x534e5f5345504f4c4941",
"input": {
"compiled_class": {
"bytecode": [
"0x480680017fff8000",
"0x1",
"..."
],
"bytecode_segment_lengths": [
100
],
"compiler_version": "2.6.0",
"entry_points_by_type": {
"CONSTRUCTOR": [],
"EXTERNAL": [
{
"builtins": [
"range_check",
"pedersen"
],
"offset": 0,
"selector": "0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320"
}
],
"L1_HANDLER": []
},
"hints": [],
"prime": "0x800000000000011000000000000000000000000000000000000000000000001",
"pythonic_hints": []
},
"injected_state": {},
"params": [
"0x1234",
"0x5678",
"0x9abc"
]
},
"program_hash": "0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0",
"task_inputs": [
{
"value": "0x1234",
"visibility": "public"
},
{
"value": "0x5678",
"visibility": "private"
}
],
"webhook_url": "https://example.com/webhook"
}
'import requests
url = "https://staging.hdp.api.herodotus.cloud/tasks"
payload = {
"destination_chain_id": "0x534e5f5345504f4c4941",
"input": {
"compiled_class": {
"bytecode": ["0x480680017fff8000", "0x1", "..."],
"bytecode_segment_lengths": [100],
"compiler_version": "2.6.0",
"entry_points_by_type": {
"CONSTRUCTOR": [],
"EXTERNAL": [
{
"builtins": ["range_check", "pedersen"],
"offset": 0,
"selector": "0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320"
}
],
"L1_HANDLER": []
},
"hints": [],
"prime": "0x800000000000011000000000000000000000000000000000000000000000001",
"pythonic_hints": []
},
"injected_state": {},
"params": ["0x1234", "0x5678", "0x9abc"]
},
"program_hash": "0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0",
"task_inputs": [
{
"value": "0x1234",
"visibility": "public"
},
{
"value": "0x5678",
"visibility": "private"
}
],
"webhook_url": "https://example.com/webhook"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination_chain_id: '0x534e5f5345504f4c4941',
input: {
compiled_class: {
bytecode: ['0x480680017fff8000', '0x1', '...'],
bytecode_segment_lengths: [100],
compiler_version: '2.6.0',
entry_points_by_type: {
CONSTRUCTOR: [],
EXTERNAL: [
{
builtins: ['range_check', 'pedersen'],
offset: 0,
selector: '0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320'
}
],
L1_HANDLER: []
},
hints: [],
prime: '0x800000000000011000000000000000000000000000000000000000000000001',
pythonic_hints: []
},
injected_state: {},
params: ['0x1234', '0x5678', '0x9abc']
},
program_hash: '0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0',
task_inputs: [
{value: '0x1234', visibility: 'public'},
{value: '0x5678', visibility: 'private'}
],
webhook_url: 'https://example.com/webhook'
})
};
fetch('https://staging.hdp.api.herodotus.cloud/tasks', 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://staging.hdp.api.herodotus.cloud/tasks",
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([
'destination_chain_id' => '0x534e5f5345504f4c4941',
'input' => [
'compiled_class' => [
'bytecode' => [
'0x480680017fff8000',
'0x1',
'...'
],
'bytecode_segment_lengths' => [
100
],
'compiler_version' => '2.6.0',
'entry_points_by_type' => [
'CONSTRUCTOR' => [
],
'EXTERNAL' => [
[
'builtins' => [
'range_check',
'pedersen'
],
'offset' => 0,
'selector' => '0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320'
]
],
'L1_HANDLER' => [
]
],
'hints' => [
],
'prime' => '0x800000000000011000000000000000000000000000000000000000000000001',
'pythonic_hints' => [
]
],
'injected_state' => [
],
'params' => [
'0x1234',
'0x5678',
'0x9abc'
]
],
'program_hash' => '0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0',
'task_inputs' => [
[
'value' => '0x1234',
'visibility' => 'public'
],
[
'value' => '0x5678',
'visibility' => 'private'
]
],
'webhook_url' => 'https://example.com/webhook'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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://staging.hdp.api.herodotus.cloud/tasks"
payload := strings.NewReader("{\n \"destination_chain_id\": \"0x534e5f5345504f4c4941\",\n \"input\": {\n \"compiled_class\": {\n \"bytecode\": [\n \"0x480680017fff8000\",\n \"0x1\",\n \"...\"\n ],\n \"bytecode_segment_lengths\": [\n 100\n ],\n \"compiler_version\": \"2.6.0\",\n \"entry_points_by_type\": {\n \"CONSTRUCTOR\": [],\n \"EXTERNAL\": [\n {\n \"builtins\": [\n \"range_check\",\n \"pedersen\"\n ],\n \"offset\": 0,\n \"selector\": \"0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320\"\n }\n ],\n \"L1_HANDLER\": []\n },\n \"hints\": [],\n \"prime\": \"0x800000000000011000000000000000000000000000000000000000000000001\",\n \"pythonic_hints\": []\n },\n \"injected_state\": {},\n \"params\": [\n \"0x1234\",\n \"0x5678\",\n \"0x9abc\"\n ]\n },\n \"program_hash\": \"0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0\",\n \"task_inputs\": [\n {\n \"value\": \"0x1234\",\n \"visibility\": \"public\"\n },\n {\n \"value\": \"0x5678\",\n \"visibility\": \"private\"\n }\n ],\n \"webhook_url\": \"https://example.com/webhook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://staging.hdp.api.herodotus.cloud/tasks")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destination_chain_id\": \"0x534e5f5345504f4c4941\",\n \"input\": {\n \"compiled_class\": {\n \"bytecode\": [\n \"0x480680017fff8000\",\n \"0x1\",\n \"...\"\n ],\n \"bytecode_segment_lengths\": [\n 100\n ],\n \"compiler_version\": \"2.6.0\",\n \"entry_points_by_type\": {\n \"CONSTRUCTOR\": [],\n \"EXTERNAL\": [\n {\n \"builtins\": [\n \"range_check\",\n \"pedersen\"\n ],\n \"offset\": 0,\n \"selector\": \"0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320\"\n }\n ],\n \"L1_HANDLER\": []\n },\n \"hints\": [],\n \"prime\": \"0x800000000000011000000000000000000000000000000000000000000000001\",\n \"pythonic_hints\": []\n },\n \"injected_state\": {},\n \"params\": [\n \"0x1234\",\n \"0x5678\",\n \"0x9abc\"\n ]\n },\n \"program_hash\": \"0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0\",\n \"task_inputs\": [\n {\n \"value\": \"0x1234\",\n \"visibility\": \"public\"\n },\n {\n \"value\": \"0x5678\",\n \"visibility\": \"private\"\n }\n ],\n \"webhook_url\": \"https://example.com/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.hdp.api.herodotus.cloud/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination_chain_id\": \"0x534e5f5345504f4c4941\",\n \"input\": {\n \"compiled_class\": {\n \"bytecode\": [\n \"0x480680017fff8000\",\n \"0x1\",\n \"...\"\n ],\n \"bytecode_segment_lengths\": [\n 100\n ],\n \"compiler_version\": \"2.6.0\",\n \"entry_points_by_type\": {\n \"CONSTRUCTOR\": [],\n \"EXTERNAL\": [\n {\n \"builtins\": [\n \"range_check\",\n \"pedersen\"\n ],\n \"offset\": 0,\n \"selector\": \"0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320\"\n }\n ],\n \"L1_HANDLER\": []\n },\n \"hints\": [],\n \"prime\": \"0x800000000000011000000000000000000000000000000000000000000000001\",\n \"pythonic_hints\": []\n },\n \"injected_state\": {},\n \"params\": [\n \"0x1234\",\n \"0x5678\",\n \"0x9abc\"\n ]\n },\n \"program_hash\": \"0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0\",\n \"task_inputs\": [\n {\n \"value\": \"0x1234\",\n \"visibility\": \"public\"\n },\n {\n \"value\": \"0x5678\",\n \"visibility\": \"private\"\n }\n ],\n \"webhook_url\": \"https://example.com/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Task has been queued",
"uuid": "01J3Z3K2P4W6M8Q0A1B2C3D4E5"
}{
"error": "Invalid destination_chain_id format"
}{
"error": "Missing Herodotus Cloud X-API-KEY header"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"taskId": "<string>"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"taskId": "<string>"
}tasks
Schedule a new task
Creates a new Data Processor task of verified custom module execution with Atlantic submission and on-chain commitment. The task will be queued for processing through the HDP pipeline: dry run, chain proofs fetch, trace generation, Atlantic proving, and finally on-chain decommitment.
POST
/
tasks
Schedule a new task
curl --request POST \
--url https://staging.hdp.api.herodotus.cloud/tasks \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"destination_chain_id": "0x534e5f5345504f4c4941",
"input": {
"compiled_class": {
"bytecode": [
"0x480680017fff8000",
"0x1",
"..."
],
"bytecode_segment_lengths": [
100
],
"compiler_version": "2.6.0",
"entry_points_by_type": {
"CONSTRUCTOR": [],
"EXTERNAL": [
{
"builtins": [
"range_check",
"pedersen"
],
"offset": 0,
"selector": "0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320"
}
],
"L1_HANDLER": []
},
"hints": [],
"prime": "0x800000000000011000000000000000000000000000000000000000000000001",
"pythonic_hints": []
},
"injected_state": {},
"params": [
"0x1234",
"0x5678",
"0x9abc"
]
},
"program_hash": "0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0",
"task_inputs": [
{
"value": "0x1234",
"visibility": "public"
},
{
"value": "0x5678",
"visibility": "private"
}
],
"webhook_url": "https://example.com/webhook"
}
'import requests
url = "https://staging.hdp.api.herodotus.cloud/tasks"
payload = {
"destination_chain_id": "0x534e5f5345504f4c4941",
"input": {
"compiled_class": {
"bytecode": ["0x480680017fff8000", "0x1", "..."],
"bytecode_segment_lengths": [100],
"compiler_version": "2.6.0",
"entry_points_by_type": {
"CONSTRUCTOR": [],
"EXTERNAL": [
{
"builtins": ["range_check", "pedersen"],
"offset": 0,
"selector": "0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320"
}
],
"L1_HANDLER": []
},
"hints": [],
"prime": "0x800000000000011000000000000000000000000000000000000000000000001",
"pythonic_hints": []
},
"injected_state": {},
"params": ["0x1234", "0x5678", "0x9abc"]
},
"program_hash": "0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0",
"task_inputs": [
{
"value": "0x1234",
"visibility": "public"
},
{
"value": "0x5678",
"visibility": "private"
}
],
"webhook_url": "https://example.com/webhook"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
destination_chain_id: '0x534e5f5345504f4c4941',
input: {
compiled_class: {
bytecode: ['0x480680017fff8000', '0x1', '...'],
bytecode_segment_lengths: [100],
compiler_version: '2.6.0',
entry_points_by_type: {
CONSTRUCTOR: [],
EXTERNAL: [
{
builtins: ['range_check', 'pedersen'],
offset: 0,
selector: '0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320'
}
],
L1_HANDLER: []
},
hints: [],
prime: '0x800000000000011000000000000000000000000000000000000000000000001',
pythonic_hints: []
},
injected_state: {},
params: ['0x1234', '0x5678', '0x9abc']
},
program_hash: '0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0',
task_inputs: [
{value: '0x1234', visibility: 'public'},
{value: '0x5678', visibility: 'private'}
],
webhook_url: 'https://example.com/webhook'
})
};
fetch('https://staging.hdp.api.herodotus.cloud/tasks', 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://staging.hdp.api.herodotus.cloud/tasks",
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([
'destination_chain_id' => '0x534e5f5345504f4c4941',
'input' => [
'compiled_class' => [
'bytecode' => [
'0x480680017fff8000',
'0x1',
'...'
],
'bytecode_segment_lengths' => [
100
],
'compiler_version' => '2.6.0',
'entry_points_by_type' => [
'CONSTRUCTOR' => [
],
'EXTERNAL' => [
[
'builtins' => [
'range_check',
'pedersen'
],
'offset' => 0,
'selector' => '0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320'
]
],
'L1_HANDLER' => [
]
],
'hints' => [
],
'prime' => '0x800000000000011000000000000000000000000000000000000000000000001',
'pythonic_hints' => [
]
],
'injected_state' => [
],
'params' => [
'0x1234',
'0x5678',
'0x9abc'
]
],
'program_hash' => '0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0',
'task_inputs' => [
[
'value' => '0x1234',
'visibility' => 'public'
],
[
'value' => '0x5678',
'visibility' => 'private'
]
],
'webhook_url' => 'https://example.com/webhook'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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://staging.hdp.api.herodotus.cloud/tasks"
payload := strings.NewReader("{\n \"destination_chain_id\": \"0x534e5f5345504f4c4941\",\n \"input\": {\n \"compiled_class\": {\n \"bytecode\": [\n \"0x480680017fff8000\",\n \"0x1\",\n \"...\"\n ],\n \"bytecode_segment_lengths\": [\n 100\n ],\n \"compiler_version\": \"2.6.0\",\n \"entry_points_by_type\": {\n \"CONSTRUCTOR\": [],\n \"EXTERNAL\": [\n {\n \"builtins\": [\n \"range_check\",\n \"pedersen\"\n ],\n \"offset\": 0,\n \"selector\": \"0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320\"\n }\n ],\n \"L1_HANDLER\": []\n },\n \"hints\": [],\n \"prime\": \"0x800000000000011000000000000000000000000000000000000000000000001\",\n \"pythonic_hints\": []\n },\n \"injected_state\": {},\n \"params\": [\n \"0x1234\",\n \"0x5678\",\n \"0x9abc\"\n ]\n },\n \"program_hash\": \"0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0\",\n \"task_inputs\": [\n {\n \"value\": \"0x1234\",\n \"visibility\": \"public\"\n },\n {\n \"value\": \"0x5678\",\n \"visibility\": \"private\"\n }\n ],\n \"webhook_url\": \"https://example.com/webhook\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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://staging.hdp.api.herodotus.cloud/tasks")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"destination_chain_id\": \"0x534e5f5345504f4c4941\",\n \"input\": {\n \"compiled_class\": {\n \"bytecode\": [\n \"0x480680017fff8000\",\n \"0x1\",\n \"...\"\n ],\n \"bytecode_segment_lengths\": [\n 100\n ],\n \"compiler_version\": \"2.6.0\",\n \"entry_points_by_type\": {\n \"CONSTRUCTOR\": [],\n \"EXTERNAL\": [\n {\n \"builtins\": [\n \"range_check\",\n \"pedersen\"\n ],\n \"offset\": 0,\n \"selector\": \"0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320\"\n }\n ],\n \"L1_HANDLER\": []\n },\n \"hints\": [],\n \"prime\": \"0x800000000000011000000000000000000000000000000000000000000000001\",\n \"pythonic_hints\": []\n },\n \"injected_state\": {},\n \"params\": [\n \"0x1234\",\n \"0x5678\",\n \"0x9abc\"\n ]\n },\n \"program_hash\": \"0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0\",\n \"task_inputs\": [\n {\n \"value\": \"0x1234\",\n \"visibility\": \"public\"\n },\n {\n \"value\": \"0x5678\",\n \"visibility\": \"private\"\n }\n ],\n \"webhook_url\": \"https://example.com/webhook\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.hdp.api.herodotus.cloud/tasks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"destination_chain_id\": \"0x534e5f5345504f4c4941\",\n \"input\": {\n \"compiled_class\": {\n \"bytecode\": [\n \"0x480680017fff8000\",\n \"0x1\",\n \"...\"\n ],\n \"bytecode_segment_lengths\": [\n 100\n ],\n \"compiler_version\": \"2.6.0\",\n \"entry_points_by_type\": {\n \"CONSTRUCTOR\": [],\n \"EXTERNAL\": [\n {\n \"builtins\": [\n \"range_check\",\n \"pedersen\"\n ],\n \"offset\": 0,\n \"selector\": \"0x362398bec32bc0ebb411203221a35a0301193a96f317ebe5e40be9f60d15320\"\n }\n ],\n \"L1_HANDLER\": []\n },\n \"hints\": [],\n \"prime\": \"0x800000000000011000000000000000000000000000000000000000000000001\",\n \"pythonic_hints\": []\n },\n \"injected_state\": {},\n \"params\": [\n \"0x1234\",\n \"0x5678\",\n \"0x9abc\"\n ]\n },\n \"program_hash\": \"0x34a16478e83f69c4f0bcdb7549d32f92c9b7776bb3f71da06de334f1871eba0\",\n \"task_inputs\": [\n {\n \"value\": \"0x1234\",\n \"visibility\": \"public\"\n },\n {\n \"value\": \"0x5678\",\n \"visibility\": \"private\"\n }\n ],\n \"webhook_url\": \"https://example.com/webhook\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Task has been queued",
"uuid": "01J3Z3K2P4W6M8Q0A1B2C3D4E5"
}{
"error": "Invalid destination_chain_id format"
}{
"error": "Missing Herodotus Cloud X-API-KEY header"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"taskId": "<string>"
}{
"error": "<string>",
"details": "<string>",
"message": "<string>",
"taskId": "<string>"
}Authorizations
Body
application/json
Task creation request with destination chain, compiled module, and execution parameters
Hex chain ID string (e.g., "0xa4b1", "0xaa36a7")
Was this page helpful?
⌘I

