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

# Providers

> Returns providers with supported models. Optional `provider` or `search` query params.

Session-authenticated provider APIs for Manage Models.

## Operations

| Method   | Path                                  | Purpose                                              |
| -------- | ------------------------------------- | ---------------------------------------------------- |
| `GET`    | `/api/openground/providers`           | List providers (optional `?provider=` or `?search=`) |
| `POST`   | `/api/openground/providers`           | Create a provider                                    |
| `PUT`    | `/api/openground/providers`           | Update provider metadata                             |
| `DELETE` | `/api/openground/providers?provider=` | Delete a provider and all its models                 |

## Examples

<Tabs>
  <Tab title="Create">
    ```bash theme={null}
    curl -X POST "/api/openground/providers" \
      -H "Content-Type: application/json" \
      -H "Cookie: <signed-in-session-cookie>" \
      -d '{
        "providerId": "my-provider",
        "displayName": "My Provider",
        "description": "Custom LLM provider",
        "requiresVault": true
      }'
    ```
  </Tab>

  <Tab title="Delete">
    ```bash theme={null}
    curl -X DELETE "/api/openground/providers?provider=my-provider" \
      -H "Cookie: <signed-in-session-cookie>"
    ```
  </Tab>
</Tabs>

<Note>
  Provider delete is available on this API only - the Manage Models UI does not expose a delete button for providers.
</Note>


## OpenAPI

````yaml GET /api/openground/providers
openapi: 3.0.0
info:
  title: Manage Models - Providers API
  description: >-
    List, create, update, and delete LLM providers for the active database
    configuration. Requires a signed-in OpenLIT session.
  version: 1.0.0
servers:
  - url: /
security:
  - sessionAuth: []
paths:
  /api/openground/providers:
    get:
      summary: List providers
      description: >-
        Returns providers with supported models. Optional `provider` or `search`
        query params.
      operationId: listProviders
      parameters:
        - name: provider
          in: query
          required: false
          schema:
            type: string
        - name: search
          in: query
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Provider list or a single provider
        '401':
          description: Not signed in
components:
  securitySchemes:
    sessionAuth:
      type: apiKey
      in: cookie
      name: next-auth.session-token

````