Skip to main content

dedicated_inferences

Creates, updates, deletes, gets or lists a dedicated_inferences resource.

Overview

Namededicated_inferences
TypeResource
Iddigitalocean.inference.dedicated_inferences

Fields

The following fields are returned by SELECT queries:

Response containing a single Dedicated Inference instance.

NameDatatypeDescription
idstring (uuid)Unique ID of the Dedicated Inference. (example: 6b5c619c-359c-44ca-87e2-47e98170c01d)
created_atstring (date-time)When the Dedicated Inference was created. (example: 2024-01-09T20:44:32Z)
endpointsobject
pending_deployment_specobjectPending deployment when status is provisioning or updating.
regionstringDigitalOcean region where the Dedicated Inference is hosted. (example: atl1)
specobjectStructured configuration for a Dedicated Inference deployment.
statusstringCurrent state of the Dedicated Inference. (active, new, provisioning, updating, deleting, error) (example: active)
updated_atstring (date-time)When the Dedicated Inference was last updated. (example: 2024-01-09T20:44:32Z)
vpc_uuidstring (uuid)VPC UUID of the Dedicated Inference. (example: 997615ce-132d-4bae-9270-9ee21b395e5d)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
dedicated_inferences_getselectdedicated_inference_idRetrieve an existing Dedicated Inference by ID. Send a GET request to
/v2/dedicated-inferences/{dedicated_inference_id}. The status in the response
is one of active, new, provisioning, updating, deleting, or error.
dedicated_inferences_listselectper_page, page, regionList all Dedicated Inference instances for your team. Send a GET request to
/v2/dedicated-inferences. You may filter by region and use page and per_page
for pagination.
dedicated_inferences_createinsertspecCreate a new Dedicated Inference for your team. Send a POST request to
/v2/dedicated-inferences with a spec object (version, name, region, vpc,
enable_public_endpoint, model_deployments) and optional access_tokens (e.g.
hugging_face_token for gated models). The response code 202 Accepted indicates
the request was accepted for processing; it does not indicate success or failure.
The token value is returned only on create; store it securely.
dedicated_inferences_patchupdatededicated_inference_idUpdate an existing Dedicated Inference. Send a PATCH request to
/v2/dedicated-inferences/{dedicated_inference_id} with updated spec and/or
access_tokens. Status will move to updating and return to active when done.
dedicated_inferences_deletedeletededicated_inference_idDelete an existing Dedicated Inference. Send a DELETE request to
/v2/dedicated-inferences/{dedicated_inference_id}. The response 202 Accepted
indicates the request was accepted for processing.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
dedicated_inference_idstring (uuid)A unique identifier for a Dedicated Inference instance. (example: 6b5c619c-359c-44ca-87e2-47e98170c01d)
pageintegerWhich 'page' of paginated results to return. (example: 1)
per_pageintegerNumber of items returned per page (example: 2)
regionstringFilter by region. Dedicated Inference is only available in nyc2, tor1, and atl1. (example: atl1)

SELECT examples

Retrieve an existing Dedicated Inference by ID. Send a GET request to
/v2/dedicated-inferences/{dedicated_inference_id}. The status in the response
is one of active, new, provisioning, updating, deleting, or error.

SELECT
id,
created_at,
endpoints,
pending_deployment_spec,
region,
spec,
status,
updated_at,
vpc_uuid
FROM digitalocean.inference.dedicated_inferences
WHERE dedicated_inference_id = '{{ dedicated_inference_id }}' -- required
;

INSERT examples

Create a new Dedicated Inference for your team. Send a POST request to
/v2/dedicated-inferences with a spec object (version, name, region, vpc,
enable_public_endpoint, model_deployments) and optional access_tokens (e.g.
hugging_face_token for gated models). The response code 202 Accepted indicates
the request was accepted for processing; it does not indicate success or failure.
The token value is returned only on create; store it securely.

INSERT INTO digitalocean.inference.dedicated_inferences (
spec,
access_tokens
)
SELECT
'{{ spec }}' /* required */,
'{{ access_tokens }}'
RETURNING
dedicated_inference,
token
;

UPDATE examples

Update an existing Dedicated Inference. Send a PATCH request to
/v2/dedicated-inferences/{dedicated_inference_id} with updated spec and/or
access_tokens. Status will move to updating and return to active when done.

UPDATE digitalocean.inference.dedicated_inferences
SET
spec = '{{ spec }}',
access_tokens = '{{ access_tokens }}'
WHERE
dedicated_inference_id = '{{ dedicated_inference_id }}' --required
RETURNING
dedicated_inference;

DELETE examples

Delete an existing Dedicated Inference. Send a DELETE request to
/v2/dedicated-inferences/{dedicated_inference_id}. The response 202 Accepted
indicates the request was accepted for processing.

DELETE FROM digitalocean.inference.dedicated_inferences
WHERE dedicated_inference_id = '{{ dedicated_inference_id }}' --required
;