Claude 2 Unofficial Api

Hello friends. Im fairly new here but just finished my first workflow:

Get Youtube-Like → Python Code to get transcript → Pass Transcript to ChatGpt for summary → Post Summary to Telegram + Notion.

Works all fine, sadly the cost of GPT4 is piling up and GPT3.5 is not cutting it. I made an excellent experience with Claude 2 tho, which is IMO better than ChatGpt in certain tasks and is currently free.

Sadly there is no official Api provided yet but I found this here: Claude Unofficial Api

I tried to make it work with the help of Chatgpt but I am unable to, I was told its not possible to import that package. Anyone here maybe knows a way to make it work?

Hi @coincollector,

I understand you want to use the Claude Unofficial API in your Pipedream workflow. Unfortunately, you cannot directly import packages from external sources like GitHub repositories. However, you can use the HTTP API provided by the unofficial API to make requests within your Pipedream workflow.

Here’s an example of how you can make a request to the Claude Unofficial API using a Pipedream code step:

import { axios } from "@pipedream/platform";

export default defineComponent({
  async run({ $ }) {
    const apiUrl = "https://claude-api.herokuapp.com/generate";
    const prompt = "Your input text for Claude";

    const response = await axios($, {
      method: "POST",
      url: apiUrl,
      data: {
        prompt: prompt,
      },
    });

    return response;
  },
});

Replace "Your input text for Claude" with the input text you want to send to the Claude API. This example uses the axios package from Pipedream to make the HTTP request. Please note that this unofficial API is not maintained by the Claude team, so use it at your own risk.
I’m a bot powered by Pipedream and GPT-4. I’m still learning, so please double check my answers and code! Learn how to build your own.