Saturday, March 2, 2024

Save Clay Enrichment Credit By Utilizing OpenAI’s API

Must read

Whenever you use to counterpoint your database you in all probability use AI to do issues like clear your lists, establish the client persona of a prospect, or personalize the chilly emails you’re planning on sending, you in all probability use the OpenAI enrichment.

Effectively I hate to say it however you’re in all probability losing credit.

We all know Clay’s pricing is comparatively costly particularly when you’re a one individual present or just wish to squeeze essentially the most out of your credit each month. Fortunately, there’s a straightforward workaround.

On this article we’ll evaluate pricing of utilizing Open AI’s API vs Clay’s enrichment, the right way to see your Open AI API key, and the right way to join Clay to the API step-by-step.  

Evaluating OpenAI vs Pricing

Let’s first work out the price of Clay.

So even when we would like hook up with APIs or make HTTP requests, we’ve to be on Clay’s “Explorer” plan. 

This implies it’s important to be paying on the minimal $349 per thirty days and that comes with 12,000 credit. This comes out to $0.0291 per credit score/enrichment (similar factor).

With OpenAI, their pricing is a bit completely different. They measured by tokens versus credit. With Clay, each time you execute an enrichment, that’s one credit score.

With OpenAI, it’s extra of what number of phrases you employ in your immediate which equals a certain quantity of tokens. 

Let’s assume our immediate is one thing easy: “Please summarize this firm’s description and summarize in three sentences max what they do.” – There are 14 phrases on this sentence, which in keeping with each the picture above in addition to this GPT token calculator, it might price us $0.0018 to run this immediate each time. 

We all know at a look, that is considerably cheaper than the fee to make use of GPT-4 with Clay as an enrichment.

To be precise, Clay is nearly 17x costlier than utilizing OpenAI’s API instantly.

Additionally price noting, the rationale that is even in dialog proper now’s as a result of API calls, or HTTP requests on Clay are all free! It doesn’t use any credit in any respect. 

Now you see why it could be price doing an HTTP request your self…

And I promise you, when you’re not technical, this might be a step-by-step information on the right way to set all of it up. 

How To Discover Your Open AI API key

First you’re going to go to OpenAI’s playground. It might ask you to sign up. 

Within the high proper nook, you’re going to see your title. Click on “View API Keys”. 

For me this part already has just a few completely different keys, however when you’re ranging from scratch you’re going to click on “Create new secret key”, and then you definately’re going to present it a reputation.

You may title it “Clay” when you’d like. And this may generate a brand new API for you. 

You now have an Open AI API key! Copy this & preserve it someplace secure.

Making Open AI API Calls on Clay

Let’s begin with a model new desk in Clay. 

Let’s use Apple, the corporate, for instance. We would like GPT4 to explain what the corporate does in below 3 sentences utilizing an HTTP request primarily based off their LinkedIn Profile. 

Let’s get began by cleansing up our desk.

Add a “Enrich Firm” for LinkedIn enrichment and your desk ought to appear to be this. 

Run the enrichment and you must now have the outline that’s on the Apple firm LinkedIn web page.

Clearly it is a tremendous lengthy description so we wish to use AI to summarize it for us. 

Go forward and add an enrichment and search for “HTTP API”.

That is the place you’re mainly going to repeat and paste what I let you know to do. 

Technique: POST


Physique: {"mannequin": "gpt-4", "messages": [{"role": "user", "content": "Please summarize this company’s description and summarize in three sentences max what they do. Here is the description {insert column you want to reference}“}], "temperature": 0.7}

That is what it ought to appear to be thus far:

Now you’re going to have two headers. 

First Header:

Key: Content material-Sort 

Worth: utility/json

Second Hedaer:

Key: Authorization

Worth: Bearer sk- {paste your API key}

That is what it ought to appear to be thus far:

Now go forward and click on “Save and Run First 10 Rows”. 

For those who’ve finished it efficiently, you must see a 200 come up. This implies a Standing 200 which means it was ready to hook up with the API. 

Now, we are able to go forward and map the consequence to a brand new column. 

Click on the cell and increase it. Then click on “Decisions”. 

When you increase it, you’re going to click on “Message”. 

Then you definately’re going to see the response that got here again from Open AI and now you’ll be able to create a brand new column for the responses. 

That is what the top consequence ought to appear to be.

Clay Is Unimaginable

Utilizing Clay’s HTTP characteristic is tremendous superb as a result of it permits you to hook up with APIs like Open AI for very excessive price financial savings. You do not have to spend a single Clay enrichment credit score.

For those who’re prepared to do a tiny little bit of technical work, it would prevent a lot cash and can help you use your Clay credit for enrichments that you actually need like LinkedIn or discovering electronic mail addresses. 

I encourage you to present this a try to let me know your ideas! Clay is a tremendous lead enrichment device. If you wish to study extra about how we use it, you can try our full evaluate 🙂

Supply hyperlink

More articles


Please enter your comment!
Please enter your name here

Latest article