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>",
      "name": "<string>",
      "fqn": "<string>",
      "created_by_subject": {
        "subjectId": "<string>",
        "subjectType": "user",
        "subjectSlug": "<string>",
        "subjectDisplayName": "<string>"
      },
      "type": "chat_prompt",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "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

Fully qualified name to filter prompts by (format: 'chat_prompt:{tenant_name}/{ml_repo_name}/{prompt_name}')

ml_repo_id
string

ID of the ML Repo to filter prompts by

name
string

Name of the prompt to filter by

offset
integer
default:0

Number of prompts to skip for pagination

limit
integer

Maximum number of prompts to return

include_empty_prompts
boolean
default:true

Whether to include prompts that have no versions

Response

List of prompts matching the query with pagination information

data
Prompt · object[]
required

List of prompts matching the query

pagination
Pagination · object
required

Pagination information including total count, offset, and limit