Skip to content
On this page

PromptChainer API Endpoints

The PromptChainer API provides two main endpoints to interact with the flow management system. These endpoints allow you to retrieve information about flows and execute them.

flows/getFlowInfo/[flow-id]

The flows/get-flow-info endpoint is used to retrieve information about the various required fields for running a flow. This information includes input parameters, output parameters, and other metadata related to the flow.

Example Request:

http
GET /api/flows/getFlowInfo/clibnwpno000bmc0k9hvv3y7f HTTP/1.1
x-api-key: 7341ec8f-ba13-48f1-985a-db90896eff7f
Host: api.promptchainer.io

Use Cases:

  • Querying the required input parameters for a flow.
  • Retrieving information about the expected output parameters.
  • Understanding the flow's structure and metadata.

More Details

flows/run/[flow-id]

The flows/run endpoint allows you to execute a flow with the specified input parameters. This endpoint takes the input parameters as a JSON object and returns the flow's output after processing the input data.

Example Request:

http
POST /api/flows/run/clibnwpno000bmc0k9hvv3y7f HTTP/1.1
x-api-key: 7341ec8f-ba13-48f1-985a-db90896eff7f
Content-Type: application/json
Host: api.promptchainer.io

{
  "variables": {
    "item": "cat",
    "color": "green"
  }
}

Use Cases:

  • Executing a flow to process data or automate tasks.
  • Integrating the flow's output into your application or system.
  • Triggering a flow based on specific events or conditions.

More Details


For more detailed information about these endpoints, including required and optional parameters, sample requests and responses, and error codes, please refer to the dedicated sections for each endpoint in the documentation.