> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# ILlmProvidersQuery

- Package: [@gooddata/sdk-backend-spi](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/index.md)
- Kind: interface
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-backend-spi/src/organization/llmProviders/index.ts

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Service to query LLM providers.

**Signature:**

```typescript
export interface ILlmProvidersQuery 
```

## Methods

| Method | Description |
| --- | --- |
| [query()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.illmprovidersquery/index.md#illmprovidersqueryquery) | **_(ALPHA)_** Starts the LLM providers query. |
| [queryAll()](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.illmprovidersquery/index.md#illmprovidersqueryqueryall) | **_(ALPHA)_** Starts the LLM providers query. |
| [withPage(page)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.illmprovidersquery/index.md#illmprovidersquerywithpage) | **_(ALPHA)_** Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0 |
| [withSize(size)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.illmprovidersquery/index.md#illmprovidersquerywithsize) | **_(ALPHA)_** Sets number of LLM providers to return per page. Default size: 100 |
| [withSorting(sort)](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.illmprovidersquery/index.md#illmprovidersquerywithsorting) | **_(ALPHA)_** Sets sorting for the query. |

## Method details

### ILlmProvidersQuery.query()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Starts the LLM providers query.

**Signature:**

```typescript
query(): Promise<ILlmProvidersQueryResult>;
```
**Returns:**

Promise&lt;[ILlmProvidersQueryResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.illmprovidersqueryresult/index.md)&gt;

promise of first page of the results

### ILlmProvidersQuery.queryAll()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Starts the LLM providers query.

**Signature:**

```typescript
queryAll(): Promise<ILlmProvider[]>;
```
**Returns:**

Promise&lt;[ILlmProvider](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.illmprovider/index.md)[]&gt;

promise with a list of all LLM providers matching the specified options

### ILlmProvidersQuery.withPage()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Sets starting page for the query. Backend WILL return no data if the page is greater than total number of pages. Default page: 0

**Signature:**

```typescript
withPage(page: number): ILlmProvidersQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| page | number | zero indexed, must be non-negative |

**Returns:**

[ILlmProvidersQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.illmprovidersquery/index.md)

LLM providers query

### ILlmProvidersQuery.withSize()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Sets number of LLM providers to return per page. Default size: 100

**Signature:**

```typescript
withSize(size: number): ILlmProvidersQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| size | number | desired max number of LLM providers per page must be a positive number |

**Returns:**

[ILlmProvidersQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.illmprovidersquery/index.md)

LLM providers query

### ILlmProvidersQuery.withSorting()

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Sets sorting for the query.

**Signature:**

```typescript
withSorting(sort: string[]): ILlmProvidersQuery;
```

#### Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| sort | string[] | Sorting criteria in the format: property,(asc\|desc). Default sort order is ascending. Multiple sort criteria are supported. |

**Returns:**

[ILlmProvidersQuery](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-backend-spi/sdk-backend-spi.illmprovidersquery/index.md)

LLM providers query
