dots.v2.dedicatedInferences.byDedicated_inference_id().tokens.post()

Generated on 5 Nov 2026 from DoTs version v1.23.0

Usage

client.v2.dedicatedInferences.byDedicated_inference_id(dedicated_inference_id).tokens.post(body: Dedicated_inference_token_create_request, requestConfiguration?: RequestConfiguration<object>): Promise<undefined | TokensPostResponse>

Description

Create a new access token for a Dedicated Inference instance. Send a POST request to /v2/dedicated-inferences/{dedicated_inference_id}/tokens with a name. The token value is returned only once in the response; store it securely.

Parameters

Path Parameters

dedicated_inference_id string required

Example: 6b5c619c-359c-44ca-87e2-47e98170c01d

A unique identifier for a Dedicated Inference instance.

Request Body

name string required

Example: new-inference-token

Name for the new token.

Max length: 255

Request Sample

Show Request Sample
import { FetchRequestAdapter } from "@microsoft/kiota-http-fetchlibrary";
import {
    createDigitalOceanClient,
    DigitalOceanApiKeyAuthenticationProvider,
} from "@digitalocean/dots";

const authProvider = new DigitalOceanApiKeyAuthenticationProvider(process.env.DIGITALOCEAN_TOKEN!);
const adapter = new FetchRequestAdapter(authProvider);
const client = createDigitalOceanClient(adapter);

const response = await client.v2.dedicatedInferences
    .byDedicated_inference_id("6b5c619c-359c-44ca-87e2-47e98170c01d").tokens.post({
    name: "new-inference-token",
});

Response Example

Show Response Example
{
  "token": {
    "id": "01333f14-a903-4b8e-92b3-363a767aa052",
    "name": "first-token",
    "value": "di_xxxxxxxxxxxxxxxxxxxxxxxx",
    "created_at": "2024-01-09T20:44:32Z",
    "is_managed": false
  }
}

More Information

See /v2/dedicated-inferences/{dedicated_inference_id}/tokens in the API reference for additional detail on responses, headers, parameters, and more.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.