curl --request POST \
--url https://api.halfpagetechnologies.com/backend/api/v1/pipeline/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"model_id": "c0ffee00-1234-5678-9abc-def012345678",
"template_ids": [
"<string>"
],
"analyses": [
{
"parent_channel": 1,
"child_channel": 1,
"min_overlap": 0,
"method": "overlap",
"exclude_edge_parents": true
}
],
"channels": [
{
"channel": 1,
"model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.halfpagetechnologies.com/backend/api/v1/pipeline/run"
payload = {
"image_ids": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
"model_id": "c0ffee00-1234-5678-9abc-def012345678",
"template_ids": ["<string>"],
"analyses": [
{
"parent_channel": 1,
"child_channel": 1,
"min_overlap": 0,
"method": "overlap",
"exclude_edge_parents": True
}
],
"channels": [
{
"channel": 1,
"model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
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({
image_ids: ['3fa85f64-5717-4562-b3fc-2c963f66afa6'],
model_id: 'c0ffee00-1234-5678-9abc-def012345678',
template_ids: ['<string>'],
analyses: [
{
parent_channel: 1,
child_channel: 1,
min_overlap: 0,
method: 'overlap',
exclude_edge_parents: true
}
],
channels: [{channel: 1, model_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}]
})
};
fetch('https://api.halfpagetechnologies.com/backend/api/v1/pipeline/run', 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.halfpagetechnologies.com/backend/api/v1/pipeline/run",
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([
'image_ids' => [
'3fa85f64-5717-4562-b3fc-2c963f66afa6'
],
'model_id' => 'c0ffee00-1234-5678-9abc-def012345678',
'template_ids' => [
'<string>'
],
'analyses' => [
[
'parent_channel' => 1,
'child_channel' => 1,
'min_overlap' => 0,
'method' => 'overlap',
'exclude_edge_parents' => true
]
],
'channels' => [
[
'channel' => 1,
'model_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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.halfpagetechnologies.com/backend/api/v1/pipeline/run"
payload := strings.NewReader("{\n \"image_ids\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"model_id\": \"c0ffee00-1234-5678-9abc-def012345678\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"analyses\": [\n {\n \"parent_channel\": 1,\n \"child_channel\": 1,\n \"min_overlap\": 0,\n \"method\": \"overlap\",\n \"exclude_edge_parents\": true\n }\n ],\n \"channels\": [\n {\n \"channel\": 1,\n \"model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\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.halfpagetechnologies.com/backend/api/v1/pipeline/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image_ids\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"model_id\": \"c0ffee00-1234-5678-9abc-def012345678\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"analyses\": [\n {\n \"parent_channel\": 1,\n \"child_channel\": 1,\n \"min_overlap\": 0,\n \"method\": \"overlap\",\n \"exclude_edge_parents\": true\n }\n ],\n \"channels\": [\n {\n \"channel\": 1,\n \"model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.halfpagetechnologies.com/backend/api/v1/pipeline/run")
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 \"image_ids\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"model_id\": \"c0ffee00-1234-5678-9abc-def012345678\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"analyses\": [\n {\n \"parent_channel\": 1,\n \"child_channel\": 1,\n \"min_overlap\": 0,\n \"method\": \"overlap\",\n \"exclude_edge_parents\": true\n }\n ],\n \"channels\": [\n {\n \"channel\": 1,\n \"model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"job_ids": [
"<string>"
],
"skipped": [
{
"template_id": "<string>",
"reason": "<string>"
}
],
"image_id": "<string>",
"error": "<string>"
}
]{
"detail": "Requires authentication"
}{
"detail": "Input should be a valid UUID"
}Run a pipeline
Segment each image with the model, then run the templates: now, or once
the model has segmented their channels. Returns immediately, per image and
in order: the job_ids started, the templates the image doesn’t fit, or
the error that kept it from starting (an image outside your organization,
the monthly analysis quota, a model whose weights were cleaned up).
Poll each job with GET /pipeline/jobs/{job_id} until SUCCEEDED, then
hand its image_id and channel to the /export/* endpoints. An image’s
first run counts against your plan’s monthly analysis quota. Running on
more than one image at once needs the Pro or Lab plan. A non-UUID
model_id is rejected with 422 before it reaches the database.
curl --request POST \
--url https://api.halfpagetechnologies.com/backend/api/v1/pipeline/run \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"model_id": "c0ffee00-1234-5678-9abc-def012345678",
"template_ids": [
"<string>"
],
"analyses": [
{
"parent_channel": 1,
"child_channel": 1,
"min_overlap": 0,
"method": "overlap",
"exclude_edge_parents": true
}
],
"channels": [
{
"channel": 1,
"model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
'import requests
url = "https://api.halfpagetechnologies.com/backend/api/v1/pipeline/run"
payload = {
"image_ids": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
"model_id": "c0ffee00-1234-5678-9abc-def012345678",
"template_ids": ["<string>"],
"analyses": [
{
"parent_channel": 1,
"child_channel": 1,
"min_overlap": 0,
"method": "overlap",
"exclude_edge_parents": True
}
],
"channels": [
{
"channel": 1,
"model_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}
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({
image_ids: ['3fa85f64-5717-4562-b3fc-2c963f66afa6'],
model_id: 'c0ffee00-1234-5678-9abc-def012345678',
template_ids: ['<string>'],
analyses: [
{
parent_channel: 1,
child_channel: 1,
min_overlap: 0,
method: 'overlap',
exclude_edge_parents: true
}
],
channels: [{channel: 1, model_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'}]
})
};
fetch('https://api.halfpagetechnologies.com/backend/api/v1/pipeline/run', 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.halfpagetechnologies.com/backend/api/v1/pipeline/run",
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([
'image_ids' => [
'3fa85f64-5717-4562-b3fc-2c963f66afa6'
],
'model_id' => 'c0ffee00-1234-5678-9abc-def012345678',
'template_ids' => [
'<string>'
],
'analyses' => [
[
'parent_channel' => 1,
'child_channel' => 1,
'min_overlap' => 0,
'method' => 'overlap',
'exclude_edge_parents' => true
]
],
'channels' => [
[
'channel' => 1,
'model_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]
]),
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.halfpagetechnologies.com/backend/api/v1/pipeline/run"
payload := strings.NewReader("{\n \"image_ids\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"model_id\": \"c0ffee00-1234-5678-9abc-def012345678\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"analyses\": [\n {\n \"parent_channel\": 1,\n \"child_channel\": 1,\n \"min_overlap\": 0,\n \"method\": \"overlap\",\n \"exclude_edge_parents\": true\n }\n ],\n \"channels\": [\n {\n \"channel\": 1,\n \"model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\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.halfpagetechnologies.com/backend/api/v1/pipeline/run")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"image_ids\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"model_id\": \"c0ffee00-1234-5678-9abc-def012345678\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"analyses\": [\n {\n \"parent_channel\": 1,\n \"child_channel\": 1,\n \"min_overlap\": 0,\n \"method\": \"overlap\",\n \"exclude_edge_parents\": true\n }\n ],\n \"channels\": [\n {\n \"channel\": 1,\n \"model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.halfpagetechnologies.com/backend/api/v1/pipeline/run")
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 \"image_ids\": [\n \"3fa85f64-5717-4562-b3fc-2c963f66afa6\"\n ],\n \"model_id\": \"c0ffee00-1234-5678-9abc-def012345678\",\n \"template_ids\": [\n \"<string>\"\n ],\n \"analyses\": [\n {\n \"parent_channel\": 1,\n \"child_channel\": 1,\n \"min_overlap\": 0,\n \"method\": \"overlap\",\n \"exclude_edge_parents\": true\n }\n ],\n \"channels\": [\n {\n \"channel\": 1,\n \"model_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body[
{
"job_ids": [
"<string>"
],
"skipped": [
{
"template_id": "<string>",
"reason": "<string>"
}
],
"image_id": "<string>",
"error": "<string>"
}
]{
"detail": "Requires authentication"
}{
"detail": "Input should be a valid UUID"
}Authorizations
Body
Run a pipeline on ready images (see GET /upload/{image_id}): segment
them with model_id, one of the ids GET /models returns, then run each
template in template_ids. One image is a list of one.