PageSourceSearch

https://botpenguin.com/chunk-O52JDKIN.js

js botpenguin.com collected 2026-09-24 08:36:11 UTC 16,182 bytes, 1 lines download raw bytes

1import{a as te}from"./chunk-RHN4V45Z.js";import{a as Z}from"./chunk-DA2YGYXC.js";import{a as ee}from"./chunk-ZR52WMKD.js";import{a as Y}from"./chunk-OJDZTBKQ.js";import{a as X}from"./chunk-FQAI4S2M.js";import{b as J}from"./chunk-Z2PPEATV.js";import"./chunk-GD33BW3Q.js";import"./chunk-NPIPIS4B.js";import"./chunk-MZGECHFR.js";import"./chunk-EBC3PPIO.js";import"./chunk-LVTYLXHZ.js";import"./chunk-7S3CIM4V.js";import"./chunk-YSNDWIPU.js";import"./chunk-PTPQN65W.js";import{b as z,d as L,i as N,k as R,s as j,v as Q}from"./chunk-VPF5OBG3.js";import{a as q}from"./chunk-VNPHFHRG.js";import"./chunk-Z4GQ32XP.js";import"./chunk-SCLARTOV.js";import"./chunk-V56F7ELI.js";import"./chunk-IULQ7RNZ.js";import{b as K}from"./chunk-UVMHBKUD.js";import"./chunk-SMFHKXEJ.js";import{b as $}from"./chunk-FSEKFQRQ.js";import"./chunk-GEBBUZNX.js";import"./chunk-ASY7WUR6.js";import"./chunk-SLWX2EBF.js";import"./chunk-CTER4CBY.js";import"./chunk-E66SQ4EU.js";import"./chunk-LZ6CO2NU.js";import{a as U}from"./chunk-LFWUBR3N.js";import{a as F}from"./chunk-SLPRUBRN.js";import{u as W}from"./chunk-DREDQAPP.js";import"./chunk-ZCJJXQTB.js";import{Ab as y,Bb as k,Db as I,Eb as P,Fb as e,Gb as t,Hb as d,Lb as C,Oa as f,Ob as x,Pb as m,Ta as E,Ub as G,Va as a,Vb as M,Wa as S,Wb as D,Yb as r,Zb as v,_b as b,bc as H,ca as T,cc as O,dc as B,fc as V,kb as w,la as g,ma as h,tb as p}from"./chunk-AV53HBUR.js";import{g as A}from"./chunk-DM275RSA.js";var ie={openAiApiPricingSeo:{title:"OpenAI ChatGPT API Pricing Calculator | BotPenguin",description:"Use OpenAI ChatGPT API Pricing Calculator to easily estimate the cost for your ChatGPT projects. Get a clear understanding of pricing based on your API usage.",keyword:"openai chatgpt api pricing calculator",type:"website",image:"https://cdn.botpenguin.com/assets/website/images/open-ai-api-pricing-calc.webp"}};var oe=["resultBox"];function ae(s,c){if(s&1){let i=C();e(0,"li",40)(1,"div",41),x("click",function(){let n=g(i),o=n.$implicit,u=n.$index,_=m(3);return h(_.setModelForPricing(o,u,"model"))}),e(2,"div",42),d(3,"img",43),t(),e(4,"div",44),r(5),t()()()}if(s&2){let i=c.$implicit,l=m(3);a(3),p("src",l.assetUrl+"/assets/website/icons/"+i.img+".svg",f),a(2),v(i.name)}}function re(s,c){if(s&1&&(e(0,"div",31)(1,"ul",39),I(2,ae,6,2,"li",40,k),t()()),s&2){let i=m(2);a(2),P(i.apiModelsButtons)}}function le(s,c){if(s&1){let i=C();e(0,"li",40)(1,"div",41),x("click",function(){let n=g(i),o=n.$implicit,u=n.$index,_=m(3);return h(_.setModelForPricing(o,u,"words"))}),e(2,"div",44),r(3),t()()()}if(s&2){let i=c.$implicit;a(3),v(i)}}function se(s,c){if(s&1&&(e(0,"div",34)(1,"ul",39),I(2,le,4,1,"li",40,k),t()()),s&2){let i=m(2);a(2),P(i.words)}}function ce(s,c){if(s&1){let i=C();e(0,"div",9)(1,"div",24)(2,"label",25),r(3,"Select the OpenAI language model:"),t(),e(4,"div",26),x("click",function(n){g(i);let o=m();return h(o.openModel("model",n))}),e(5,"div",27),d(6,"img",28),e(7,"p",29),r(8),t()(),d(9,"img",30),t(),w(10,re,4,0,"div",31),t(),e(11,"div",32)(12,"label",25),r(13,"Words per execution:"),t(),e(14,"div",26),x("click",function(n){g(i);let o=m();return h(o.openModel("words",n))}),e(15,"div",33)(16,"p",29),r(17),t()(),d(18,"img",30),t(),w(19,se,4,0,"div",34),t(),e(20,"div",32)(21,"label",25),r(22,"Number of executions:"),t(),e(23,"input",35),B("ngModelChange",function(n){g(i);let o=m();return O(o.wordsSelected,n)||(o.wordsSelected=n),h(n)}),t()(),e(24,"div",36)(25,"button",37),x("click",function(){g(i);let n=m();return h(n.calculatePrice())}),r(26," Calculate Price "),t(),e(27,"button",38),r(28," How it Works "),t()()()}if(s&2){let i=m();a(6),p("src",i.assetUrl+"/assets/website/icons/chatgpt.svg",f),a(2),b(" ",i.activeModel.name," "),a(),p("src",i.assetUrl+"/assets/website/icons/countery-dropdown.svg",f),a(),y(10,i.selectChatgptModel?10:-1),a(7),b(" ",i.activeWords," "),a(),p("src",i.assetUrl+"/assets/website/icons/countery-dropdown.svg",f),a(),y(19,i.selectWordsModel?19:-1),a(4),H("ngModel",i.wordsSelected)}}function de(s,c){if(s&1){let i=C();e(0,"div",45,0)(2,"h3",46),r(3,"Pricing Details"),t(),e(4,"div",47)(5,"h4",48),r(6),t(),e(7,"p",49),r(8,"Total Cost"),t()(),e(9,"div",50)(10,"h4",48),r(11),t(),e(12,"p",49),r(13,"Tokens Used"),t()(),e(14,"div",51)(15,"button",52)(16,"a",53),x("click",function(){g(i);let n=m();return h(n.downloadResult())}),r(17,"Download Results "),e(18,"span"),d(19,"img",54),t()()(),e(20,"button",55),x("click",function(){g(i);let n=m();return h(n.regenerateLink())}),r(21,"Regenerate Link "),e(22,"span"),d(23,"img",54),t()()()()}if(s&2){let i=m();a(6),b("$",i.calculatedPrice,""),a(5),v(i.activeToken),a(8),p("src",i.assetUrl+"/assets/website/icons/download.svg",f),a(4),p("src",i.assetUrl+"/assets/website/icons/regenerate-icon.svg",f)}}
1function pe(s,c){if(s&1&&(e(0,"tr")(1,"td",56),r(2),t(),e(3,"td",57),r(4),t(),e(5,"td",57),r(6),t(),e(7,"td",57),r(8),t(),e(9,"td",57),r(10),t()()),s&2){let i=c.$implicit;a(2),v(i.tokens),a(2),b("$",i.Gpt4_8k,""),a(2),b("$",i.Gpt4_32k,""),a(2),b("$",i.Gpt35,""),a(2),b("$",i.Gpt4o,"")}}var Te=(()=>{let c=class c{onDocumentClick(l){this.selectChatgptModel=!1,this.selectWordsModel=!1}constructor(l,n){this.seoService=l,this.mixpanel=n,this.seos=ie,this.assetUrl=U.ASSET_URL,this.priceCalculated=!1,this.selectChatgptModel=!1,this.accordionData=[],this.activeImage="",this.activeAccordionIndex=0,this.selectWordsModel=!1,this.activeWords=75,this.activeToken=100,this.activeTokenIndex=0,this.calculatedPrice=6.3,this.wordsSelected=1e3,this.activeModel={img:"chatgpt",name:"OpenAI gpt-4o",pricefor1000:75e-5},this.tokens=[100,1e3,1e4,1e5,1e6],this.words=[75,750,7500,75e3,75e4],this.apiModelsButtons=[{img:"chatgpt",name:"OpenAI gpt-4o",pricefor1000:75e-5},{img:"chatgpt",name:"OpenAI gpt-3.5-turbo",pricefor1000:75e-6},{img:"chatgpt",name:"OpenAI gpt-4-turbo",pricefor1000:.00375},{img:"chatgpt",name:"OpenAI gpt-4",pricefor1000:.0015}],this.bannerContent={heading:{headingOne:"OpenAI ChatGPT API Pricing Calculator"},subHeading:{subHeadingOne:"Get a clear understanding of the pricing structure ",subHeadingTwo:"and cost of using OpenAI\u2019s API."},bannerAttributes:{headingWidth:"inline 2xl:block",subHeadingWidth:"inline xl:block",headingTextColor:"text-grey-333",subHeadingTextColor:"text-grey-666",planDescColor:"text-color-999"},planDesc:null,buttonData:{label:"Let\u2019s Calculate! ",labelTwo:"",link:""}},this.pricingGenerate={heading:{headingOne:"OpenAI API Pricing Calculator"},subHeading:{subHeadingOne:"Easily estimate the costs of using OpenAI\u2019s APIs with our Pricing Calculator. Get a clear ",subHeadingTwo:"understanding of the pricing structure and plan your budget effectively."}},this.tableHeadings={heading:{headingOne:"OpenAI Pricing Estimates"},subHeading:{subHeadingOne:"Pricing Estimates for GPT-4o, GPT-3.5 turbo, GPT-4 turbo and GPT-4 Models"}},this.tableData=[{tokens:1e3,Gpt4_8k:.0075,Gpt4_32k:75e-5,Gpt35:.0375,Gpt4o:.015},{tokens:2e3,Gpt4_8k:.015,Gpt4_32k:.0015,Gpt35:.075,Gpt4o:.03},{tokens:5e3,Gpt4_8k:.0375,Gpt4_32k:.00375,Gpt35:.1875,Gpt4o:.075},{tokens:1e4,Gpt4_8k:.075,Gpt4_32k:.0075,Gpt35:.375,Gpt4o:.15},{tokens:2e4,Gpt4_8k:.15,Gpt4_32k:.015,Gpt35:.75,Gpt4o:.3},{tokens:3e4,Gpt4_8k:.225,Gpt4_32k:.0225,Gpt35:1.125,Gpt4o:.45},{tokens:4e4,Gpt4_8k:.3,Gpt4_32k:.03,Gpt35:1.5,Gpt4o:.6},{tokens:5e4,Gpt4_8k:.375,Gpt4_32k:.0375,Gpt35:1.875,Gpt4o:.75}],this.faqData=[{title:"How does the OpenAI ChatGPT API pricing calculator estimate the cost?",description:"It is based on the total tokens processed, counting both inputs and outputs from the API. Each token processed contributes to your total bill."},{title:"Can I get OpenAI API for free?",description:"While OpenAI provides a playground for experimentation, in-depth utilization of its API comes with a cost and is not available for free."},{title:"How many words are 1K tokens?",description:"The conversion of tokens to words varies due to token length diversity. On an average, 1000 tokens are used for 750 English words."},{title:"How much does OpenAI cost per day?",description:"Daily OpenAI cost is dependent on usage. It's calculated based on the total tokens processed via the API within that day."},{title:"How do I request an OpenAI API?",description:"To request OpenAI API, visit the OpenAI website. Navigate to the API section and follow the outlined signup process and instructions."}],this.bar={bgImageUrl:"openapi2.webp",heading:{headingOne:"Put your marketing to Autopilot with BotPenguin\u2019s ",headingTwo:"Marketing Automation."},primaryButtonData:{label:"Get started for FREE! ",labelTwo:"",link:""},secondaryButtonData:{label:"Know more ",labelTwo:"",link:""}},this.mixpanel.getPageTitle()}ngOnInit(){this.seoService.setMetaTags(this.seos.openAiApiPricingSeo)}openModel(l,n){switch(l){case"model":this.selectChatgptModel=!this.selectChatgptModel;break;case"words":this.selectWordsModel=!this.selectWordsModel;break;default:break}n.stopPropagation()}setModelForPricing(l,n,o){o==="model"?(this.activeModel=l,this.selectChatgptModel=!this.selectChatgptModel):(this.activeWords=l,this.activeTokenIndex=n,this.selectChatgptModel=!this.selectChatgptModel)}calculatePrice(){this.wordsSelected<0&&(this.wordsSelected=0);let l=this.activeModel.pricefor1000/100*this.tokens[this.activeTokenIndex],n=parseFloat(l.toFixed(5));this.calculatedPrice=n*this.wordsSelected,this.activeToken=this.tokens[this.activeTokenIndex],this.priceCalculated=!this.priceCalculated}regenerateLink(){this.priceCalculated=!1}downloadResult(){return A(this,null,function*(){let l=this.resultBox.nativeElement,{default:n}=yield import("./chunk-YP7YABKE.js"),o=yield n(l),u=document.createElement("a");u.href=o.toDataURL("image/png"),u.download="api-pricing.png",u.click()})}};c.\u0275fac=function(n){return new(n||c)(S(X),S(K))},c.\u0275cmp=T({type:c,selectors:[["app-api-pricing-calculator"]],viewQuery:function(n,o){if(n&1&&G(oe,5),n&2){let u;M(u=D())&&(o.resultBox=u.first)}},hostBindings:function(n,o){n&1&&x("click",function(_){return o.onDocumentClick(_)},!1,E)},inputs:{accordionData:"accordionData"},standalone:!0,features:[V],decls:47,vars:25,consts:[["resultBox",""],[3,"formVersion"],[1,"container","mx-auto","py-16","sm:py-24"],["heroIcon","/assets/website/icons/tools-chatgpt-icon.svg"],["url","#calculate","link","id",3,"bannerHeading","bannerSubHeading","planDesc","bannerAttributes","buttonData"],["bgImage","openapi1.png","contentImage","open-ai-api-pricing-calc.webp","contentImageAlt","OpenAI API pricing calculator illustration",3,"view"],[1,"mt-16","sm:mt-28"],[3,"heading","subHeading","headingWidth","subHeadingWidth"],["id","calculate",1,"container","bg-white","rounded-xl","!px-8"],[1,"flex","flex-col","items-center","mx-auto","py-16","w-full","md:w-2/4","lg:w-2/5","sm:py-24"],[1,"container","mx-auto","my-12","md:my-32"],[1,"my-12"],[1,"relative","overflow-x-auto","rounded-xl"],[1,"w-full","text-md","text-left","rtl:text-right","text-white"],[1,"text-md","uppercase","bg-color-e7e7","text-grey-333"],[1,"border-b","bg-black","text-white","border-white-fff-85","px-4","py-2"],[1,"px-4","py-2"],[1,"bg-white"],[1,"text-grey-666","text-xs","mt-1","ml-2"],[1,"text-black","heading-three","font-inter-regular","text-lg","mt-9"],[1,"my-12","md:my-20"],[3,"faqsData","isMoreFaqs"],[1,"my-12","lg:my-20"],[3,"bgImageUrl","heading","primaryButtonData","
1secondaryButtonData","headingColor","headingWidth","type"],[1,"w-full","relative"],["for","url",1,"font-inter-light","text-grey-666"],[1,"py-3","pl-4","pr-3","flex","items-center","self-start","cursor-pointer","justify-between","border","w-full","mt-3","mb-1","rounded-xl","bg-white","p-4","border-color-e5e5","focus:border","focus:border-grey-333",3,"click"],[1,"flex","gap-x-2"],["alt","","aria-hidden","true","width","18p","height","18","decoding","async",3,"src"],[1,"font-inter-regular"],["width","24","height","24","alt","","aria-hidden","true","decoding","async",1,"w-5",3,"src"],["data-lenis-prevent","",1,"country-dropdown","absolute","bg-white","p-4","w-full","border","max-h-52","z-10","rounded-md"],[1,"w-full","relative","mt-9"],[1,"flex"],["data-lenis-prevent","",1,"country-dropdown","absolute","bg-white","p-4","w-full","border","max-h-52","overflow-auto","z-10","rounded-md"],["type","number","step","100","min","0",1,"border-color-e5e5","focus:border","focus:border-grey-333","mt-3","mb-1","border","h-12","w-full","rounded-xl","p-4",3,"ngModelChange","ngModel"],[1,"w-fit","mx-auto","mt-12","sm:mt-16"],["type","submit",1,"font-inter-regular","rounded-3xl","border-0","bg-black-111827","text-white","opacity-100","cursor-pointer","py-1.5","px-3.5","sm:text-lg","sm:py-2","sm:px-5",3,"click"],["type","submit",1,"font-inter-regular","rounded-3xl","border-0","text-black-111827","opacity-100","cursor-pointer","py-1.5","px-3.5","sm:text-lg","sm:py-2","sm:px-5"],[1,"pt-0"],[1,"p-2","rounded-lg","cursor-pointer","hover:bg-[#6b6b6b19]"],[1,"flex","items-center","cursor-pointer",3,"click"],[1,"mr-3","cursor-pointer"],["width","20","height","None","alt","","aria-hidden","true","loading","lazy","decoding","async",1,"object-contain",3,"src"],[1,"cursor-pointer"],[1,"px-96","py-28","flex","flex-col","items-center"],[1,"font-inter-light","text-2xl","text-grey-333","text-center"],[1,"mt-16","text-center"],[1,"heading-four","font-inter-semibold","text-grey-333"],[1,"text-color-999","font-inter-regular","text-lg","mt-9"],[1,"mt-8","text-center"],[1,"flex","items-center","justify-center","gap-x-3","w-fit","mt-16","mx-auto"],[1,"font-inter-regular","text-sm","rounded-3xl","border-0","bg-black-111827","text-white","py-2","px-5"],[1,"flex","items-center","gap-x-2",3,"click"],["width","16","height","16","alt","","aria-hidden","true","decoding","async",3,"src"],[1,"font-inter-regular","text-grey-333","bg-white","text-sm","rounded-3xl","border","border-color-e5e5","flex","items-center","gap-x-2","py-2","px-5",3,"click"],[1,"border-b","bg-color-f0f0","px-4","py-2","text-grey-333"],[1,"border-b","px-4","py-2","text-grey-333"]],template:function(n,o){n&1&&(d(0,"app-contactdialog",1),e(1,"section")(2,"div")(3,"div",2),d(4,"app-hero-icon",3)(5,"app-bp-banner-template",4),t()(),d(6,"app-second-banner-template",5),t(),e(7,"section",6),d(8,"app-heading-template-one",7),e(9,"div",8),w(10,ce,29,8,"div",9)(11,de,24,4),t()(),e(12,"section",10)(13,"div",11),d(14,"app-heading-template-one",7),t(),e(15,"div",12)(16,"table",13)(17,"thead",14)(18,"tr")(19,"th",15),r(20,"Number of Tokens"),t(),e(21,"th",16),r(22,"gpt-4o"),t(),e(23,"th",16),r(24,"gpt-3.5-turbo"),t(),e(25,"th",16),r(26,"gpt-4-turbo"),t(),e(27,"th",16),r(28,"gpt-4"),t()()(),e(29,"tbody",17),I(30,pe,11,5,"tr",null,k),t()()(),e(32,"div",18)(33,"h3",19),r(34,"In this table:"),t(),e(35,"P"),r(36,'"Number of Tokens" represents the total tokens used for an execution.'),t(),e(37,"P"),r(38,'An "Execution" includes both the prompt sent and the response.'),t(),e(39,"P"),r(40,"On an average, 1000 tokens are used for 750 words."),t()()(),e(41,"div",20),d(42,"app-faqs",21),t(),e(43,"div",22),d(44,"app-customer-testimonials"),t(),e(45,"section"),d(46,"app-cta-bar",23),t()),n&2&&(p("formVersion","v1"),a(5),p("bannerHeading",o.bannerContent.heading)("bannerSubHeading",o.bannerContent.subHeading)("planDesc",o.bannerContent.planDesc)("bannerAttributes",o.bannerContent.bannerAttributes)("buttonData",o.bannerContent.buttonData),a(),p("view","two"),a(2),p("heading",o.pricingGenerate.heading)("subHeading",o.pricingGenerate.subHeading)("headingWidth","inline xl:block")("subHeadingWidth","inline xl:block"),a(2),y(10,o.priceCalculated?11:10),a(4),p("heading",o.tableHeadings.heading)("subHeading",o.tableHeadings.subHeading)("headingWidth","inline xl:block")("subHeadingWidth","inline xl:block"),a(16),P(o.tableData),a(12),p("faqsData",o.faqData)("isMoreFaqs",!1),a(4),p("bgImageUrl",o.bar.bgImageUrl)("heading",o.bar.heading)("primaryButtonData",o.bar.primaryButtonData)("secondaryButtonData",o.bar.secondaryButtonData)("headingColor","text-white")("headingWidth","inline sm:block md:inline lg:block")("type","partner"))},dependencies:[Y,F,Q,z,R,L,j,N,q,W,$,Z,te,J,ee],styles:["input[_ngcontent-%COMP%]::-webkit-inner-spin-button{opacity:1}"],changeDetection:0});let s=c;return s})();export{Te as ApiPricingCalculatorComponent};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.