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

# List Prompts By Workspace

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

List prompts for a specific workspace.

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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Nemo Platform API
  version: 1.0.0
paths:
  /apis/models/v2/workspaces/{workspace}/prompts:
    get:
      operationId: list-prompts-apis-models-v-2-workspaces-workspace-prompts-get
      summary: List Prompts By Workspace
      description: List prompts for a specific workspace.
      tags:
        - subpackage_prompts
      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/PromptSort'
            default: created_at
        - name: filter
          in: query
          description: >-
            Filter prompts by workspace, project, name, description, created_at,
            and updated_at.
          required: false
          schema:
            $ref: '#/components/schemas/PromptFilter'
      responses:
        '200':
          description: Return prompts for a workspace
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptsPage'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
servers:
  - url: https://host.com
    description: Default
components:
  schemas:
    PromptSort:
      type: string
      enum:
        - name
        - '-name'
        - created_at
        - '-created_at'
        - updated_at
        - '-updated_at'
      description: Sort fields for Prompt queries.
      title: PromptSort
    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
    PromptFilter:
      type: object
      properties:
        workspace:
          type: string
          description: Filter by workspace.
        project:
          type: string
          description: Filter by project URN.
        name:
          type: string
          description: Filter by name.
        description:
          type: string
          description: Filter by description.
        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 Prompt queries.
      title: PromptFilter
    PromptMessageRole:
      type: string
      enum:
        - system
        - developer
        - user
        - assistant
      description: |-
        Role of a message author in a chat prompt.

        Follows the OpenAI chat schema the Inference Gateway speaks
        (``/v1/chat/completions``).
      title: PromptMessageRole
    PromptMessage:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/PromptMessageRole'
          description: The role of the message author.
        content:
          type: string
          description: Templated message content. May contain template variables.
      required:
        - role
        - content
      description: |-
        A single templated message in a chat prompt.

        ``content`` is a Jinja2 template body that may reference the prompt's
        declared ``input_variables`` (e.g. ``{{ topic }}``).
      title: PromptMessage
    FunctionDefinition:
      type: object
      properties:
        name:
          type: string
          description: The name of the function to be called.
        description:
          type: string
          description: >-
            A description of what the function does, used by the model to decide
            when and how to call it.
        parameters:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            The parameters the function accepts, described as a JSON Schema
            object.
        strict:
          type: boolean
          description: >-
            Whether to enforce strict schema adherence when generating the
            function call.
      required:
        - name
      description: |-
        An OpenAI-compatible function definition for tool calling.

        Mirrors the ``function`` object the Inference Gateway forwards to
        OpenAI-compatible backends.
      title: FunctionDefinition
    ChatCompletionTool:
      type: object
      properties:
        type:
          type: string
          enum:
            - function
          description: The type of the tool. Currently only 'function' is supported.
        function:
          $ref: '#/components/schemas/FunctionDefinition'
          description: The function definition for this tool.
      required:
        - type
        - function
      description: An OpenAI-compatible tool definition (currently always a function tool).
      title: ChatCompletionTool
    PromptToolChoice:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: >-
        Controls which (if any) tool is called: 'none', 'auto', 'required', or a
        named-tool object.
      title: PromptToolChoice
    InferenceParams:
      type: object
      properties:
        model:
          type: string
          description: Model identifier
        temperature:
          type: number
          format: double
          description: >-
            Float value between 0 and 1. temp of 0 indicates greedy decoding,
            where the token with highest prob is chosen. Temperature can't be
            set to 0.0 currently
        max_tokens:
          type: integer
          description: Max tokens to generate
        max_completion_tokens:
          type: integer
          description: Max tokens to generate
        top_p:
          type: number
          format: double
          description: >-
            Float value between 0 and 1; limits to the top tokens within a
            certain probability. top_p=0 means the model will only consider the
            single most likely token for the next prediction
        stop:
          type: array
          items:
            type: string
      description: >-
        Parameters for model inference. Extra fields can be supplied for
        additional options applied to the inference request directly. Fields not
        supported by the model may cause inference errors during evaluation.
      title: InferenceParams
    Prompt:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the prompt.
        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 prompt.
        messages:
          type: array
          items:
            $ref: '#/components/schemas/PromptMessage'
          description: Ordered list of chat messages that make up the prompt.
        input_variables:
          type: array
          items:
            type: string
          description: Names of the Jinja2 template variables the prompt expects.
        tools:
          type: array
          items:
            $ref: '#/components/schemas/ChatCompletionTool'
          description: Optional OpenAI-compatible tool definitions to send with the prompt.
        tool_choice:
          $ref: '#/components/schemas/PromptToolChoice'
          description: >-
            Controls which (if any) tool is called: 'none', 'auto', 'required',
            or a named-tool object.
        response_format:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            Optional OpenAI-compatible response_format, e.g. a json_schema
            structured-output spec.
        inference_params:
          $ref: '#/components/schemas/InferenceParams'
          description: >-
            Optional default model and sampling parameters (temperature, top_p,
            max_tokens, ...).
        tags:
          type: array
          items:
            type: string
          description: Optional free-form tags for organizing prompts.
      required:
        - name
        - workspace
        - created_at
        - updated_at
      description: >-
        A reusable, stored chat prompt.


        A Prompt captures the messages, declared template variables, optional
        tool

        definitions, and default inference parameters needed to invoke a model

        through the Inference Gateway. The unique identifier is workspace/name.
      title: Prompt
    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
    PromptsPage:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Prompt'
        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: PromptsPage
    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",
      "created_at": "2024-01-15T09:30:00Z",
      "updated_at": "2024-01-15T09:30:00Z",
      "id": "prompt-1234abcd",
      "project": "project-alpha/v1",
      "description": "Prompt for summarizing technical documents using LLaMA 3.1 8B model.",
      "messages": [
        {
          "role": "system",
          "content": "You are a helpful assistant specialized in summarizing technical content."
        }
      ],
      "input_variables": [
        "document_text"
      ],
      "tools": [
        {
          "type": "function",
          "function": {
            "name": "summarize_text",
            "description": "Generates a concise summary of the input text.",
            "parameters": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string",
                  "description": "The text to summarize"
                },
                "max_length": {
                  "type": "integer",
                  "description": "Maximum length of the summary"
                }
              },
              "required": [
                "text"
              ]
            },
            "strict": true
          }
        }
      ],
      "tool_choice": "auto",
      "response_format": {
        "type": "object",
        "properties": {
          "summary": {
            "type": "string",
            "description": "The generated summary text"
          }
        },
        "required": [
          "summary"
        ]
      },
      "inference_params": {
        "model": "llama-3.1-8b",
        "temperature": 0.7,
        "max_tokens": 512,
        "max_completion_tokens": 512,
        "top_p": 0.9,
        "stop": [
          "\n"
        ]
      },
      "tags": [
        "summarization",
        "technical",
        "llama"
      ]
    }
  ],
  "pagination": {
    "page": 1,
    "page_size": 1,
    "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/prompts"

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

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

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/prompts")
  .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/prompts', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://host.com/apis/models/v2/workspaces/workspace/prompts");
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/prompts")! 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()
```