TechnologySeptember 4, 2024

Move From Experimentation to Production in a Flash with the DataStax Langflow API

Move From Experimentation to Production in a Flash with the DataStax Langflow API

Langflow is already a great way to experiment and build with generative AI, from retrieval-augmented generation (RAG) to multi-agent applications. In June, we announced you could build apps with Langflow hosted by DataStax; today, we’re announcing that you can serve the API for your Langflow apps directly from the DataStax platform. This hosted API platform is available in public preview today.

What does this mean?

Building a GenAI application can now look like this:

  • Sign up for a DataStax account
  • Experiment, design, and test your GenAI application by dragging and dropping components for any LLM, vector database, or embedding model
  • Once you're happy, generate an API key and start interacting with your application via the API

You no longer need to self-host Langflow and concern yourself with infrastructure management. Instead, you can generate an API key—and deploy your apps to production much faster. 

How simple is Langflow to use? Let’s take a look.

Building and deploying with DataStax Langflow

Let's see how easy it is to get up and running with DataStax Langflow, all the way through to calling your flow's API.

Once you sign up for a DataStax account or log into Astra DB, select “Build an app with Langflow.” View your Langflow GenAI application flows in My Collection. Select one of your existing projects, or, if you don't have one yet, create a new project.

If you created a new project, choose one of the templates. Basic Prompting or Memory Chatbot are great starter options as they don't require much extra setup. These templates use the OpenAI model component, so you’ll need to add an OpenAI API key to get them to work.


Once you are happy with your flow, click on Playground to test.

In the Playground, you can chat with your flow to ensure it’s behaving as you expect. Let's deploy this app. Close the Playground and click on API

You can generate an application token in the API pane in the Langflow Workspace.


Copy the code from the cURL tab and paste it into your terminal.

Replace <YOUR_APPLICATION_TOKEN> with the token that you generated. There’s also an "input_value" set to "message" that you should update to a message that you want to send to your flow.

Run the command. If you have the jq JSON processor installed, we recommend using it to format the JSON.

There you go! In less than five minutes, you’ve built, deployed, and used an API for your own GenAI project powered by DataStax Langflow.

The Langflow API is for your GenAI apps

Langflow makes it simple and speedy to experiment with and build GenAI flows. With the DataStax hosted Langflow API, once the flow is built, your chatbots, your recommendation engines, and your AI agents are ready to use in the rest of your application. 

Sign up to DataStax Langflow and start hosting your GenAI flows!

Discover more
Langflow
Share

One-stop Data API for Production GenAI

Astra DB gives JavaScript developers a complete data API and out-of-the-box integrations that make it easier to build production RAG apps with high relevancy and low latency.