Skip to content
Discussion options

You must be logged in to vote

To deploy your flow as an API and interact with it using API endpoints in Langflow, follow these steps:

  1. Prepare a POST request to the /run/{flow_id} endpoint, replacing {flow_id} with the ID of the flow you wish to execute.

  2. Include necessary headers in your request, such as Content-Type: application/json and x-api-key: YOUR_API_KEY for authentication.

  3. Construct the request body with the input value and any tweaks. For example:

    {
      "inputs": {"text": "Sample input"},
      "tweaks": {}
    }
  4. Send the request using a tool like curl, Postman, or a script. Here's a curl example:

    curl -X 'POST' \
      'http://<your_server>/api/v1/run/{flow_id}' \
      -H 'accept: application/json' \
      -H 'Content-T…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nurettn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant