Cancel shaping job
curl --request POST \
--url https://api.together.ai/v1/shaping/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.together.ai/v1/shaping/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.together.ai/v1/shaping/{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.together.ai/v1/shaping/{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 => [
"Authorization: Bearer <token>"
],
]);
$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.together.ai/v1/shaping/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.together.ai/v1/shaping/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/shaping/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"job_type": "quantization",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"params": {
"inputs": {
"adapter_object_id": "ml_CeG3fF6pyEViU8dE8pk7R",
"adapter_revision_id": "rv_CeG3faPBj2ABwbAaHPTmx",
"calibration_file_id": "file-5f1b0c7a-2d19-4a3e-9c60-8ab41c2f7d35"
},
"configuration": {
"user_id": "user_CKfewYkQBpaEmN7wuQS3W",
"adapter_project_id": "proj_CczF9KYFantA84sNYDTJd",
"adapter_revision_id": "rv_CeERyXMBQCJTRC1yqGTpk",
"adapter_model_name": "ft-qa-artifacts/glm-5.3-e2e-test-adapter",
"base_object_id": "ml_CbJ9yCnij7A47b1xkpioB",
"base_revision_id": "rv_CbJ9yNrws93VQrZum1fTE",
"base_model_name": "zai-org/GLM-5.3-NVFP4"
}
},
"events": [
{
"object": "shaping",
"created_at": "2023-11-07T05:31:56Z",
"level": "Info",
"message": "<string>",
"type": "SHAPING_ERROR",
"hash": "<string>",
"result": {
"model_object_id": "<string>",
"model_revision_id": "<string>"
}
}
],
"results": {
"model_object_id": "<string>",
"model_revision_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}FP4 preparation
Cancel FP4 preparation job
Request cancellation of a shaping job owned by the caller’s project.
POST
/
shaping
/
{id}
/
cancel
Cancel shaping job
curl --request POST \
--url https://api.together.ai/v1/shaping/{id}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.together.ai/v1/shaping/{id}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.together.ai/v1/shaping/{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.together.ai/v1/shaping/{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 => [
"Authorization: Bearer <token>"
],
]);
$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.together.ai/v1/shaping/{id}/cancel"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.together.ai/v1/shaping/{id}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.together.ai/v1/shaping/{id}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"job_type": "quantization",
"status": "pending",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"params": {
"inputs": {
"adapter_object_id": "ml_CeG3fF6pyEViU8dE8pk7R",
"adapter_revision_id": "rv_CeG3faPBj2ABwbAaHPTmx",
"calibration_file_id": "file-5f1b0c7a-2d19-4a3e-9c60-8ab41c2f7d35"
},
"configuration": {
"user_id": "user_CKfewYkQBpaEmN7wuQS3W",
"adapter_project_id": "proj_CczF9KYFantA84sNYDTJd",
"adapter_revision_id": "rv_CeERyXMBQCJTRC1yqGTpk",
"adapter_model_name": "ft-qa-artifacts/glm-5.3-e2e-test-adapter",
"base_object_id": "ml_CbJ9yCnij7A47b1xkpioB",
"base_revision_id": "rv_CbJ9yNrws93VQrZum1fTE",
"base_model_name": "zai-org/GLM-5.3-NVFP4"
}
},
"events": [
{
"object": "shaping",
"created_at": "2023-11-07T05:31:56Z",
"level": "Info",
"message": "<string>",
"type": "SHAPING_ERROR",
"hash": "<string>",
"result": {
"model_object_id": "<string>",
"model_revision_id": "<string>"
}
}
],
"results": {
"model_object_id": "<string>",
"model_revision_id": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": null,
"code": null
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Shaping job ID beginning with shp-quant-.
Pattern:
^shp-quant-[a-f0-9-]+$Response
Cancellation requested successfully.
Quantization job that prepares an adapter for FP4 inference.
Unique shaping job ID.
Pattern:
^shp-quant-[a-f0-9-]+$Type of shaping job.
Available options:
quantization Current job status.
Available options:
pending, queued, running, completed, cancelled, cancel_requested, error, user_error Time when the job was created.
Time when the job was last updated.
User that created the job.
Job specification.
Show child attributes
Show child attributes
Events emitted by the job.
Show child attributes
Show child attributes
Model artifacts produced by the job.
Show child attributes
Show child attributes
Was this page helpful?
⌘I