Update gateway
curl --request PATCH \
--url https://api.coreweave.com/v1alpha1/inference/gateways/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"zones": [
"<string>"
],
"coreWeaveAuth": {
"organizations": [
"<string>"
]
},
"weightsAndBiasesAuth": {
"apiKey": "<string>",
"serverUrl": "<string>",
"enableUsageReports": true,
"enableRateLimiting": true
},
"endpointConfiguration": {
"additionalDns": [
"<string>"
],
"allowedSourceIpRanges": [
"<string>"
]
},
"pathBasedRouting": {}
}
'import requests
url = "https://api.coreweave.com/v1alpha1/inference/gateways/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"zones": ["<string>"],
"coreWeaveAuth": { "organizations": ["<string>"] },
"weightsAndBiasesAuth": {
"apiKey": "<string>",
"serverUrl": "<string>",
"enableUsageReports": True,
"enableRateLimiting": True
},
"endpointConfiguration": {
"additionalDns": ["<string>"],
"allowedSourceIpRanges": ["<string>"]
},
"pathBasedRouting": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
zones: ['<string>'],
coreWeaveAuth: {organizations: ['<string>']},
weightsAndBiasesAuth: {
apiKey: '<string>',
serverUrl: '<string>',
enableUsageReports: true,
enableRateLimiting: true
},
endpointConfiguration: {additionalDns: ['<string>'], allowedSourceIpRanges: ['<string>']},
pathBasedRouting: {}
})
};
fetch('https://api.coreweave.com/v1alpha1/inference/gateways/{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.coreweave.com/v1alpha1/inference/gateways/{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([
'id' => '<string>',
'name' => '<string>',
'zones' => [
'<string>'
],
'coreWeaveAuth' => [
'organizations' => [
'<string>'
]
],
'weightsAndBiasesAuth' => [
'apiKey' => '<string>',
'serverUrl' => '<string>',
'enableUsageReports' => true,
'enableRateLimiting' => true
],
'endpointConfiguration' => [
'additionalDns' => [
'<string>'
],
'allowedSourceIpRanges' => [
'<string>'
]
],
'pathBasedRouting' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.coreweave.com/v1alpha1/inference/gateways/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"zones\": [\n \"<string>\"\n ],\n \"coreWeaveAuth\": {\n \"organizations\": [\n \"<string>\"\n ]\n },\n \"weightsAndBiasesAuth\": {\n \"apiKey\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"enableUsageReports\": true,\n \"enableRateLimiting\": true\n },\n \"endpointConfiguration\": {\n \"additionalDns\": [\n \"<string>\"\n ],\n \"allowedSourceIpRanges\": [\n \"<string>\"\n ]\n },\n \"pathBasedRouting\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.coreweave.com/v1alpha1/inference/gateways/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"zones\": [\n \"<string>\"\n ],\n \"coreWeaveAuth\": {\n \"organizations\": [\n \"<string>\"\n ]\n },\n \"weightsAndBiasesAuth\": {\n \"apiKey\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"enableUsageReports\": true,\n \"enableRateLimiting\": true\n },\n \"endpointConfiguration\": {\n \"additionalDns\": [\n \"<string>\"\n ],\n \"allowedSourceIpRanges\": [\n \"<string>\"\n ]\n },\n \"pathBasedRouting\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coreweave.com/v1alpha1/inference/gateways/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"zones\": [\n \"<string>\"\n ],\n \"coreWeaveAuth\": {\n \"organizations\": [\n \"<string>\"\n ]\n },\n \"weightsAndBiasesAuth\": {\n \"apiKey\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"enableUsageReports\": true,\n \"enableRateLimiting\": true\n },\n \"endpointConfiguration\": {\n \"additionalDns\": [\n \"<string>\"\n ],\n \"allowedSourceIpRanges\": [\n \"<string>\"\n ]\n },\n \"pathBasedRouting\": {}\n}"
response = http.request(request)
puts response.read_body{
"gateway": {
"spec": {
"id": "<string>",
"name": "<string>",
"zones": [
"<string>"
],
"coreWeaveAuth": {
"organizations": [
"<string>"
]
},
"weightsAndBiasesAuth": {
"apiKey": "<string>",
"serverUrl": "<string>",
"enableUsageReports": true,
"enableRateLimiting": true
},
"organizationId": "<string>",
"endpointConfiguration": {
"additionalDns": [
"<string>"
],
"edgeProxyMode": "EDGE_PROXY_MODE_UNSPECIFIED",
"allowedSourceIpRanges": [
"<string>"
]
},
"bodyBasedRouting": {
"apiType": "API_TYPE_OPENAI"
},
"headerBasedRouting": {
"headerName": "<string>"
},
"pathBasedRouting": {}
},
"status": {
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"status": "STATUS_UNSPECIFIED",
"conditions": [
{
"type": "<string>",
"status": "STATUS_UNSPECIFIED",
"lastUpdateTime": "2023-11-07T05:31:56Z",
"reason": "<string>",
"message": "<string>",
"zone": "<string>"
}
],
"endpoints": [
"<string>"
]
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Update gateway
Update the spec of a CoreWeave inference gateway.
PATCH
/
v1alpha1
/
inference
/
gateways
/
{id}
Update gateway
curl --request PATCH \
--url https://api.coreweave.com/v1alpha1/inference/gateways/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"zones": [
"<string>"
],
"coreWeaveAuth": {
"organizations": [
"<string>"
]
},
"weightsAndBiasesAuth": {
"apiKey": "<string>",
"serverUrl": "<string>",
"enableUsageReports": true,
"enableRateLimiting": true
},
"endpointConfiguration": {
"additionalDns": [
"<string>"
],
"allowedSourceIpRanges": [
"<string>"
]
},
"pathBasedRouting": {}
}
'import requests
url = "https://api.coreweave.com/v1alpha1/inference/gateways/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"zones": ["<string>"],
"coreWeaveAuth": { "organizations": ["<string>"] },
"weightsAndBiasesAuth": {
"apiKey": "<string>",
"serverUrl": "<string>",
"enableUsageReports": True,
"enableRateLimiting": True
},
"endpointConfiguration": {
"additionalDns": ["<string>"],
"allowedSourceIpRanges": ["<string>"]
},
"pathBasedRouting": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
name: '<string>',
zones: ['<string>'],
coreWeaveAuth: {organizations: ['<string>']},
weightsAndBiasesAuth: {
apiKey: '<string>',
serverUrl: '<string>',
enableUsageReports: true,
enableRateLimiting: true
},
endpointConfiguration: {additionalDns: ['<string>'], allowedSourceIpRanges: ['<string>']},
pathBasedRouting: {}
})
};
fetch('https://api.coreweave.com/v1alpha1/inference/gateways/{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.coreweave.com/v1alpha1/inference/gateways/{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([
'id' => '<string>',
'name' => '<string>',
'zones' => [
'<string>'
],
'coreWeaveAuth' => [
'organizations' => [
'<string>'
]
],
'weightsAndBiasesAuth' => [
'apiKey' => '<string>',
'serverUrl' => '<string>',
'enableUsageReports' => true,
'enableRateLimiting' => true
],
'endpointConfiguration' => [
'additionalDns' => [
'<string>'
],
'allowedSourceIpRanges' => [
'<string>'
]
],
'pathBasedRouting' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.coreweave.com/v1alpha1/inference/gateways/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"zones\": [\n \"<string>\"\n ],\n \"coreWeaveAuth\": {\n \"organizations\": [\n \"<string>\"\n ]\n },\n \"weightsAndBiasesAuth\": {\n \"apiKey\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"enableUsageReports\": true,\n \"enableRateLimiting\": true\n },\n \"endpointConfiguration\": {\n \"additionalDns\": [\n \"<string>\"\n ],\n \"allowedSourceIpRanges\": [\n \"<string>\"\n ]\n },\n \"pathBasedRouting\": {}\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.coreweave.com/v1alpha1/inference/gateways/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"zones\": [\n \"<string>\"\n ],\n \"coreWeaveAuth\": {\n \"organizations\": [\n \"<string>\"\n ]\n },\n \"weightsAndBiasesAuth\": {\n \"apiKey\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"enableUsageReports\": true,\n \"enableRateLimiting\": true\n },\n \"endpointConfiguration\": {\n \"additionalDns\": [\n \"<string>\"\n ],\n \"allowedSourceIpRanges\": [\n \"<string>\"\n ]\n },\n \"pathBasedRouting\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coreweave.com/v1alpha1/inference/gateways/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"zones\": [\n \"<string>\"\n ],\n \"coreWeaveAuth\": {\n \"organizations\": [\n \"<string>\"\n ]\n },\n \"weightsAndBiasesAuth\": {\n \"apiKey\": \"<string>\",\n \"serverUrl\": \"<string>\",\n \"enableUsageReports\": true,\n \"enableRateLimiting\": true\n },\n \"endpointConfiguration\": {\n \"additionalDns\": [\n \"<string>\"\n ],\n \"allowedSourceIpRanges\": [\n \"<string>\"\n ]\n },\n \"pathBasedRouting\": {}\n}"
response = http.request(request)
puts response.read_body{
"gateway": {
"spec": {
"id": "<string>",
"name": "<string>",
"zones": [
"<string>"
],
"coreWeaveAuth": {
"organizations": [
"<string>"
]
},
"weightsAndBiasesAuth": {
"apiKey": "<string>",
"serverUrl": "<string>",
"enableUsageReports": true,
"enableRateLimiting": true
},
"organizationId": "<string>",
"endpointConfiguration": {
"additionalDns": [
"<string>"
],
"edgeProxyMode": "EDGE_PROXY_MODE_UNSPECIFIED",
"allowedSourceIpRanges": [
"<string>"
]
},
"bodyBasedRouting": {
"apiType": "API_TYPE_OPENAI"
},
"headerBasedRouting": {
"headerName": "<string>"
},
"pathBasedRouting": {}
},
"status": {
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"status": "STATUS_UNSPECIFIED",
"conditions": [
{
"type": "<string>",
"status": "STATUS_UNSPECIFIED",
"lastUpdateTime": "2023-11-07T05:31:56Z",
"reason": "<string>",
"message": "<string>",
"zone": "<string>"
}
],
"endpoints": [
"<string>"
]
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}- The API server is
https://api.coreweave.com. - Replace
{API_ACCESS_TOKEN}with your CoreWeave API access token. - For required permissions, see IAM Access Policies.
name, zones, the chosen authentication type, the chosen
routing strategy). This endpoint does not accept a field
mask.
Example request
curl -X PATCH https://api.coreweave.com/v1alpha1/inference/gateways/{id} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API_ACCESS_TOKEN}" \
-d @data.json
Authorizations
Body
application/json
Request for UpdateGateway
Was this page helpful?