curl --request PATCH \
--url https://api.coreweave.com/v1alpha1/inference/deployments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"gatewayIds": [
"<string>"
],
"runtime": {
"engine": "<string>",
"version": "<string>",
"engineConfig": {},
"engineEnv": {}
},
"resources": {
"instanceType": "<string>",
"gpuCount": 123
},
"model": {
"name": "<string>",
"bucket": "<string>",
"path": "<string>"
},
"autoscaling": {
"min": 123,
"max": 123,
"priority": 123,
"capacityClasses": [],
"concurrency": 123,
"claims": [
"<string>"
]
},
"traffic": {
"weight": 123
},
"disabled": true
}
'import requests
url = "https://api.coreweave.com/v1alpha1/inference/deployments/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"gatewayIds": ["<string>"],
"runtime": {
"engine": "<string>",
"version": "<string>",
"engineConfig": {},
"engineEnv": {}
},
"resources": {
"instanceType": "<string>",
"gpuCount": 123
},
"model": {
"name": "<string>",
"bucket": "<string>",
"path": "<string>"
},
"autoscaling": {
"min": 123,
"max": 123,
"priority": 123,
"capacityClasses": [],
"concurrency": 123,
"claims": ["<string>"]
},
"traffic": { "weight": 123 },
"disabled": True
}
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>',
gatewayIds: ['<string>'],
runtime: {engine: '<string>', version: '<string>', engineConfig: {}, engineEnv: {}},
resources: {instanceType: '<string>', gpuCount: 123},
model: {name: '<string>', bucket: '<string>', path: '<string>'},
autoscaling: {
min: 123,
max: 123,
priority: 123,
capacityClasses: [],
concurrency: 123,
claims: ['<string>']
},
traffic: {weight: 123},
disabled: true
})
};
fetch('https://api.coreweave.com/v1alpha1/inference/deployments/{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/deployments/{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>',
'gatewayIds' => [
'<string>'
],
'runtime' => [
'engine' => '<string>',
'version' => '<string>',
'engineConfig' => [
],
'engineEnv' => [
]
],
'resources' => [
'instanceType' => '<string>',
'gpuCount' => 123
],
'model' => [
'name' => '<string>',
'bucket' => '<string>',
'path' => '<string>'
],
'autoscaling' => [
'min' => 123,
'max' => 123,
'priority' => 123,
'capacityClasses' => [
],
'concurrency' => 123,
'claims' => [
'<string>'
]
],
'traffic' => [
'weight' => 123
],
'disabled' => true
]),
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/deployments/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"gatewayIds\": [\n \"<string>\"\n ],\n \"runtime\": {\n \"engine\": \"<string>\",\n \"version\": \"<string>\",\n \"engineConfig\": {},\n \"engineEnv\": {}\n },\n \"resources\": {\n \"instanceType\": \"<string>\",\n \"gpuCount\": 123\n },\n \"model\": {\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"path\": \"<string>\"\n },\n \"autoscaling\": {\n \"min\": 123,\n \"max\": 123,\n \"priority\": 123,\n \"capacityClasses\": [],\n \"concurrency\": 123,\n \"claims\": [\n \"<string>\"\n ]\n },\n \"traffic\": {\n \"weight\": 123\n },\n \"disabled\": true\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/deployments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"gatewayIds\": [\n \"<string>\"\n ],\n \"runtime\": {\n \"engine\": \"<string>\",\n \"version\": \"<string>\",\n \"engineConfig\": {},\n \"engineEnv\": {}\n },\n \"resources\": {\n \"instanceType\": \"<string>\",\n \"gpuCount\": 123\n },\n \"model\": {\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"path\": \"<string>\"\n },\n \"autoscaling\": {\n \"min\": 123,\n \"max\": 123,\n \"priority\": 123,\n \"capacityClasses\": [],\n \"concurrency\": 123,\n \"claims\": [\n \"<string>\"\n ]\n },\n \"traffic\": {\n \"weight\": 123\n },\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coreweave.com/v1alpha1/inference/deployments/{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 \"gatewayIds\": [\n \"<string>\"\n ],\n \"runtime\": {\n \"engine\": \"<string>\",\n \"version\": \"<string>\",\n \"engineConfig\": {},\n \"engineEnv\": {}\n },\n \"resources\": {\n \"instanceType\": \"<string>\",\n \"gpuCount\": 123\n },\n \"model\": {\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"path\": \"<string>\"\n },\n \"autoscaling\": {\n \"min\": 123,\n \"max\": 123,\n \"priority\": 123,\n \"capacityClasses\": [],\n \"concurrency\": 123,\n \"claims\": [\n \"<string>\"\n ]\n },\n \"traffic\": {\n \"weight\": 123\n },\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"deployment": {
"spec": {
"id": "<string>",
"name": "<string>",
"gatewayIds": [
"<string>"
],
"runtime": {
"engine": "<string>",
"version": "<string>",
"engineConfig": {},
"engineEnv": {}
},
"resources": {
"instanceType": "<string>",
"gpuCount": 123
},
"model": {
"name": "<string>",
"bucket": "<string>",
"path": "<string>"
},
"autoscaling": {
"min": 123,
"max": 123,
"priority": 123,
"capacityClasses": [
"CAPACITY_CLASS_RESERVED"
],
"concurrency": 123,
"claims": [
"<string>"
]
},
"traffic": {
"weight": 123
},
"organizationId": "<string>",
"disabled": true,
"hotLoad": {
"bucket": "<string>",
"transitionMode": "TRANSITION_MODE_ASYNC",
"pathPrefix": "<string>"
},
"pd": {
"prefillResources": {
"instanceType": "<string>",
"gpuCount": 123
},
"prefillAutoscaling": {
"min": 123,
"max": 123,
"capacityClasses": [
"CAPACITY_CLASS_RESERVED"
],
"concurrency": 123,
"claims": [
"<string>"
]
}
}
},
"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>"
}
],
"specRevision": "<string>"
}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Update deployment
Update the spec of a CoreWeave inference deployment.
curl --request PATCH \
--url https://api.coreweave.com/v1alpha1/inference/deployments/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"name": "<string>",
"gatewayIds": [
"<string>"
],
"runtime": {
"engine": "<string>",
"version": "<string>",
"engineConfig": {},
"engineEnv": {}
},
"resources": {
"instanceType": "<string>",
"gpuCount": 123
},
"model": {
"name": "<string>",
"bucket": "<string>",
"path": "<string>"
},
"autoscaling": {
"min": 123,
"max": 123,
"priority": 123,
"capacityClasses": [],
"concurrency": 123,
"claims": [
"<string>"
]
},
"traffic": {
"weight": 123
},
"disabled": true
}
'import requests
url = "https://api.coreweave.com/v1alpha1/inference/deployments/{id}"
payload = {
"id": "<string>",
"name": "<string>",
"gatewayIds": ["<string>"],
"runtime": {
"engine": "<string>",
"version": "<string>",
"engineConfig": {},
"engineEnv": {}
},
"resources": {
"instanceType": "<string>",
"gpuCount": 123
},
"model": {
"name": "<string>",
"bucket": "<string>",
"path": "<string>"
},
"autoscaling": {
"min": 123,
"max": 123,
"priority": 123,
"capacityClasses": [],
"concurrency": 123,
"claims": ["<string>"]
},
"traffic": { "weight": 123 },
"disabled": True
}
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>',
gatewayIds: ['<string>'],
runtime: {engine: '<string>', version: '<string>', engineConfig: {}, engineEnv: {}},
resources: {instanceType: '<string>', gpuCount: 123},
model: {name: '<string>', bucket: '<string>', path: '<string>'},
autoscaling: {
min: 123,
max: 123,
priority: 123,
capacityClasses: [],
concurrency: 123,
claims: ['<string>']
},
traffic: {weight: 123},
disabled: true
})
};
fetch('https://api.coreweave.com/v1alpha1/inference/deployments/{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/deployments/{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>',
'gatewayIds' => [
'<string>'
],
'runtime' => [
'engine' => '<string>',
'version' => '<string>',
'engineConfig' => [
],
'engineEnv' => [
]
],
'resources' => [
'instanceType' => '<string>',
'gpuCount' => 123
],
'model' => [
'name' => '<string>',
'bucket' => '<string>',
'path' => '<string>'
],
'autoscaling' => [
'min' => 123,
'max' => 123,
'priority' => 123,
'capacityClasses' => [
],
'concurrency' => 123,
'claims' => [
'<string>'
]
],
'traffic' => [
'weight' => 123
],
'disabled' => true
]),
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/deployments/{id}"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"gatewayIds\": [\n \"<string>\"\n ],\n \"runtime\": {\n \"engine\": \"<string>\",\n \"version\": \"<string>\",\n \"engineConfig\": {},\n \"engineEnv\": {}\n },\n \"resources\": {\n \"instanceType\": \"<string>\",\n \"gpuCount\": 123\n },\n \"model\": {\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"path\": \"<string>\"\n },\n \"autoscaling\": {\n \"min\": 123,\n \"max\": 123,\n \"priority\": 123,\n \"capacityClasses\": [],\n \"concurrency\": 123,\n \"claims\": [\n \"<string>\"\n ]\n },\n \"traffic\": {\n \"weight\": 123\n },\n \"disabled\": true\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/deployments/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"gatewayIds\": [\n \"<string>\"\n ],\n \"runtime\": {\n \"engine\": \"<string>\",\n \"version\": \"<string>\",\n \"engineConfig\": {},\n \"engineEnv\": {}\n },\n \"resources\": {\n \"instanceType\": \"<string>\",\n \"gpuCount\": 123\n },\n \"model\": {\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"path\": \"<string>\"\n },\n \"autoscaling\": {\n \"min\": 123,\n \"max\": 123,\n \"priority\": 123,\n \"capacityClasses\": [],\n \"concurrency\": 123,\n \"claims\": [\n \"<string>\"\n ]\n },\n \"traffic\": {\n \"weight\": 123\n },\n \"disabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.coreweave.com/v1alpha1/inference/deployments/{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 \"gatewayIds\": [\n \"<string>\"\n ],\n \"runtime\": {\n \"engine\": \"<string>\",\n \"version\": \"<string>\",\n \"engineConfig\": {},\n \"engineEnv\": {}\n },\n \"resources\": {\n \"instanceType\": \"<string>\",\n \"gpuCount\": 123\n },\n \"model\": {\n \"name\": \"<string>\",\n \"bucket\": \"<string>\",\n \"path\": \"<string>\"\n },\n \"autoscaling\": {\n \"min\": 123,\n \"max\": 123,\n \"priority\": 123,\n \"capacityClasses\": [],\n \"concurrency\": 123,\n \"claims\": [\n \"<string>\"\n ]\n },\n \"traffic\": {\n \"weight\": 123\n },\n \"disabled\": true\n}"
response = http.request(request)
puts response.read_body{
"deployment": {
"spec": {
"id": "<string>",
"name": "<string>",
"gatewayIds": [
"<string>"
],
"runtime": {
"engine": "<string>",
"version": "<string>",
"engineConfig": {},
"engineEnv": {}
},
"resources": {
"instanceType": "<string>",
"gpuCount": 123
},
"model": {
"name": "<string>",
"bucket": "<string>",
"path": "<string>"
},
"autoscaling": {
"min": 123,
"max": 123,
"priority": 123,
"capacityClasses": [
"CAPACITY_CLASS_RESERVED"
],
"concurrency": 123,
"claims": [
"<string>"
]
},
"traffic": {
"weight": 123
},
"organizationId": "<string>",
"disabled": true,
"hotLoad": {
"bucket": "<string>",
"transitionMode": "TRANSITION_MODE_ASYNC",
"pathPrefix": "<string>"
},
"pd": {
"prefillResources": {
"instanceType": "<string>",
"gpuCount": 123
},
"prefillAutoscaling": {
"min": 123,
"max": 123,
"capacityClasses": [
"CAPACITY_CLASS_RESERVED"
],
"concurrency": 123,
"claims": [
"<string>"
]
}
}
},
"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>"
}
],
"specRevision": "<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, gatewayIds, runtime, resources, model,
autoscaling, traffic). This endpoint does not accept
a field mask.
curl -X PATCH https://api.coreweave.com/v1alpha1/inference/deployments/{id} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API_ACCESS_TOKEN}" \
-d @data.json
Autorisations
CoreWeave API access token sent as a bearer token.
Paramètres de chemin
The ID of the deployment to update
Corps
Request for UpdateDeployment
The ID of the deployment to update
The name of the deployment
The gateways to associate the deployment with
Runtime selection and configuration
Show child attributes
Show child attributes
Resource configuration for the deployment
Show child attributes
Show child attributes
The model configuration
Show child attributes
Show child attributes
The autoscaling configuration
Show child attributes
Show child attributes
The traffic configuration for the deployment
Show child attributes
Show child attributes
Disable the deployment
The hot-load configuration for the deployment. Immutable: it must match the value set at creation.
Show child attributes
Show child attributes
Prefill/Decode disaggregation configuration. Top-level resources and autoscaling configure the decode pool; this field configures the prefill pool. Only supported by dynamo-vllm when the pdDisaggEnabled feature flag is enabled.
Show child attributes
Show child attributes
Réponse
OK
Response for UpdateDeployment
The updated deployment
Show child attributes
Show child attributes
Cette page vous a-t-elle été utile ?