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",
"latest_version": {
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>"
},
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"description": "<string>",
"version_alias": "<string>",
"version": 2,
"type": "chat_prompt",
"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": {
"type": "weight-based-routing",
"load_balance_targets": [
{
"target": "<string>",
"weight": 123,
"retry_config": {
"attempts": 1,
"delay": 100,
"on_status_codes": [
"429",
"500",
"502",
"503"
]
},
"fallback_status_codes": [
"401",
"403",
"404",
"429",
"500",
"502",
"503"
],
"fallback_candidate": true,
"override_params": {}
}
]
},
"tool_call_to_mcp_mapping": {}
},
"ml_repo_id": "<string>",
"prompt_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage_code_snippet": "<string>",
"tags": [
"<string>"
],
"usage_code_snippets": [
{
"display_name": "<string>",
"language": "<string>",
"code": "<string>",
"libraries": [
"<string>"
]
}
]
},
"run_steps": [
123
]
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}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",
"latest_version": {
"id": "<string>",
"fqn": "<string>",
"created_by_subject": {
"subjectId": "<string>",
"subjectType": "user",
"subjectSlug": "<string>",
"subjectDisplayName": "<string>"
},
"manifest": {
"name": "<string>",
"metadata": {},
"ml_repo": "<string>",
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"description": "<string>",
"version_alias": "<string>",
"version": 2,
"type": "chat_prompt",
"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": {
"type": "weight-based-routing",
"load_balance_targets": [
{
"target": "<string>",
"weight": 123,
"retry_config": {
"attempts": 1,
"delay": 100,
"on_status_codes": [
"429",
"500",
"502",
"503"
]
},
"fallback_status_codes": [
"401",
"403",
"404",
"429",
"500",
"502",
"503"
],
"fallback_candidate": true,
"override_params": {}
}
]
},
"tool_call_to_mcp_mapping": {}
},
"ml_repo_id": "<string>",
"prompt_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"usage_code_snippet": "<string>",
"tags": [
"<string>"
],
"usage_code_snippets": [
{
"display_name": "<string>",
"language": "<string>",
"code": "<string>",
"libraries": [
"<string>"
]
}
]
},
"run_steps": [
123
]
}
],
"pagination": {
"total": 100,
"offset": 0,
"limit": 10
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Successful Response
Show child attributes
Show child attributes
Subject ID
Subject type
user, team, serviceaccount, virtualaccount Subject slug
Subject display name
chat_prompt Show child attributes
Show child attributes
Subject ID
Subject type
user, team, serviceaccount, virtualaccount Subject slug
Subject display name
Chat Prompt manifest.
Show child attributes
Name of the entity
256Key value metadata. Should be valid JSON. For e.g. {"business-unit": "sales", "quality": "good", "rating": 4.5}
Name of the ML Repo
List of messages in the chat conversation, must be non-empty
+label=System Message +usage=System message for the chat
Show child attributes
+value=system +label=Role +usage=Role of the message +uiType=Ignore
system +label=Content +usage=Text content for the system message +uiType=CodeEditor +uiProps={"language": "text"}
+label=Name +usage=Name of the system
512Version alias is alternate, ideally human readable, version string to reference an artifact version. It should start with v followed by alphanumeric and it can include . and - in between (e.g. v1.0.0, v1-prod, v3-dev, etc)
128Version of the entity
x >= 1chat_prompt Add a model from Gateway along with parameters to be used for chat completion
Show child attributes
Name of the provider, must be one of the integration providers configured for the Gateway
Name of the model to be used for generations. This model should be available in the provider
Parameters to pass to the model when generating
Show child attributes
Arbitrary extra parameters to pass to the model when generating
List of tools to be used in the chat prompt
Show child attributes
+label=Type +usage=Type of the tool
function +label=Function Schema +usage=Schema defining a function for tool calls
Show child attributes
+label=Function Name +usage=Name of the function
+label=Description +usage=Description of the function
+label=Parameters +usage=Parameters schema for the function +uiType=JsonInput +uiProps={"descriptionInline":true}
+label=Strict +usage=Indicates if the function should be called strictly
A list of MCP servers FQNs or URLs and their tools
+label=MCP Server FQN +icon=puzzle-piece +usage=MCP server with FQN
Show child attributes
+label=MCP Server FQN Type +usage=The FQN of the MCP server +value=mcp-server-fqn
mcp-server-fqn +label=MCP Server Integration FQN +usage=The FQN of the MCP server
+label=Enable All Tools +usage=Whether to enable all tools from the MCP server
+label=Guardrails
Show child attributes
+label=Input Guardrails +usage=List of guardrail names to apply to user input messages before processing.
+label=Output Guardrails +usage=List of guardrail names to apply to AI response messages before returning to user.
Response format configuration for structured outputs
Show child attributes
+label=Type +usage=Type of response format
json_object Configuration for routing requests to different model targets
Show child attributes
+value=weight-based-routing +sort=1 +label=Routing Type
weight-based-routing +usage=List of targets for load balancing with weights +uiProps={"descriptionInline":true} +sort=4 +label=Load Balance Targets
Show child attributes
+usage=Target model or provider FQN +uiProps={"integrationType":"model", "valuePattern": "${providerAccount.name}/${manifest.name}"} +sort=1 +label=Target
+usage=Relative weight for routing decisions (higher values mean more traffic) +uiProps={"descriptionInline":true} +sort=2 +label=Weight
Show child attributes
+usage=Number of attempts to retry the request +uiProps={"descriptionInline":true} +label=Attempts
x >= 0+usage=Delay between retries in milliseconds +uiProps={"descriptionInline":true} +label=Delay
x > 0+usage=Status codes to retry on +uiProps={"descriptionInline":true} +label=Status Codes
+usage=Status Codes for which the request will fallback to other targets. If the status code is not present in fallback_status_codes, it fails immediately. +uiProps={"descriptionInline":true} +label=Fallback Status Codes
+usage=Whether this target is a fallback candidate. If set to false, this model will not be considered as a fallback option for targets of this load-balance-rule +uiProps={"descriptionInline":true} +sort=4 +label=Fallback Candidate
+usage=Optional parameters to override in the request +uiProps={"descriptionInline":true} +sort=3 +label=Override Parameters
Mapping of tool calls to MCP server integration IDs and tool names
Show child attributes
+label=Mcp Server Tool Details +usage=Mapping configuration for tool calls to MCP server integration and tool names
Show child attributes
+label=MCP Server Integration ID +usage=The integration ID of the MCP server
+label=Tool Name +usage=The name of the tool in the MCP server
Show child attributes
Was this page helpful?