> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://nemo-platform.docs.buildwithfern.com/nemo/platform/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://nemo-platform.docs.buildwithfern.com/nemo/platform/_mcp/server.

# List ModelProviders By Workspace

GET https://host.com/apis/models/v2/workspaces/{workspace}/providers

List model providers for a specific workspace.

Reference: https://nemo-platform.docs.buildwithfern.com/nemo/platform/nemo/platform/documentation/reference/api-reference/model-providers/list-providers-apis-models-v-2-workspaces-workspace-providers-get

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Nemo Platform API
  version: 1.0.0
paths:
  /apis/models/v2/workspaces/{workspace}/providers:
    get:
      operationId: list-providers-apis-models-v-2-workspaces-workspace-providers-get
      summary: List ModelProviders By Workspace
      description: List model providers for a specific workspace.
      tags:
        - subpackage_modelProviders
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
        - name: page
          in: query
          description: Page number.
          required: false
          schema:
            type: integer
            default: 1
        - name: page_size
          in: query
          description: Page size.
          required: false
          schema:
            type: integer
            default: 100
        - name: sort
          in: query
          description: >-
            The field to sort by. To sort in decreasing order, use `-` in front
            of the field name.
          required: false
          schema:
            $ref: '#/components/schemas/ModelProviderSort'
            default: created_at
        - name: filter
          in: query
          description: >-
            Filter model providers by workspace, project, status,
            model_deployment_id, name, description, host_url, created_at, and
            updated_at.
          required: false
          schema:
            $ref: '#/components/schemas/ModelProviderFilter'
      responses:
        '200':
          description: Return model providers for a workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelProvidersPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
servers:
  - url: https://host.com
    description: Default
components:
  schemas:
    ModelProviderSort:
      type: string
      enum:
        - name
        - '-name'
        - created_at
        - '-created_at'
        - updated_at
        - '-updated_at'
        - status
        - '-status'
      description: Sort fields for ModelProvider queries.
      title: ModelProviderSort
    ModelProviderStatus:
      type: string
      enum:
        - UNKNOWN
        - CREATED
        - PENDING
        - READY
        - ERROR
        - DELETING
        - DELETED
        - LOST
      description: Status enum for ModelProvider objects.
      title: ModelProviderStatus
    DatetimeFilter:
      type: object
      properties:
        $gte:
          type: string
          format: date-time
          description: Filter for results greater than or equal to this datetime.
        $lte:
          type: string
          format: date-time
          description: Filter for results less than or equal to this datetime.
      title: DatetimeFilter
    ModelProviderFilter:
      type: object
      properties:
        workspace:
          type: string
          description: Filter by workspace.
        project:
          type: string
          description: Filter by project URN.
        status:
          $ref: '#/components/schemas/ModelProviderStatus'
          description: Filter by status.
        model_deployment_id:
          type: string
          description: Filter by associated deployment ID.
        name:
          type: string
          description: Filter by name.
        description:
          type: string
          description: Filter by description.
        host_url:
          type: string
          description: Filter by host URL.
        created_at:
          $ref: '#/components/schemas/DatetimeFilter'
          description: Filter by creation date.
        updated_at:
          $ref: '#/components/schemas/DatetimeFilter'
          description: Filter by update date.
      description: Filter for ModelProvider queries.
      title: ModelProviderFilter
    ServedModelMapping:
      type: object
      properties:
        model_entity_id:
          type: string
          description: Model Entity identifier as workspace/name (e.g., 'my-ws/my-model')
        served_model_name:
          type: string
          description: >-
            The actual model name to send to the backend endpoint in the 'model'
            field
      required:
        - model_entity_id
        - served_model_name
      description: Mapping between a Model Entity and how it's served by this provider.
      title: ServedModelMapping
    AuthContext:
      type: object
      properties:
        principal_id:
          type: string
          description: The principal's unique identifier
        principal_email:
          type: string
          description: The principal's email address
        principal_groups:
          type: array
          items:
            type: string
          description: Groups the principal belongs to
        principal_on_behalf_of:
          type: string
          description: If acting on behalf of another principal, their principal ID
        principal_on_behalf_of_groups:
          type: array
          items:
            type: string
          description: Groups the on-behalf-of principal belongs to
        principal_on_behalf_of_email:
          type: string
          description: The on-behalf-of principal's email address
      required:
        - principal_id
      description: >-
        Auth context captured at resource creation for delegated access.


        Stores a snapshot of the creating principal's identity so that
        controllers

        can later act on their behalf (e.g., accessing secrets).
      title: AuthContext
    ModelProvider:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the model provider
        name:
          type: string
          description: >-
            Name of the entity. Name/workspace combo must be unique across all
            entities. Allowed characters: letters (a-z, A-Z), digits (0-9),
            underscores, hyphens, and dots.
        workspace:
          type: string
          description: >-
            The workspace of the entity. Allowed characters: letters (a-z, A-Z),
            digits (0-9), underscores, hyphens, and dots.
        project:
          type: string
          description: The URN of the project associated with this entity.
        created_at:
          type: string
          format: date-time
          description: The timestamp of model entity creation
        updated_at:
          type: string
          format: date-time
          description: The timestamp of the last model entity update
        description:
          type: string
          description: Optional description of the model provider
        host_url:
          type: string
          description: The network endpoint URL for the model provider
        api_key_secret_name:
          type: string
          description: Reference to the API key stored in Secrets service
        served_models:
          type: array
          items:
            $ref: '#/components/schemas/ServedModelMapping'
          description: >-
            List of models served by this provider with routing information for
            IGW
        enabled_models:
          type: array
          items:
            type: string
          description: >-
            Optional list of specific models to enable from this provider. If
            not set, all discovered models are enabled.
        status:
          $ref: '#/components/schemas/ModelProviderStatus'
          default: UNKNOWN
          description: Current status of the model provider, populated by models service
        status_message:
          type: string
          default: ''
          description: Detailed status message, populated by models service
        default_extra_body:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            Default body parameters for inference requests. Can be overridden by
            user requests.
        default_extra_headers:
          type: object
          additionalProperties:
            type: string
          description: >-
            Default headers for inference requests. Can be overridden by user
            requests.
        required_extra_body:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            Required body parameters for inference requests. Cannot be
            overridden by user requests.
        required_extra_headers:
          type: object
          additionalProperties:
            type: string
          description: >-
            Required headers for inference requests. Cannot be overridden by
            user requests.
        model_deployment_id:
          type: string
          description: >-
            Optional reference to the ModelDeployment ID if this provider was
            auto-created for a deployment
        auth_context:
          $ref: '#/components/schemas/AuthContext'
          description: Auth context captured at provider creation.
        auth_header_format:
          type: string
          description: >-
            Jinja2 template string controlling how the API key secret is sent to
            the upstream. Must contain exactly one variable named `auth_secret`,
            which is substituted with the resolved secret value at request time.
            Example: `'X-Api-Key: {{ auth_secret }}'`. If not set, defaults to
            `'Authorization: Bearer {{ auth_secret }}'`.
      required:
        - name
        - workspace
        - created_at
        - updated_at
        - host_url
      description: >-
        A ModelProvider defines a reachable network endpoint that provides an
        inference

        service for one or more Model Entities. Examples of Model Providers
        include

        OpenAI, NIMs, Bedrock, NVIDIA Build, etc. A ModelProvider may be
        provisioned

        automatically by Models Controller for ModelDeployments, or it may be
        provisioned

        manually by an end user for an endpoint that does not have its lifecycle
        managed

        by models service (like an external provider.)


        The unique identifier for a ModelProvider is the combination of
        workspace/name.
      title: ModelProvider
    PaginationData:
      type: object
      properties:
        page:
          type: integer
          description: The current page number.
        page_size:
          type: integer
          description: The page size used for the query.
        current_page_size:
          type: integer
          description: The size for the current page.
        total_pages:
          type: integer
          description: The total number of pages.
        total_results:
          type: integer
          description: The total number of results.
      required:
        - page
        - page_size
        - current_page_size
        - total_pages
        - total_results
      title: PaginationData
    ModelProvidersPage:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/ModelProvider'
        pagination:
          $ref: '#/components/schemas/PaginationData'
          description: Pagination information.
        sort:
          type: string
          description: The field on which the results are sorted.
        filter:
          type: object
          additionalProperties:
            description: Any type
          description: Filtering information.
      required:
        - data
      title: ModelProvidersPage
    ValidationErrorLocItems:
      oneOf:
        - type: string
        - type: integer
      title: ValidationErrorLocItems
    ValidationError:
      type: object
      properties:
        loc:
          type: array
          items:
            $ref: '#/components/schemas/ValidationErrorLocItems'
        msg:
          type: string
        type:
          type: string
        input:
          description: Any type
        ctx:
          type: object
          additionalProperties:
            description: Any type
      required:
        - loc
        - msg
        - type
      title: ValidationError
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      title: HTTPValidationError

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "name": "llama-3.1-8b",
      "workspace": "research-team-alpha",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-04-10T14:45:00Z",
      "host_url": "https://models.research-alpha.example.com/api/v1/inference",
      "id": "provider-12345",
      "project": "project-ml-2024",
      "description": "LLaMA 3.1 8B parameter model provider for research experiments",
      "api_key_secret_name": "secret-llama-api-key",
      "served_models": [
        {
          "model_entity_id": "research-team-alpha/llama-3.1-8b",
          "served_model_name": "llama-3.1-8b-v1"
        }
      ],
      "enabled_models": [
        "llama-3.1-8b-v1",
        "llama-3.1-8b-v2"
      ],
      "status": "READY",
      "status_message": "Model provider is operational and ready to serve requests.",
      "default_extra_body": {
        "temperature": 0.7,
        "max_tokens": 1024
      },
      "default_extra_headers": {
        "X-Custom-Header": "NemoPlatform"
      },
      "required_extra_body": {},
      "required_extra_headers": {
        "Authorization": "Bearer"
      },
      "model_deployment_id": "deployment-98765",
      "auth_context": {
        "principal_id": "user-7890",
        "principal_email": "alice@example.com",
        "principal_groups": [
          "ml-researchers",
          "data-science"
        ],
        "principal_on_behalf_of": "user-1234",
        "principal_on_behalf_of_groups": [
          "admin",
          "devops"
        ],
        "principal_on_behalf_of_email": "admin@example.com"
      },
      "auth_header_format": "Authorization: Bearer {{ auth_secret }}"
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 10,
    "current_page_size": 1,
    "total_pages": 1,
    "total_results": 1
  },
  "sort": "created_at",
  "filter": {}
}
```

**SDK Code**

```python
import requests

url = "https://host.com/apis/models/v2/workspaces/workspace/providers"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://host.com/apis/models/v2/workspaces/workspace/providers';
const options = {method: 'GET', headers: {'Content-Type': 'application/json'}, body: '{}'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://host.com/apis/models/v2/workspaces/workspace/providers"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://host.com/apis/models/v2/workspaces/workspace/providers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://host.com/apis/models/v2/workspaces/workspace/providers")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://host.com/apis/models/v2/workspaces/workspace/providers', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://host.com/apis/models/v2/workspaces/workspace/providers");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://host.com/apis/models/v2/workspaces/workspace/providers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```