Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
page = client.model_templates.list()
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.ModelTemplates.List(context.TODO(), sgp.ModelTemplateListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}curl --request GET \
--url https://api.egp.scale.com/v4/model-templatesconst options = {method: 'GET'};
fetch('https://api.egp.scale.com/v4/model-templates', 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.egp.scale.com/v4/model-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/v4/model-templates")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/model-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"name": "<string>",
"vendor_configuration": {
"bundle_config": {
"registry": "<string>",
"image": "<string>",
"tag": "<string>",
"command": [
"<string>"
],
"env": {},
"streaming_command": [
"<string>"
],
"readiness_initial_delay_seconds": 120,
"healthcheck_route": "/readyz",
"predict_route": "/predict",
"streaming_predict_route": "/generate_streaming"
},
"vendor": "LAUNCH",
"endpoint_config": {
"cpus": 3,
"memory": "8Gi",
"storage": "16Gi",
"gpus": 0,
"min_workers": 0,
"max_workers": 1,
"per_worker": 10,
"endpoint_type": "ASYNC",
"high_priority": false
},
"fine_tuning_job_bundle_config": {
"registry": "<string>",
"image": "<string>",
"tag": "<string>",
"command": [
"<string>"
],
"env": {},
"mount_location": "/workspace/launch_specific/config.json",
"resources": {
"cpus": 3,
"memory": "8Gi",
"storage": "16Gi",
"gpus": 0
}
}
},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"model_creation_parameters_schema": {
"parameters": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"required": true
}
]
},
"model_request_parameters_schema": {
"parameters": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"required": true
}
]
}
}
],
"total_item_count": 123,
"current_page": 123,
"items_per_page": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Model Templates V3 (Beta)
List Model Templates
Description
Lists all model templates accessible to the user.
Details
This API can be used to list model templates. If a user has access to multiple accounts, all model templates from all accounts the user is associated with will be returned.
GET
/
v4
/
model-templates
Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
page = client.model_templates.list()
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.ModelTemplates.List(context.TODO(), sgp.ModelTemplateListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}curl --request GET \
--url https://api.egp.scale.com/v4/model-templatesconst options = {method: 'GET'};
fetch('https://api.egp.scale.com/v4/model-templates', 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.egp.scale.com/v4/model-templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/v4/model-templates")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/model-templates")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"name": "<string>",
"vendor_configuration": {
"bundle_config": {
"registry": "<string>",
"image": "<string>",
"tag": "<string>",
"command": [
"<string>"
],
"env": {},
"streaming_command": [
"<string>"
],
"readiness_initial_delay_seconds": 120,
"healthcheck_route": "/readyz",
"predict_route": "/predict",
"streaming_predict_route": "/generate_streaming"
},
"vendor": "LAUNCH",
"endpoint_config": {
"cpus": 3,
"memory": "8Gi",
"storage": "16Gi",
"gpus": 0,
"min_workers": 0,
"max_workers": 1,
"per_worker": 10,
"endpoint_type": "ASYNC",
"high_priority": false
},
"fine_tuning_job_bundle_config": {
"registry": "<string>",
"image": "<string>",
"tag": "<string>",
"command": [
"<string>"
],
"env": {},
"mount_location": "/workspace/launch_specific/config.json",
"resources": {
"cpus": 3,
"memory": "8Gi",
"storage": "16Gi",
"gpus": 0
}
}
},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"model_creation_parameters_schema": {
"parameters": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"required": true
}
]
},
"model_request_parameters_schema": {
"parameters": [
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"required": true
}
]
}
}
],
"total_item_count": 123,
"current_page": 123,
"items_per_page": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Query Parameters
Page number for pagination to be returned by the given endpoint. Starts at page 1
Required range:
x >= 1Maximum number of artifacts to be returned by the given endpoint. Defaults to 100 and cannot be greater than 10k.
Required range:
1 <= x <= 10000Response
Successful Response
⌘I

