Skip to main content
GET
/
api
/
ml
/
v1
/
prompts
List Prompts
curl --request GET \
  --url https://{controlPlaneURL}/api/ml/v1/prompts \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "id": "<string>",
      "ml_repo_id": "<string>",
      "type": "chat_prompt",
      "name": "<string>",
      "fqn": "<string>",
      "created_by_subject": {
        "subjectId": "<string>",
        "subjectType": "user",
        "subjectSlug": "<string>",
        "subjectDisplayName": "<string>"
      },
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "latest_version": {
        "id": "<string>",
        "fqn": "<string>",
        "created_by_subject": {
          "subjectId": "<string>",
          "subjectType": "user",
          "subjectSlug": "<string>",
          "subjectDisplayName": "<string>"
        },
        "created_at": "2023-11-07T05:31:56Z",
        "updated_at": "2023-11-07T05:31:56Z",
        "manifest": {
          "name": "<string>",
          "description": "<string>",
          "metadata": {},
          "version_alias": "<string>",
          "ml_repo": "<string>",
          "version": 2,
          "type": "chat_prompt",
          "messages": [
            {
              "role": "system",
              "content": "<string>",
              "name": "<string>"
            }
          ],
          "variables": {},
          "model_configuration": {
            "provider": "<string>",
            "model": "<string>",
            "parameters": {
              "max_tokens": 123,
              "temperature": 123,
              "top_k": 123,
              "top_p": 123,
              "stop": [
                "<string>"
              ]
            },
            "extra_parameters": {}
          },
          "tools": [
            {
              "type": "function",
              "function": {
                "name": "<string>",
                "description": "<string>",
                "parameters": {},
                "strict": false
              }
            }
          ],
          "mcp_servers": [
            {
              "type": "mcp-server-fqn",
              "integration_fqn": "<string>",
              "enable_all_tools": false,
              "tools": [
                {
                  "name": "<string>"
                }
              ]
            }
          ],
          "guardrails": {
            "input_guardrails": [
              "<string>"
            ],
            "output_guardrails": [
              "<string>"
            ]
          },
          "response_format": {
            "type": "json_object"
          },
          "routing_config": {
            "load_balance_targets": [
              {
                "target": "<string>",
                "weight": 123,
                "retry_config": {
                  "attempts": 1,
                  "delay": 1,
                  "on_status_codes": [
                    "<any>"
                  ]
                },
                "fallback_status_codes": [
                  "401",
                  "403",
                  "404",
                  "429",
                  "500",
                  "502",
                  "503"
                ],
                "fallback_candidate": true,
                "override_params": {}
              }
            ],
            "type": "weight-based-routing"
          },
          "tool_call_to_mcp_mapping": {}
        },
        "usage_code_snippet": "<string>",
        "ml_repo_id": "<string>",
        "tags": [
          "<string>"
        ],
        "usage_code_snippets": [
          {
            "display_name": "<string>",
            "language": "<string>",
            "libraries": [
              "<string>"
            ],
            "code": "<string>"
          }
        ],
        "prompt_id": "<string>"
      },
      "run_steps": [
        123
      ]
    }
  ],
  "pagination": {
    "total": 100,
    "offset": 0,
    "limit": 10
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

fqn
string
ml_repo_id
string
name
string
offset
integer
default:0
limit
integer

Response

Successful Response

data
Prompt · object[]
required
pagination
object
required
I