dots.v2.genAi.custom_models.get()

Generated on 27 Oct 2026 from DoTs version v1.21.0

Usage

client.v2.genAi.custom_models.get(requestConfiguration?: RequestConfiguration<Custom_modelsRequestBuilderGetQueryParameters>): Promise<undefined | ApiListCustomModelsOutputPublic>

Description

To list custom models, send a GET request to /v2/gen-ai/custom_models.

Parameters

page integer optional

Example: 1

Page number for pagination.

perPage integer optional

Example: 1

Number of items per page.

status string optional

Filter by model status.

One of: STATUS_UNSPECIFIED, STATUS_IMPORTING, STATUS_READY, STATUS_FAILED, STATUS_DELETED

Default: STATUS_UNSPECIFIED

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.genAi.custom_models.get();

Pagination

This method returns paginated results. The response includes a links.pages object with URLs for navigating between pages. To retrieve the next page, parse the next URL and pass the page query parameter:

let response = await client.v2.genAi.custom_models.get();
let pages = response?.links?.pages;

while (pages && "next" in pages && typeof pages.next === "string") {
    const page = Number(new URL(pages.next).searchParams.get("page"));
    response = await client.v2.genAi.custom_models.get({
        queryParameters: {
            page,
        },
    });
    pages = response?.links?.pages;
}

Response Example

Show Response Example
{
  "links": {
    "pages": {
      "first": "example string",
      "last": "example string",
      "next": "example string",
      "previous": "example string"
    }
  },
  "max_threshold": 123,
  "meta": {
    "page": 123,
    "pages": 123,
    "total": 123
  },
  "models": [
    {
      "active_deployments": [],
      "architecture": "example string",
      "context_length": 123,
      "cost_estimate_per_month": 123,
      "created_at": "2023-01-01T00:00:00Z",
      "description": "example string",
      "error_message": "example string",
      "file_count": 123,
      "input_modalities": [
        "example string"
      ],
      "license": "example string",
      "name": "example name",
      "output_modalities": [
        "example string"
      ],
      "parameters": "12345",
      "source_type": "SOURCE_TYPE_UNSPECIFIED",
      "status": "STATUS_UNSPECIFIED",
      "storage_region": "example string",
      "team_id": "12345",
      "total_size_bytes": "12345",
      "updated_at": "2023-01-01T00:00:00Z",
      "uuid": "123e4567-e89b-12d3-a456-426614174000"
    }
  ]
}

More Information

See /v2/gen-ai/custom_models 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.