> ## 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

> [tab] Create
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> 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] Delete
>
> ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> curl -X DELETE "/api/openground/providers?provider=my-provider" \
>   -H "Cookie: <signed-in-session-cookie>"
> ```

> [!NOTE]
>
> Provider delete is available on this API only - the Manage Models UI does not expose a delete button for providers.


## 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

````

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