Upload a new Model Version Config
curl --request POST \
--url https://api.scale.com/v2/model_version_configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"url": "<string>",
"params": {},
"maxConcurrentRequests": 123,
"maxCompletionTimeSecs": 123
}
'import requests
url = "https://api.scale.com/v2/model_version_configs"
payload = {
"name": "<string>",
"url": "<string>",
"params": {},
"maxConcurrentRequests": 123,
"maxCompletionTimeSecs": 123
}
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({
name: '<string>',
url: '<string>',
params: {},
maxConcurrentRequests: 123,
maxCompletionTimeSecs: 123
})
};
fetch('https://api.scale.com/v2/model_version_configs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scale.com/v2/model_version_configs"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"params\": {},\n \"maxConcurrentRequests\": 123,\n \"maxCompletionTimeSecs\": 123\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.scale.com/v2/model_version_configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"params\": {},\n \"maxConcurrentRequests\": 123,\n \"maxCompletionTimeSecs\": 123\n}")
.asString();{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"params": {},
"customerId": "<string>",
"modelEndpoint": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z"
}{
"status_code": 500,
"error": "Invalid input data."
}{
"status_code": 500,
"error": "Internal server error."
}Model Management
Upload a new Model Version Config
Create a new Model Version Config to be evaluated.
POST
/
v2
/
model_version_configs
Upload a new Model Version Config
curl --request POST \
--url https://api.scale.com/v2/model_version_configs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"url": "<string>",
"params": {},
"maxConcurrentRequests": 123,
"maxCompletionTimeSecs": 123
}
'import requests
url = "https://api.scale.com/v2/model_version_configs"
payload = {
"name": "<string>",
"url": "<string>",
"params": {},
"maxConcurrentRequests": 123,
"maxCompletionTimeSecs": 123
}
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({
name: '<string>',
url: '<string>',
params: {},
maxConcurrentRequests: 123,
maxCompletionTimeSecs: 123
})
};
fetch('https://api.scale.com/v2/model_version_configs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.scale.com/v2/model_version_configs"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"params\": {},\n \"maxConcurrentRequests\": 123,\n \"maxCompletionTimeSecs\": 123\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.scale.com/v2/model_version_configs")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"url\": \"<string>\",\n \"params\": {},\n \"maxConcurrentRequests\": 123,\n \"maxCompletionTimeSecs\": 123\n}")
.asString();{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"params": {},
"customerId": "<string>",
"modelEndpoint": "<string>",
"status": "active",
"createdAt": "2023-11-07T05:31:56Z"
}{
"status_code": 500,
"error": "Invalid input data."
}{
"status_code": 500,
"error": "Internal server error."
}Authorizations
bearerAuthbasicAuth
Your API Key is the Bearer token. See the Authentication section to learn how to access your key.
Body
application/json
Response
Model version config successfully created.
Unique identifier for the Model Version Config.
Human-readable name for the Model Version Config.
Model endpoint URL.
Configuration parameters for the model.
Owner of the Model Version Config.
ID of the parent Model Endpoint.
Available options:
active, errored, archived 
