curl --request PATCH \
--url https://api.egp.scale.com/v4/models/{model_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"display_name": "<string>",
"base_model_id": "<string>",
"base_model_metadata": {
"model_developer": "<string>",
"model_license_url": "<string>",
"delivery_date": "<string>",
"modelDetails": {
"number_of_parameters": 123,
"token_context_window": 123,
"languages": 123,
"alignments": 123
}
},
"model_creation_parameters": {},
"model_card": "<string>",
"training_data_card": "<string>",
"description": "<string>",
"model_template_id": "<string>",
"model_group_id": "<string>"
}
'import requests
url = "https://api.egp.scale.com/v4/models/{model_id}"
payload = {
"name": "<string>",
"display_name": "<string>",
"base_model_id": "<string>",
"base_model_metadata": {
"model_developer": "<string>",
"model_license_url": "<string>",
"delivery_date": "<string>",
"modelDetails": {
"number_of_parameters": 123,
"token_context_window": 123,
"languages": 123,
"alignments": 123
}
},
"model_creation_parameters": {},
"model_card": "<string>",
"training_data_card": "<string>",
"description": "<string>",
"model_template_id": "<string>",
"model_group_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
display_name: '<string>',
base_model_id: '<string>',
base_model_metadata: {
model_developer: '<string>',
model_license_url: '<string>',
delivery_date: '<string>',
modelDetails: {
number_of_parameters: 123,
token_context_window: 123,
languages: 123,
alignments: 123
}
},
model_creation_parameters: {},
model_card: '<string>',
training_data_card: '<string>',
description: '<string>',
model_template_id: '<string>',
model_group_id: '<string>'
})
};
fetch('https://api.egp.scale.com/v4/models/{model_id}', 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/models/{model_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'display_name' => '<string>',
'base_model_id' => '<string>',
'base_model_metadata' => [
'model_developer' => '<string>',
'model_license_url' => '<string>',
'delivery_date' => '<string>',
'modelDetails' => [
'number_of_parameters' => 123,
'token_context_window' => 123,
'languages' => 123,
'alignments' => 123
]
],
'model_creation_parameters' => [
],
'model_card' => '<string>',
'training_data_card' => '<string>',
'description' => '<string>',
'model_template_id' => '<string>',
'model_group_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.egp.scale.com/v4/models/{model_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"display_name\": \"<string>\",\n \"base_model_id\": \"<string>\",\n \"base_model_metadata\": {\n \"model_developer\": \"<string>\",\n \"model_license_url\": \"<string>\",\n \"delivery_date\": \"<string>\",\n \"modelDetails\": {\n \"number_of_parameters\": 123,\n \"token_context_window\": 123,\n \"languages\": 123,\n \"alignments\": 123\n }\n },\n \"model_creation_parameters\": {},\n \"model_card\": \"<string>\",\n \"training_data_card\": \"<string>\",\n \"description\": \"<string>\",\n \"model_template_id\": \"<string>\",\n \"model_group_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.egp.scale.com/v4/models/{model_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"display_name\": \"<string>\",\n \"base_model_id\": \"<string>\",\n \"base_model_metadata\": {\n \"model_developer\": \"<string>\",\n \"model_license_url\": \"<string>\",\n \"delivery_date\": \"<string>\",\n \"modelDetails\": {\n \"number_of_parameters\": 123,\n \"token_context_window\": 123,\n \"languages\": 123,\n \"alignments\": 123\n }\n },\n \"model_creation_parameters\": {},\n \"model_card\": \"<string>\",\n \"training_data_card\": \"<string>\",\n \"description\": \"<string>\",\n \"model_template_id\": \"<string>\",\n \"model_group_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/models/{model_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"display_name\": \"<string>\",\n \"base_model_id\": \"<string>\",\n \"base_model_metadata\": {\n \"model_developer\": \"<string>\",\n \"model_license_url\": \"<string>\",\n \"delivery_date\": \"<string>\",\n \"modelDetails\": {\n \"number_of_parameters\": 123,\n \"token_context_window\": 123,\n \"languages\": 123,\n \"alignments\": 123\n }\n },\n \"model_creation_parameters\": {},\n \"model_card\": \"<string>\",\n \"training_data_card\": \"<string>\",\n \"description\": \"<string>\",\n \"model_template_id\": \"<string>\",\n \"model_group_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"model_type": "COMPLETION",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"request_schema": {},
"response_schema": {},
"deployment_count": 123,
"supports_multi_turn": true,
"display_name": "<string>",
"model_vendor": "OPENAI",
"base_model_id": "<string>",
"base_model_metadata": {
"ui_model_section_type": "PARTNER",
"model_developer": "<string>",
"model_license_url": "<string>",
"delivery_date": "<string>",
"modelDetails": {
"number_of_parameters": 123,
"token_context_window": 123,
"languages": 123,
"alignments": 123
}
},
"model_creation_parameters": {},
"model_card": "<string>",
"training_data_card": "<string>",
"description": "<string>",
"model_template_id": "<string>",
"model_group_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Model
Description
Updates a model
Details
This API can be used to update the model that matches the ID that was passed in as a path parameter. To use this API, pass in the id that was returned from your Create Model API call as a path parameter.
Review the request schema to see the fields that can be updated.
curl --request PATCH \
--url https://api.egp.scale.com/v4/models/{model_id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"display_name": "<string>",
"base_model_id": "<string>",
"base_model_metadata": {
"model_developer": "<string>",
"model_license_url": "<string>",
"delivery_date": "<string>",
"modelDetails": {
"number_of_parameters": 123,
"token_context_window": 123,
"languages": 123,
"alignments": 123
}
},
"model_creation_parameters": {},
"model_card": "<string>",
"training_data_card": "<string>",
"description": "<string>",
"model_template_id": "<string>",
"model_group_id": "<string>"
}
'import requests
url = "https://api.egp.scale.com/v4/models/{model_id}"
payload = {
"name": "<string>",
"display_name": "<string>",
"base_model_id": "<string>",
"base_model_metadata": {
"model_developer": "<string>",
"model_license_url": "<string>",
"delivery_date": "<string>",
"modelDetails": {
"number_of_parameters": 123,
"token_context_window": 123,
"languages": 123,
"alignments": 123
}
},
"model_creation_parameters": {},
"model_card": "<string>",
"training_data_card": "<string>",
"description": "<string>",
"model_template_id": "<string>",
"model_group_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
display_name: '<string>',
base_model_id: '<string>',
base_model_metadata: {
model_developer: '<string>',
model_license_url: '<string>',
delivery_date: '<string>',
modelDetails: {
number_of_parameters: 123,
token_context_window: 123,
languages: 123,
alignments: 123
}
},
model_creation_parameters: {},
model_card: '<string>',
training_data_card: '<string>',
description: '<string>',
model_template_id: '<string>',
model_group_id: '<string>'
})
};
fetch('https://api.egp.scale.com/v4/models/{model_id}', 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/models/{model_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'display_name' => '<string>',
'base_model_id' => '<string>',
'base_model_metadata' => [
'model_developer' => '<string>',
'model_license_url' => '<string>',
'delivery_date' => '<string>',
'modelDetails' => [
'number_of_parameters' => 123,
'token_context_window' => 123,
'languages' => 123,
'alignments' => 123
]
],
'model_creation_parameters' => [
],
'model_card' => '<string>',
'training_data_card' => '<string>',
'description' => '<string>',
'model_template_id' => '<string>',
'model_group_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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.egp.scale.com/v4/models/{model_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"display_name\": \"<string>\",\n \"base_model_id\": \"<string>\",\n \"base_model_metadata\": {\n \"model_developer\": \"<string>\",\n \"model_license_url\": \"<string>\",\n \"delivery_date\": \"<string>\",\n \"modelDetails\": {\n \"number_of_parameters\": 123,\n \"token_context_window\": 123,\n \"languages\": 123,\n \"alignments\": 123\n }\n },\n \"model_creation_parameters\": {},\n \"model_card\": \"<string>\",\n \"training_data_card\": \"<string>\",\n \"description\": \"<string>\",\n \"model_template_id\": \"<string>\",\n \"model_group_id\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.egp.scale.com/v4/models/{model_id}")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"display_name\": \"<string>\",\n \"base_model_id\": \"<string>\",\n \"base_model_metadata\": {\n \"model_developer\": \"<string>\",\n \"model_license_url\": \"<string>\",\n \"delivery_date\": \"<string>\",\n \"modelDetails\": {\n \"number_of_parameters\": 123,\n \"token_context_window\": 123,\n \"languages\": 123,\n \"alignments\": 123\n }\n },\n \"model_creation_parameters\": {},\n \"model_card\": \"<string>\",\n \"training_data_card\": \"<string>\",\n \"description\": \"<string>\",\n \"model_template_id\": \"<string>\",\n \"model_group_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/models/{model_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"display_name\": \"<string>\",\n \"base_model_id\": \"<string>\",\n \"base_model_metadata\": {\n \"model_developer\": \"<string>\",\n \"model_license_url\": \"<string>\",\n \"delivery_date\": \"<string>\",\n \"modelDetails\": {\n \"number_of_parameters\": 123,\n \"token_context_window\": 123,\n \"languages\": 123,\n \"alignments\": 123\n }\n },\n \"model_creation_parameters\": {},\n \"model_card\": \"<string>\",\n \"training_data_card\": \"<string>\",\n \"description\": \"<string>\",\n \"model_template_id\": \"<string>\",\n \"model_group_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"model_type": "COMPLETION",
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"request_schema": {},
"response_schema": {},
"deployment_count": 123,
"supports_multi_turn": true,
"display_name": "<string>",
"model_vendor": "OPENAI",
"base_model_id": "<string>",
"base_model_metadata": {
"ui_model_section_type": "PARTNER",
"model_developer": "<string>",
"model_license_url": "<string>",
"delivery_date": "<string>",
"modelDetails": {
"number_of_parameters": 123,
"token_context_window": 123,
"languages": 123,
"alignments": 123
}
},
"model_creation_parameters": {},
"model_card": "<string>",
"training_data_card": "<string>",
"description": "<string>",
"model_template_id": "<string>",
"model_group_id": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
An enum representing the different types of model vendors supported.
Attributes: OPENAI: Denotes that the model vendor is OpenAI. COHERE: Denotes that the model vendor is Cohere. GOOGLE: Denotes that the model vendor is Google. ANTHROPIC: Denotes that the model vendor is Anthropic. LLMENGINE: Denotes that the model vendor is LLM Engine. OTHER: Denotes that the model vendor is Other.
OPENAI, COHERE, GOOGLE, VERTEX_AI, ANTHROPIC, LAUNCH, LLMENGINE, BEDROCK, FIREWORKS_AI, OTHER An enum representing the different types of models supported.
Attributes: COMPLETION: Denotes that the model type is completion. CHAT_COMPLETION: Denotes that the model type is chat completion. AGENT: Denotes that the model type is agent. EMBEDDING: Denotes that the model type is embedding. RERANKING: Denotes that the model type is reranking. GENERIC: Denotes that the model type is generic. BUNDLE: "Not to be used directly - type to surface a model bundle in the UI - TODO: Explicitly type a bundle
COMPLETION, CHAT_COMPLETION, AGENT, EMBEDDING, RERANKING, GENERIC, BUNDLE Response
Successful Response
An enum representing the different types of models supported.
Attributes: COMPLETION: Denotes that the model type is completion. CHAT_COMPLETION: Denotes that the model type is chat completion. AGENT: Denotes that the model type is agent. EMBEDDING: Denotes that the model type is embedding. RERANKING: Denotes that the model type is reranking. GENERIC: Denotes that the model type is generic. BUNDLE: "Not to be used directly - type to surface a model bundle in the UI - TODO: Explicitly type a bundle
COMPLETION, CHAT_COMPLETION, AGENT, EMBEDDING, RERANKING, GENERIC, BUNDLE An enum representing the different types of model vendors supported.
Attributes: OPENAI: Denotes that the model vendor is OpenAI. COHERE: Denotes that the model vendor is Cohere. GOOGLE: Denotes that the model vendor is Google. ANTHROPIC: Denotes that the model vendor is Anthropic. LLMENGINE: Denotes that the model vendor is LLM Engine. OTHER: Denotes that the model vendor is Other.
OPENAI, COHERE, GOOGLE, VERTEX_AI, ANTHROPIC, LAUNCH, LLMENGINE, BEDROCK, FIREWORKS_AI, OTHER