curl --request POST \
--url https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel', 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.trajectory.ai/api/v1/deploy/{deployment_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.trajectory.ai/api/v1/deploy/{deployment_id}/cancel")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"deployment_id": "<string>",
"model_slug": "<string>",
"model_slug_id": "<string>",
"status": "PENDING",
"role": "production",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"model_id": "<string>",
"playground_endpoint_url": "<string>",
"base_model_slug": "<string>",
"checkpoint_step": 123,
"output_speed": "normal",
"expected_concurrency": "low",
"merge_xid": "<string>",
"deploy_xid": "<string>",
"created_by": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"failure": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"context": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}Cancel Deployment Route
curl --request POST \
--url https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel', 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.trajectory.ai/api/v1/deploy/{deployment_id}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.trajectory.ai/api/v1/deploy/{deployment_id}/cancel")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trajectory.ai/api/v1/deploy/{deployment_id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"deployment_id": "<string>",
"model_slug": "<string>",
"model_slug_id": "<string>",
"status": "PENDING",
"role": "production",
"is_active": true,
"created_at": "2023-11-07T05:31:56Z",
"model_id": "<string>",
"playground_endpoint_url": "<string>",
"base_model_slug": "<string>",
"checkpoint_step": 123,
"output_speed": "normal",
"expected_concurrency": "low",
"merge_xid": "<string>",
"deploy_xid": "<string>",
"created_by": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"failure": {
"type": "<string>",
"code": "<string>",
"message": "<string>",
"context": {}
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"doc_url": "<string>",
"context": {},
"param": "<string>"
}
}Authorizations
Organization API key
Path Parameters
Response
Successful Response
Spanner-backed deployment lifecycle row for the platform UI.
Deployment row id.
Human-readable slug this deployment serves under.
Id of the slug this deployment serves under.
Lifecycle state; MERGING covers the whole pipeline, so treat it as in flight.
PENDING, MERGING, DEPLOYING, DEPLOYED, FAILED Whether this is the production or a test deployment.
production, test True when this deployment currently answers for the slug.
When the deployment was requested.
Merged model backing this deployment; null until the merge lands.
Per-deployment URL a test checkpoint is reachable at.
Base model trained from, via models -> checkpoints; null until the merge lands.
Training step of the deployed checkpoint; null until it resolves.
Output-speed tier requested; null only if this predates the column.
normal, turbo Concurrency level requested; null only if this predates the column.
low, medium, high XID of the krun job that is merging the checkpoint weights.
XID of the krun job that is deploying the merged model.
Email of the user who requested this deployment.
When the deployment first became DEPLOYED; unlike updated_at, later promote/demote transitions never overwrite this.
Last lifecycle transition; null until the row first moves.
Structured failure when status is FAILED.
Show child attributes
Show child attributes