> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List LLMs

> List large language models supported by DialNexa.

Read only
List LLMs returns one page of models available as primary language models for DialNexa agents. Each entry includes the model's stable `id`, display `name` and upstream `provider` (one of `openai`, `google`, `gemini`, `groq`, `deepseek`, `sarvam` or `ultravox`). Use the `id` field as the value for `llm_id` when creating or updating an agent. An `ultravox` model can be listed while your workspace cannot select it: Ultravox is available only in workspaces where it is enabled, and other workspaces receive `403`. The catalogue evolves continually as providers ship new models, so always call this endpoint at deploy time rather than hard-coding the list.

API-key responses contain `id`, `name`, and `provider`. Tool-support and prompt-budget metadata are available in the dashboard and MCP catalog. DialNexa validates model compatibility when you save an agent with functions or integration tools.

## When to use this

* **Agent build UIs**: populate the LLM selector when creating or editing an agent.
* **Provider diversification**: choose models from multiple providers so an upstream incident with one provider does not take down every agent.
* **Cost optimization**: switch high-volume agents to smaller models when conversational quality stays acceptable.
* **Tool use**: DialNexa checks that the chosen primary and fallback models support tool calling when you save an agent with functions, so an unsupported choice is rejected at that point.

## How to choose an LLM

The right LLM depends on the use case:

* **Repeated scripts**: test candidate models against the prompts, interruptions, and expected outcomes of your use case.
* **Complex conversations**: test multi-turn reasoning, recovery, and tone before selecting a model for live calls.
* **Latency-sensitive flows**: measure response timing on draft test calls and compare it with the configured fallback delay.
* **Multilingual or India-first**: confirm the model handles your target language well by testing with the [LLM Playground](https://dialnexa.com/docs/agents/testing-agents.md) before publishing.

See [LLMs and conversation behavior](https://dialnexa.com/docs/voice-ai/llms-and-conversation-behavior.md) for deeper guidance.

## List LLMs pagination

The default page size is 20. Requests above 100 models per page are capped at 100. API-key responses are plain arrays without pagination metadata; increment `page` until the returned array is shorter than your effective page size.

## Query parameters

| Parameter | Description |
| - | - |
| `page` | Page number, starting at 1. Must be a whole number; `0` or below is treated as `1`. |
| `limit` | Models per page. Must be a whole number. Default 20; `0` also returns 20, values above 100 are treated as 100, and a negative value fails with `500`. |
| `sortBy` | Column to sort by, for example `id`, `name` or `provider`. Default id. An unknown column returns `500`. |
| `sortOrder` | Sort direction. Default ASC. One of `ASC`, `DESC`. |

## Errors

* `401 Unauthorized` is returned when the API key is missing or revoked.

## Related endpoints

* [Get LLM Details](https://dialnexa.com/docs/api-reference/v1/llms/get.md): fetch a single model's detail.
* [Update Agent](https://dialnexa.com/docs/api-reference/v1/agents/update.md): change the LLM assigned to an existing agent.
* [LLM Playground](https://dialnexa.com/docs/agents/testing-agents.md): sandbox for testing model behavior on your prompts.
* [LLMs and conversation behavior](https://dialnexa.com/docs/voice-ai/llms-and-conversation-behavior.md): choosing the right model.


## OpenAPI

````yaml GET /v1/llms
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Organization Folders
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
  - name: Agent Evaluations
paths:
  /v1/llms:
    get:
      tags:
        - LLMs
      summary: List LLMs
      description: >-
        Returns one page of the language models available as an agent's primary
        LLM. Defaults to 20 models per page; limits above 100 are capped at 100.
        The API-key response is a plain array without pagination metadata.
      operationId: listLlms
      parameters:
        - name: page
          required: false
          in: query
          description: >-
            Page number, starting at 1. Must be a whole number; 0 or below is
            treated as 1.
          schema:
            example: 1
            type: number
        - name: limit
          required: false
          in: query
          description: >-
            Models per page. Must be a whole number. Default 20; 0 also returns
            20, values above 100 are treated as 100, and a negative value fails
            with 500.
          schema:
            example: 20
            type: number
        - name: sortBy
          required: false
          in: query
          description: >-
            Column to sort by, for example id, name or provider. Default id. An
            unknown column returns 500.
          schema:
            example: id
            type: string
        - name: sortOrder
          required: false
          in: query
          description: Sort direction. Default ASC.
          schema:
            enum:
              - ASC
              - DESC
            type: string
      responses:
        '200':
          description: LLMs returned successfully.
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      example: llm_mfgt5q2x8k4w7r
                      description: Signed LLM ID
                    name:
                      type: string
                    provider:
                      enum:
                        - google
                        - openai
                        - deepseek
                        - groq
                        - gemini
                        - sarvam
                      type: string
                  required:
                    - id
              examples:
                success:
                  summary: Successful response
                  value:
                    - id: llm_mfgt5q2x8k4w7r
                      name: GPT-4.1 Mini
                      provider: openai
        '400':
          description: Bad request - invalid query parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilteredErrorResponse'
              examples:
                error:
                  summary: 400 Bad Request
                  value:
                    message: >-
                      Request validation failed: Validation failed (numeric
                      string is expected)
        '401':
          description: Unauthorized - missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilteredErrorResponse'
              examples:
                error:
                  summary: 401 Unauthorized
                  value:
                    message: >-
                      API key is missing or invalid. You can generate this by
                      logging in into dashboard
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FilteredErrorResponse'
              examples:
                error:
                  summary: 500 Internal Server Error
                  value:
                    message: An unexpected error occurred. Please try again later.
      security:
        - bearer: []
components:
  schemas:
    FilteredErrorResponse:
      type: object
      description: >-
        Error body on calls, batch calls, voices, languages and LLMs, which
        return only the message (and data for a coded refusal).
      properties:
        message:
          type: string
        data:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable refusal code.
          description: >-
            Present for a coded refusal: code and the details listed for that
            code.
        validation_errors:
          type: array
          description: >-
            Present when uploaded rows fail number validation (batch and
            workflow lead uploads): one group per distinct error.
          items:
            type: object
            properties:
              error:
                type: string
              rows:
                type: array
                items:
                  type: integer
                description: Row numbers with this error.
              phone_numbers:
                type: array
                items:
                  type: string
        invalid_row_count:
          type: integer
          description: 'Present with validation_errors: how many rows failed.'
      required:
        - message
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.