Custom Runtime Apply
curl --request PUT \
--url https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name} \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"runtime_ids": [
{
"id": "<string>",
"max_tokens": 4096
}
],
"api_key_secret": "<string>",
"headers": {}
}
'import requests
url = "https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name}"
payload = {
"base_url": "<string>",
"runtime_ids": [
{
"id": "<string>",
"max_tokens": 4096
}
],
"api_key_secret": "<string>",
"headers": {}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: '<string>',
runtime_ids: [{id: '<string>', max_tokens: 4096}],
api_key_secret: '<string>',
headers: {}
})
};
fetch('https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name}', 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.example.com/v2/{entity}/{project}/runtimes/{runtime_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'base_url' => '<string>',
'runtime_ids' => [
[
'id' => '<string>',
'max_tokens' => 4096
]
],
'api_key_secret' => '<string>',
'headers' => [
]
]),
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.example.com/v2/{entity}/{project}/runtimes/{runtime_name}"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"runtime_ids\": [\n {\n \"id\": \"<string>\",\n \"max_tokens\": 4096\n }\n ],\n \"api_key_secret\": \"<string>\",\n \"headers\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name}")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"<string>\",\n \"runtime_ids\": [\n {\n \"id\": \"<string>\",\n \"max_tokens\": 4096\n }\n ],\n \"api_key_secret\": \"<string>\",\n \"headers\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_url\": \"<string>\",\n \"runtime_ids\": [\n {\n \"id\": \"<string>\",\n \"max_tokens\": 4096\n }\n ],\n \"api_key_secret\": \"<string>\",\n \"headers\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"base_url": "<string>",
"api_key_secret": "<string>",
"headers": {},
"runtime_ids": [
{
"id": "<string>",
"playground_id": "<string>",
"max_tokens": 4096
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Custom Runtime Apply
Create or replace a custom runtime configuration.
PUT
/
v2
/
{entity}
/
{project}
/
runtimes
/
{runtime_name}
Custom Runtime Apply
curl --request PUT \
--url https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name} \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"runtime_ids": [
{
"id": "<string>",
"max_tokens": 4096
}
],
"api_key_secret": "<string>",
"headers": {}
}
'import requests
url = "https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name}"
payload = {
"base_url": "<string>",
"runtime_ids": [
{
"id": "<string>",
"max_tokens": 4096
}
],
"api_key_secret": "<string>",
"headers": {}
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: '<string>',
runtime_ids: [{id: '<string>', max_tokens: 4096}],
api_key_secret: '<string>',
headers: {}
})
};
fetch('https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name}', 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.example.com/v2/{entity}/{project}/runtimes/{runtime_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'base_url' => '<string>',
'runtime_ids' => [
[
'id' => '<string>',
'max_tokens' => 4096
]
],
'api_key_secret' => '<string>',
'headers' => [
]
]),
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.example.com/v2/{entity}/{project}/runtimes/{runtime_name}"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"runtime_ids\": [\n {\n \"id\": \"<string>\",\n \"max_tokens\": 4096\n }\n ],\n \"api_key_secret\": \"<string>\",\n \"headers\": {}\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name}")
.header("Content-Type", "application/json")
.body("{\n \"base_url\": \"<string>\",\n \"runtime_ids\": [\n {\n \"id\": \"<string>\",\n \"max_tokens\": 4096\n }\n ],\n \"api_key_secret\": \"<string>\",\n \"headers\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v2/{entity}/{project}/runtimes/{runtime_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"base_url\": \"<string>\",\n \"runtime_ids\": [\n {\n \"id\": \"<string>\",\n \"max_tokens\": 4096\n }\n ],\n \"api_key_secret\": \"<string>\",\n \"headers\": {}\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"base_url": "<string>",
"api_key_secret": "<string>",
"headers": {},
"runtime_ids": [
{
"id": "<string>",
"playground_id": "<string>",
"max_tokens": 4096
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Path Parameters
Stable name of the custom runtime to create or replace
Required string length:
1 - 128Pattern:
^[^\s:]*(?::[^\s:]+)*:?$Body
application/json
Public OpenAI-compatible endpoint base URL
Complete desired list of IDs exposed by the endpoint
Show child attributes
Show child attributes
Team secret name used as the endpoint API key; never the secret value
Literal headers forwarded to the endpoint
Show child attributes
Show child attributes
Was this page helpful?
⌘I