Skip to main content

VPC API Reference

Users with administrative permissions can interact with the VPC API using curl or any other HTTP client. The API allows users to create, list, update, and delete VPCs.

Info
  • The API server is https://api.coreweave.com.
  • Replace {API_ACCESS_TOKEN} in the examples below with your CoreWeave API Access Token.

Endpoints

EndpointMethodDescription
/v1beta1/networking/vpcsGETList all VPCs.
/v1beta1/networking/vpcsPOSTCreate a VPC.
/v1beta1/networking/vpcs/{id}GETGet VPC information by ID.
/v1beta1/networking/vpcs/{id}DELETEDelete a VPC by ID.
/v1beta1/networking/vpcs/{id}PATCHUpdate a VPC by ID.

Fields

The following fields are used with the VPC API.

FieldTypeRequired?Description
namestringrequiredThe name of the VPC.
zonestringrequiredThe Availability Zone in which the VPC is located.
hostPrefixstringoptionalThe Host Prefix of the VPC. If configured, must be a /18 CIDR size. If not explicitly configured, a default value is configured by the server.
vpcPrefixesarrayoptionalAn array of the VPC prefixes. Must be given in CIDR notation.
ingressobject-The ingress configuration of the VPC.
ingress.disablePublicServicesbooleanrequiredEnables ingress from the Internet at the VPC level. Defaults to false. If set to true, ingress from the Internet is disabled.
egressobject-The egress configuration of the VPC.
egress.disablePublicAccessbooleanrequiredEnables egress from the Internet at the VPC level. Defaults to false. If set to true, egress from the Internet is disabled.
dhcpobject-The DHCP configuration of the VPC.
dhcp.dnsobject-The DNS configuration of the VPC.
dhcp.dns.serversarrayoptionalAn array of user-provided DNS servers.

VPCs

To list or create VPCs, use the /v1beta1/networking/vpcs endpoint. The API supports the GET and POST methods.

GET /v1beta1/networking/vpcs

To list all VPCs, use the GET method with the /v1beta1/networking/vpcs endpoint.

Example request
$
curl -X GET https://api.coreweave.com/v1beta1/networking/vpcs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API_ACCESS_TOKEN}"

A successful response returns an array of VPC objects.

Response status code 200
{
"items": [
{
"name": "string",
"zone": "string",
"hostPrefix": "string",
"vpcPrefixes": [
{
"name": "string",
"value": "string"
}
],
"ingress": {
"disablePublicServices": boolean
},
"egress": {
"disablePublicAccess": boolean
},
"dhcp": {
"dns": {
"servers": [
"string",
"string"
]
}
}
}
]
}

POST /v1beta1/networking/vpcs

To create a VPC, use the POST method with the /v1beta1/networking/vpcs endpoint. The VPC configuration must be supplied as a JSON object in the request body.

The supported fields and their data types are as follows.

data.json
{
"name": "string",
"zone": "string",
"hostPrefix": "string",
"vpcPrefixes": [
{
"name": "string",
"value": "string"
}
],
"ingress": {
"disablePublicServices": boolean
},
"egress": {
"disablePublicAccess": boolean
},
"dhcp": {
"dns": {
"servers": [
"string",
"string"
]
}
}
}

Submit the request, passing the JSON object in the body as data.json.

Example request
$
curl -X POST https://api.coreweave.com/v1beta1/networking/vpcs \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API_ACCESS_TOKEN}" \
-d @data.json

A successful response returns a VPC object.

Response status code 200
{
"name": "string",
"zone": "string",
"hostPrefix": "string",
"vpcPrefixes": [
{
"name": "string",
"value": "string"
}
],
"ingress": {
"disablePublicServices": boolean
},
"egress": {
"disablePublicAccess": boolean
},
"dhcp": {
"dns": {
"servers": [
"string",
"string"
]
}
}
}

VPCs by ID

To retrieve, update, or delete a VPC by ID, use the /v1beta1/networking/vpcs/{id} endpoint. The API supports the GET, PATCH, and DELETE methods.

GET /v1beta1/networking/vpcs/{id}

To get information about a VPC, use the GET method with the /v1beta1/networking/vpcs/{id} endpoint. Substitute {id} with the VPC ID.

Example request
$
curl -X GET https://api.coreweave.com/v1beta1/networking/vpcs/{id} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API_ACCESS_TOKEN}"

A successful response returns the VPC object.

Response status code 200
{
"name": "string",
"zone": "string",
"hostPrefix": "string",
"vpcPrefixes": [
{
"name": "string",
"value": "string"
}
],
"ingress": {
"disablePublicServices": boolean
},
"egress": {
"disablePublicAccess": boolean
},
"dhcp": {
"dns": {
"servers": [
"string",
"string"
]
}
}
}

DELETE /v1beta1/networking/vpcs/{id}

To delete a VPC, use the DELETE method with the /v1beta1/networking/vpcs/{id} endpoint. Substitute {id} with the VPC ID.

Example request
$
curl -X DELETE https://api.coreweave.com/v1beta1/networking/vpcs/{id} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API_ACCESS_TOKEN}"

A successful response returns the deleted VPC object.

Response status code 200
{
"name": "string",
"zone": "string",
"hostPrefix": "string",
"vpcPrefixes": [
{
"name": "string",
"value": "string"
}
],
"ingress": {
"disablePublicServices": boolean
},
"egress": {
"disablePublicAccess": boolean
},
"dhcp": {
"dns": {
"servers": [
"string",
"string"
]
}
}
}

PATCH /v1beta1/networking/vpcs/{id}

To update a VPC, use the PATCH method with the /v1beta1/networking/vpcs/{id} endpoint. Substitute {id} with the VPC ID.

The cluster configuration must be supplied as a JSON object in the request body. The supported fields and their data types are as follows.

data.json
{
"updateMask": string <field-mask>,
"name": "string",
"zone": "string",
"hostPrefix": "string",
"vpcPrefixes": [
{
"name": "string",
"value": "string"
}
],
"ingress": {
"disablePublicServices": boolean
},
"egress": {
"disablePublicAccess": boolean
},
"dhcp": {
"dns": {
"servers": [
"string",
"string"
]
}
}
}

Submit the request, passing the JSON object in the body as data.json.

Example request
$
curl -X PATCH https://api.coreweave.com/v1beta1/networking/vpcs/{id} \
-H "Content-Type: application/json" \
-H "Authorization: Bearer {API_ACCESS_TOKEN}" \
-d @data.json

A successful response returns the updated cluster object.

Response status code 200
{
"name": "string",
"zone": "string",
"hostPrefix": "string",
"vpcPrefixes": [
{
"name": "string",
"value": "string"
}
],
"ingress": {
"disablePublicServices": boolean
},
"egress": {
"disablePublicAccess": boolean
},
"dhcp": {
"dns": {
"servers": [
"string",
"string"
]
}
}
}