Skip to main content
GET
/
api
/
v2
/
projects
/
{project_id}
/
prompt-templates
/
name
/
{name}
Get prompt template by name and environment
curl --request GET \
  --url https://api.example.com/api/v2/projects/{project_id}/prompt-templates/name/{name} \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "prompt_template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "prompt_template_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "prompt_template_name": "<string>",
  "version_name": "<string>",
  "version_description": "<string>",
  "metadata": {
    "provider": "<string>",
    "flavor": "<string>",
    "model": "<string>",
    "params": {},
    "provider_info": {}
  },
  "format_version": 123,
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "content": [
    {
      "role": "<string>",
      "content": "<string>",
      "media_slots": [
        {
          "type": "audio",
          "placeholder_name": "<string>"
        }
      ]
    }
  ],
  "tool_schema": [
    {
      "name": "<string>",
      "description": "<string>",
      "parameters": {}
    }
  ],
  "output_schema": {}
}

Path Parameters

project_id
string
required
name
string
required

Query Parameters

environment
string | null
format
string | null
flavor_name
string | null

Body

application/json

The body is of type EmptyRequest · object.

Response

200 - application/json

PlainPromptTemplate(prompt_template_id: uuid.UUID, prompt_template_version_id: uuid.UUID, prompt_template_name: str, version_name: Optional[str], version_description: Optional[str], metadata: server.api_routes.prompt_templates_api_v2.PromptTemplateMetadata, format_version: int, project_id: uuid.UUID, content: list[typing.Union[server.project_sessions.prompt_template_model.ChatMessageWithMediaSlot, server.project_sessions.prompt_template_model.ChatMessage, server.project_sessions.prompt_template_model.HistoryPlaceholder]], tool_schema: Optional[list[shared.common.NormalizedToolSchema]], output_schema: Optional[dict[str, Any]])

prompt_template_id
string<uuid>
required
prompt_template_version_id
string<uuid>
required
prompt_template_name
string
required
version_name
string | null
required
version_description
string | null
required
metadata
PromptTemplateMetadata · object
required
format_version
integer
required
project_id
string<uuid>
required
content
(ChatMessageWithMediaSlot · object | ChatMessage · object | HistoryPlaceholder · object)[]
required
tool_schema
NormalizedToolSchema · object[] | null
required
output_schema
Output Schema · object
required