PromptLayer
App · 13 actions
Browse prompt templates, workflows, tables and evaluations, or run a PromptLayer workflow.
Actions
| Action | What it does |
|---|---|
| Get logged request | Get logged request in the connected PromptLayer workspace. |
| Get raw prompt template | Get raw prompt template in the connected PromptLayer workspace. |
| Get table | Get table in the connected PromptLayer workspace. |
| Get workflow | Get workflow in the connected PromptLayer workspace. |
| List evaluations | List evaluations in the connected PromptLayer workspace. |
| List prompt template labels | List prompt template labels in the connected PromptLayer workspace. |
| List prompt templates | List prompt templates in the connected PromptLayer workspace. |
| List table sheets | List table sheets in the connected PromptLayer workspace. |
| List tables | List tables in the connected PromptLayer workspace. |
| List workflow labels | List workflow labels in the connected PromptLayer workspace. |
| List workflows | List workflows in the connected PromptLayer workspace. |
| Render prompt template | Render a prompt template with the variables you supply. |
| Run workflow | Start a PromptLayer workflow with its input variables. |
Get logged request
Get logged request in the connected PromptLayer workspace.
Inputs
- Request ID
request_idnumberRequired - The ID of the request to retrieve.At least 1.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"input_tokens": 1,
"latency_ms": 1,
"model": "example",
"output_tokens": 1,
"price": 1,
"prompt_blueprint": {},
"provider": "example",
"request_end_time": "example",
"request_id": 1,
"request_start_time": "example",
"success": true,
"tokens": 1,
"trace_id": "example"
}
}Get raw prompt template
Get raw prompt template in the connected PromptLayer workspace.
Inputs
- Identifier
identifiertextRequired - Identifier.
- Version
versionnumber - Version.
- Label
labeltext - Label.
- Resolve snippets
resolve_snippetstrue/false - Resolve snippets.
- Include llm kwargs
include_llm_kwargstrue/false - Include llm kwargs.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"commit_message": "example",
"created_at": "example",
"id": 1,
"llm_kwargs": {},
"metadata": {
"model": {
"api_type": "example",
"base_model": "example",
"display_params": {},
"model_config_display_name": "example",
"name": "example",
"parameters": {},
"provider": "example"
}
},
"prompt_name": "example",
"prompt_template": {
"content": [
{
"annotations": {},
"id": {},
"text": {},
"thought_signature": {},
"type": {}
}
],
"input_variables": [
"example"
],
"template_format": "f-string",
"type": "completion"
},
"snippets": [
{
"label": "example",
"prompt_name": "example",
"version": 1
}
],
"success": true,
"tags": [
"example"
],
"version": 1,
"workspace_id": 1
}
}Get table
Get table in the connected PromptLayer workspace.
Inputs
- Table
table_idtextRequired - Table ID.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"success": true,
"table": {
"sheet_row_counts": {}
}
}
}Get workflow
Get workflow in the connected PromptLayer workspace.
Inputs
- Workflow ID or name
workflow_id_or_nametextRequired - The agent ID or name.
- Version
versionnumber - Specific version number to retrieve. Mutually exclusive with `label`.
- Label
labeltext - Release label name to retrieve (e.g. 'prod', 'staging'). Mutually exclusive with `version`.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"commit_message": "example",
"created_at": "example",
"edges": [
{
"conditionals": [
{}
],
"id": "example",
"is_and": true,
"source_node_name": "example",
"target_node_name": "example"
}
],
"nodes": [
{
"configuration": {},
"dependencies": [
{}
],
"id": "example",
"is_output_node": true,
"name": "example",
"node_type": "example",
"workflow_version_id": 1
}
],
"release_labels": [
"example"
],
"required_input_variables": {},
"success": true,
"version": 1,
"workflow_id": 1,
"workflow_name": "example",
"workflow_version_id": 1
}
}List evaluations
List evaluations in the connected PromptLayer workspace.
Inputs
- Workspace ID
workspace_idnumber - Filter by specific workspace ID. If not provided, uses the current user's workspaceAt least 1.
- Name
nametext - Filter evaluations by name (case-insensitive partial match)
- Status
statustext - Filter evaluations by status: 'active' (default) returns only active evaluations, 'deleted' returns only deleted/archived evaluations, 'all' returns bothOne of:
active,deleted,all. - Include runs
include_runstrue/false - If true, include batch runs nested under each evaluation. Each run includes its full report data, status (RUNNING or COMPLETED), and cell status counts.
- Page
pagenumber - Page number for paginationAt least 1.
- Per page
per_pagenumber - Number of items per pageFrom 1 to 100.
- Created by email
created_by_emailtext - Filter by the creator's email address.
- Created after
created_afterdate and time - Filter resources created at or after this timestamp.
- Created before
created_beforedate and time - Filter resources created at or before this timestamp.
- Updated after
updated_afterdate and time - Filter resources updated at or after this timestamp.
- Updated before
updated_beforedate and time - Filter resources updated at or before this timestamp.
- External source
external_sourcetext - External ID source to filter by. Must be provided with external_id.
- External ID
external_idtext - External ID value to filter by. Must be provided with external_source.
- Sort by
sort_bytext - Sort field.One of:
created_at(Created at),updated_at(Updated at),name,id. - Sort order
sort_ordertext - Sort direction.One of:
asc,desc.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"evaluations": [
{
"comment": "example",
"created_at": "example",
"dataset_id": 1,
"deleted": true,
"external_ids": [
{}
],
"folder_id": 1,
"id": 1,
"is_blueprint": true,
"name": "example",
"parent_report_id": 1,
"runs": [
{}
],
"score_configuration": {},
"tags": {},
"updated_at": "example",
"user_id": 1,
"workspace_id": 1
}
],
"message": "example",
"page": 1,
"pages": 1,
"per_page": 1,
"success": true,
"total": 1
}
}List prompt template labels
List prompt template labels in the connected PromptLayer workspace.
Inputs
- Identifier
identifiertextRequired - Identifier.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"release_labels": [
{
"prompt_version_id": 1,
"prompt_version_number": 1,
"release_label": "example",
"release_label_id": 1
}
]
}
}List prompt templates
List prompt templates in the connected PromptLayer workspace.
Inputs
- Page
pagenumber - Page.
- Per page
per_pagenumber - Per page.
- Label
labeltext - Filter prompt templates by release label (e.g., 'prod', 'dev', 'staging')
- Name
nametext - Filter prompt templates by name (case-insensitive partial match)
- Tags
tagstext - Filter prompt templates by tags. Can be a single tag or a list of tags. Only templates whose tags contain all specified values are returned.
- Status
statustext - Filter prompt templates by status: 'active' (default) returns only active templates, 'deleted' returns only deleted/archived templates, 'all' returns bothOne of:
active,deleted,all. - External source
external_sourcetext - External ID source to filter by. Must be provided with external_id.
- External ID
external_idtext - External ID value to filter by. Must be provided with external_source.
- Created by email
created_by_emailtext - Filter by the creator's email address.
- Created after
created_afterdate and time - Filter resources created at or after this timestamp.
- Created before
created_beforedate and time - Filter resources created at or before this timestamp.
- Updated after
updated_afterdate and time - Filter resources updated at or after this timestamp.
- Updated before
updated_beforedate and time - Filter resources updated at or before this timestamp.
- Sort by
sort_bytext - Sort field.One of:
created_at(Created at),updated_at(Updated at),name,id. - Sort order
sort_ordertext - Sort direction.One of:
asc,desc. - Is snippet
is_snippettrue/false - When true, return snippets only. When false, exclude snippets. When omitted, return both prompts and snippets.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"has_next": true,
"has_prev": true,
"items": [
{
"commit_message": "example",
"external_ids": [
{}
],
"id": 1,
"is_snippet": true,
"llm_kwargs": {},
"metadata": {
"model": {}
},
"prompt_name": "example",
"prompt_template": {
"content": {},
"input_variables": {},
"template_format": {},
"type": {}
},
"version": 1
}
],
"next_num": 1,
"page": 1,
"pages": 1,
"prev_num": 1,
"total": 1
}
}List table sheets
List table sheets in the connected PromptLayer workspace.
Inputs
- Table
table_idtextRequired - Table ID.
- Cursor
cursortext - Cursor.
- Limit
limitnumber - Limit.From 1 to 100.
- Order
ordertext - Order.One of:
asc,desc. - Prompt ID
prompt_idnumber - Prompt ID.
- Prompt version ID
prompt_version_idnumber - Prompt version ID.
- Prompt label ID
prompt_label_idnumber - Prompt label ID.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"data": [
{
"created_at": "example",
"id": "example",
"index": 1,
"row_count": 1,
"table_id": "example",
"title": "example",
"updated_at": "example",
"version_count": 1,
"workspace_id": 1
}
],
"has_more": true,
"next_cursor": "example"
}
}List tables
List tables in the connected PromptLayer workspace.
Inputs
- Folder ID
folder_idnumber - Folder ID.
- Name
nametext - Name.
- Cursor
cursortext - Cursor.
- Limit
limitnumber - Limit.From 1 to 100.
- Order
ordertext - Order.One of:
asc,desc. - Prompt ID
prompt_idnumber - Prompt ID.
- Prompt version ID
prompt_version_idnumber - Prompt version ID.
- Prompt label ID
prompt_label_idnumber - Prompt label ID.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"data": [
{
"created_at": "example",
"folder_id": 1,
"id": "example",
"sheet_count": 1,
"title": "example",
"updated_at": "example",
"workspace_id": 1
}
],
"has_more": true,
"next_cursor": "example"
}
}List workflow labels
List workflow labels in the connected PromptLayer workspace.
Inputs
- Workflow ID or name
workflow_id_or_nametextRequired - The agent ID or name.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"release_labels": [
{
"release_label": "example",
"release_label_id": 1,
"workflow_version_id": 1,
"workflow_version_number": 1
}
],
"success": true
}
}List workflows
List workflows in the connected PromptLayer workspace.
Inputs
- Page
pagenumber - Page number for pagination.At least 1.
- Per page
per_pagenumber - Number of items per page.From 1 to 100.
- Created by email
created_by_emailtext - Filter by the creator's email address.
- Created after
created_afterdate and time - Filter resources created at or after this timestamp.
- Created before
created_beforedate and time - Filter resources created at or before this timestamp.
- Updated after
updated_afterdate and time - Filter resources updated at or after this timestamp.
- Updated before
updated_beforedate and time - Filter resources updated at or before this timestamp.
- External source
external_sourcetext - External ID source to filter by. Must be provided with external_id.
- External ID
external_idtext - External ID value to filter by. Must be provided with external_source.
- Sort by
sort_bytext - Sort field.One of:
created_at(Created at),updated_at(Updated at),name,id. - Sort order
sort_ordertext - Sort direction.One of:
asc,desc.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"has_next": true,
"has_prev": true,
"items": [
{
"external_ids": [
{}
],
"id": 1,
"is_deleted": true,
"latest_version_number": 1,
"name": "example",
"release_labels": [
{}
],
"user_id": 1,
"workspace_id": 1
}
],
"next_num": 1,
"page": 1,
"pages": 1,
"per_page": 1,
"prev_num": 1,
"total": 1
}
}Render prompt template
Render a prompt template with the variables you supply.
Inputs
- Identifier
identifiertextRequired - Identifier.
- Version
versionnumber - Version.At least 1.
- Label
labeltext - Label.
- Input variables
input_variablesobject - Input variables.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"commit_message": "example",
"id": 1,
"llm_kwargs": {},
"metadata": {
"model": {
"api_type": "example",
"base_model": "example",
"display_params": {},
"model_config_display_name": "example",
"name": "example",
"parameters": {},
"provider": "example"
}
},
"prompt_name": "example",
"prompt_template": {
"content": [
{
"annotations": {},
"id": {},
"text": {},
"thought_signature": {},
"type": {}
}
],
"input_variables": [
"example"
],
"template_format": "f-string",
"type": "completion"
},
"version": 1
}
}Run workflow
Start a PromptLayer workflow with its input variables.
Inputs
- Workflow name
workflow_nametextRequired - Workflow name.
- Input variables
input_variablesobject - Input variables.
- Workflow label name
workflow_label_nametext - Workflow label name.
- Workflow version number
workflow_version_numbernumber - Workflow version number.At least 1.
Outputs
dataobject- The response from PromptLayer.
Example output
{
"data": {
"message": "example",
"success": true,
"warning": "example",
"workflow_version_execution_id": 1
}
}