PromptLayer

App · 13 actions

Browse prompt templates, workflows, tables and evaluations, or run a PromptLayer workflow.

Actions

ActionWhat it does
Get logged requestGet logged request in the connected PromptLayer workspace.
Get raw prompt templateGet raw prompt template in the connected PromptLayer workspace.
Get tableGet table in the connected PromptLayer workspace.
Get workflowGet workflow in the connected PromptLayer workspace.
List evaluationsList evaluations in the connected PromptLayer workspace.
List prompt template labelsList prompt template labels in the connected PromptLayer workspace.
List prompt templatesList prompt templates in the connected PromptLayer workspace.
List table sheetsList table sheets in the connected PromptLayer workspace.
List tablesList tables in the connected PromptLayer workspace.
List workflow labelsList workflow labels in the connected PromptLayer workspace.
List workflowsList workflows in the connected PromptLayer workspace.
Render prompt templateRender a prompt template with the variables you supply.
Run workflowStart a PromptLayer workflow with its input variables.

Get logged request

Get logged request in the connected PromptLayer workspace.

Inputs

Request IDrequest_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

IdentifieridentifiertextRequired
Identifier.
Versionversionnumber
Version.
Labellabeltext
Label.
Resolve snippetsresolve_snippetstrue/false
Resolve snippets.
Include llm kwargsinclude_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

Tabletable_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 nameworkflow_id_or_nametextRequired
The agent ID or name.
Versionversionnumber
Specific version number to retrieve. Mutually exclusive with `label`.
Labellabeltext
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 IDworkspace_idnumber
Filter by specific workspace ID. If not provided, uses the current user's workspaceAt least 1.
Namenametext
Filter evaluations by name (case-insensitive partial match)
Statusstatustext
Filter evaluations by status: 'active' (default) returns only active evaluations, 'deleted' returns only deleted/archived evaluations, 'all' returns bothOne of: active, deleted, all.
Include runsinclude_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.
Pagepagenumber
Page number for paginationAt least 1.
Per pageper_pagenumber
Number of items per pageFrom 1 to 100.
Created by emailcreated_by_emailtext
Filter by the creator's email address.
Created aftercreated_afterdate and time
Filter resources created at or after this timestamp.
Created beforecreated_beforedate and time
Filter resources created at or before this timestamp.
Updated afterupdated_afterdate and time
Filter resources updated at or after this timestamp.
Updated beforeupdated_beforedate and time
Filter resources updated at or before this timestamp.
External sourceexternal_sourcetext
External ID source to filter by. Must be provided with external_id.
External IDexternal_idtext
External ID value to filter by. Must be provided with external_source.
Sort bysort_bytext
Sort field.One of: created_at (Created at), updated_at (Updated at), name, id.
Sort ordersort_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

IdentifieridentifiertextRequired
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

Pagepagenumber
Page.
Per pageper_pagenumber
Per page.
Labellabeltext
Filter prompt templates by release label (e.g., 'prod', 'dev', 'staging')
Namenametext
Filter prompt templates by name (case-insensitive partial match)
Tagstagstext
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.
Statusstatustext
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 sourceexternal_sourcetext
External ID source to filter by. Must be provided with external_id.
External IDexternal_idtext
External ID value to filter by. Must be provided with external_source.
Created by emailcreated_by_emailtext
Filter by the creator's email address.
Created aftercreated_afterdate and time
Filter resources created at or after this timestamp.
Created beforecreated_beforedate and time
Filter resources created at or before this timestamp.
Updated afterupdated_afterdate and time
Filter resources updated at or after this timestamp.
Updated beforeupdated_beforedate and time
Filter resources updated at or before this timestamp.
Sort bysort_bytext
Sort field.One of: created_at (Created at), updated_at (Updated at), name, id.
Sort ordersort_ordertext
Sort direction.One of: asc, desc.
Is snippetis_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

Tabletable_idtextRequired
Table ID.
Cursorcursortext
Cursor.
Limitlimitnumber
Limit.From 1 to 100.
Orderordertext
Order.One of: asc, desc.
Prompt IDprompt_idnumber
Prompt ID.
Prompt version IDprompt_version_idnumber
Prompt version ID.
Prompt label IDprompt_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 IDfolder_idnumber
Folder ID.
Namenametext
Name.
Cursorcursortext
Cursor.
Limitlimitnumber
Limit.From 1 to 100.
Orderordertext
Order.One of: asc, desc.
Prompt IDprompt_idnumber
Prompt ID.
Prompt version IDprompt_version_idnumber
Prompt version ID.
Prompt label IDprompt_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 nameworkflow_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

Pagepagenumber
Page number for pagination.At least 1.
Per pageper_pagenumber
Number of items per page.From 1 to 100.
Created by emailcreated_by_emailtext
Filter by the creator's email address.
Created aftercreated_afterdate and time
Filter resources created at or after this timestamp.
Created beforecreated_beforedate and time
Filter resources created at or before this timestamp.
Updated afterupdated_afterdate and time
Filter resources updated at or after this timestamp.
Updated beforeupdated_beforedate and time
Filter resources updated at or before this timestamp.
External sourceexternal_sourcetext
External ID source to filter by. Must be provided with external_id.
External IDexternal_idtext
External ID value to filter by. Must be provided with external_source.
Sort bysort_bytext
Sort field.One of: created_at (Created at), updated_at (Updated at), name, id.
Sort ordersort_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

IdentifieridentifiertextRequired
Identifier.
Versionversionnumber
Version.At least 1.
Labellabeltext
Label.
Input variablesinput_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 nameworkflow_nametextRequired
Workflow name.
Input variablesinput_variablesobject
Input variables.
Workflow label nameworkflow_label_nametext
Workflow label name.
Workflow version numberworkflow_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
  }
}

On this page