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

# Get ModelProvider

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

Get a model provider by workspace and name.

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Nemo Platform API
  version: 1.0.0
paths:
  /apis/models/v2/workspaces/{workspace}/providers/{name}:
    get:
      operationId: get-provider-apis-models-v-2-workspaces-workspace-providers-name-get
      summary: Get ModelProvider
      description: Get a model provider by workspace and name.
      tags:
        - subpackage_modelProviders
      parameters:
        - name: workspace
          in: path
          required: true
          schema:
            type: string
        - name: name
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Return model provider details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModelProvider'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
servers:
  - url: https://host.com
    description: Default
components:
  schemas:
    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
    ModelProviderStatus:
      type: string
      enum:
        - UNKNOWN
        - CREATED
        - PENDING
        - READY
        - ERROR
        - DELETING
        - DELETED
        - LOST
      description: Status enum for ModelProvider objects.
      title: ModelProviderStatus
    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
    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
{
  "name": "llama-3.1-8b",
  "workspace": "research_team_alpha",
  "created_at": "2024-01-15T09:30:00Z",
  "updated_at": "2024-04-10T16:45:00Z",
  "host_url": "https://models.research.example.com/api/v1/inference",
  "id": "provider-12345",
  "project": "proj-ml-models/v1",
  "description": "LLaMA 3.1 8B model provider for research experiments",
  "api_key_secret_name": "secret-nemo-llama-3-1-8b",
  "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"
  ],
  "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": "nemo-client"
  },
  "required_extra_body": {
    "client_id": "research_alpha_001"
  },
  "required_extra_headers": {
    "Authorization": "Bearer <token>"
  },
  "model_deployment_id": "deployment-7890",
  "auth_context": {
    "principal_id": "user-98765",
    "principal_email": "alice.research@example.com",
    "principal_groups": [
      "researchers",
      "ml-team"
    ],
    "principal_on_behalf_of": "user-12345",
    "principal_on_behalf_of_groups": [
      "admin",
      "devops"
    ],
    "principal_on_behalf_of_email": "bob.admin@example.com"
  },
  "auth_header_format": "Authorization: Bearer {{ auth_secret }}"
}
```

**SDK Code**

```python
import requests

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

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/name';
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/name"

	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/name")

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/name")
  .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/name', [
  '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/name");
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/name")! 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()
```