Maximizing Efficiency: Saving Clay Credits with OpenAI’s API

SaaS Tools and Apps
Surfer AI - Best All-in-one Assistant

- Your article will be ready in less than 20 minutes and it will be 10 times cheaper than using a dedicated writer.
- Create ready-to-rank articles in minutes with Surfer AI.
- Research, write, and optimize across industries with the click of a button.

When you use to enrich your database you possibly use AI to do factors like clean your lists, recognize the consumer persona of a prospect, or personalize the cold emails you are arranging on sending, you possibly use the OpenAI enrichment.

Effectively I detest to say it but you are possibly wasting credits.

We know Clay’s pricing is reasonably pricey particularly if you are a one particular man or woman present or basically want to squeeze the most out of your credits each month. Fortunately, there is an straightforward workaround.

In this write-up we’ll examine pricing of utilizing Open AI’s API vs Clay’s enrichment, how to see your Open AI API important, and how to connect Clay to the API phase by phase.  

Evaluating OpenAI vs Pricing

Let’s 1st figure out the expense of Clay.

So even if we want connect to APIs or make HTTP requests, we have to be on Clay’s “Explorer” strategy. 

This implies you have to be paying out at the minimal $349 per month and that comes with twelve,000 credits. This comes out to $.0291 per credit score/enrichment (very same point).

With OpenAI, their pricing is a bit various. They measured by tokens as opposed to credits. With Clay, each time you execute an enrichment, that is one particular credit score.

With OpenAI, it is much more of how numerous phrases you use in your prompt which equals a particular sum of tokens. 

Let’s presume our prompt is anything straightforward: “Please summarize this company’s description and summarize in 3 sentences max what they do.” – There are 14 phrases in this sentence, which in accordance to each the picture over as nicely as this GPT token calculator, it would expense us $.0018 to run this prompt each time. 

We know at a glance, this is drastically less expensive than the expense to use GPT-four with Clay as an enrichment.

To be actual, Clay is nearly 17x much more pricey than utilizing OpenAI’s API straight.

Also well worth noting, the explanation this is even in conversation correct now is since API calls, or HTTP requests on Clay are all cost-free! It does not use any credits at all. 

Now you see why it may possibly be well worth performing an HTTP request by yourself…

And I guarantee you, if you are not technical, this will be a phase-by-phase manual on how to set it all up. 

How To Discover Your Open AI API important

Initial you are going to head to OpenAI’s playground. It might inquire you to signal in. 

In the prime correct corner, you are going to see your title. Click “View API Keys”. 

For me this segment presently has a handful of various keys, but if you are starting up from scratch you are going to click “Create new secret key”, and then you are going to give it a title.

You can title it “Clay” if you’d like. And this will produce a new API for you. 

You now have an Open AI API important! Copy this &amp hold it someplace protected.

Creating Open AI API Calls on Clay

Let’s commence with a brand new table in Clay. 

Let’s use Apple, the organization, as an illustration. We want GPT4 to describe what the organization does in below three sentences utilizing an HTTP request based mostly off their LinkedIn Profile. 

Let’s get started out by cleansing up our table.

Include a “Enrich Company” for LinkedIn enrichment and your table ought to seem like this. 

Run the enrichment and you ought to now have the description that is on the Apple organization LinkedIn webpage.

Naturally this is a super extended description so we want to use AI to summarize it for us. 

Go ahead and include an enrichment and seem for “HTTP API”.

This is exactly where you are essentially going to copy and paste what I inform you to do. 

Technique: Submit


Entire body: {"model": "gpt-four", "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": .seven}

This is what it ought to seem like so far:

Now you are going to have two headers. 

Initial Header:



2nd Hedaer:

Essential: Authorization

Worth:Bearer sk- {paste your API important}

This is what it ought to seem like so far:

Now go ahead and click “Save and Run Initial ten Rows”. 

If you have accomplished it efficiently, you ought to see a 200 come up. This implies a Standing 200 that means it was ready to connect to the API. 

Now, we can go ahead and map the consequence to a new column. 

Click the cell and broaden it. Then click “Choices”. 

As soon as you broaden it, you are going to click “Message”. 

Then you are going to see the response that came back from Open AI and now you can generate a new column for the responses. 

This is what the finish consequence ought to seem like.

Clay Is Amazing

Utilizing Clay’s HTTP characteristic is super remarkable since it enables you to connect to APIs like Open AI for incredibly large expense cost savings. You never have to devote a single Clay enrichment credit score.

If you are ready to do a small bit of technical perform, it will conserve you so significantly funds and enable you to use your Clay credits for enrichments that you actually need to have like LinkedIn or obtaining e mail addresses. 

I inspire you to give this a consider and allow me know your ideas! Clay is an remarkable lead enrichment instrument. If you want to find out much more about how we use it, you could check out our full review 🙂