{"id":570028,"date":"2023-04-13T00:37:36","date_gmt":"2023-04-12T21:37:36","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-get-an-openai-api-key\/"},"modified":"2023-04-13T00:37:36","modified_gmt":"2023-04-12T21:37:36","slug":"how-to-get-an-openai-api-key","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-get-an-openai-api-key\/","title":{"rendered":"#How to Get an OpenAI API Key"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a26bbe36806a\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a26bbe36806a\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-get-an-openai-api-key\/#How_to_Get_an_OpenAI_API_Key\" >How to Get an OpenAI API Key<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-get-an-openai-api-key\/#Is_an_OpenAI_API_Key_Free\" >Is an OpenAI API Key Free?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-get-an-openai-api-key\/#How_to_Fix_%E2%80%9CIncorrect_API_Key_Provided%E2%80%9D_for_OpenAI\" >How to Fix \u201cIncorrect API Key Provided\u201d for OpenAI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-get-an-openai-api-key\/#What_to_Do_If_an_OpenAI_API_Key_Isnt_Working\" >What to Do If an OpenAI API Key Isn\u2019t Working<\/a><\/li><\/ul><\/nav><\/div>\n<div>\n<figure style=\"width: 1920px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage size-medium wp-image-885986\" data-pagespeed-no-defer=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/04\/52753098091_b8ae3de061_o.jpg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"ChatGPT Plus RG\" width=\"1920\" height=\"1080\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\">Hannah Stryker \/ How-To Geek<\/span><\/figcaption><\/figure>\n<div class=\"keytakeaways\">\n<ol>\n<li>Go to OpenAI&#8217;s Platform website at platform.openai.com and sign in with an OpenAI account.<\/li>\n<li>Click your profile icon at the top-right corner of the page and select &#8220;View API Keys.&#8221;<\/li>\n<li>Click &#8220;Create New Secret Key&#8221; to generate a new API key.<\/li>\n<\/ol>\n<\/div>\n<p>Lots of <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>lications and AI tools now require you bring your own OpenAI API key. You can generate one on OpenAI\u2019s website, and it comes with $5 of free credit. Here\u2019s how to get started with OpenAI\u2019s API to get ChatGPT-style AI features outside of the standard ChatGPT interface.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"How_to_Get_an_OpenAI_API_Key\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_0\">How to Get an OpenAI API Key<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To begin, head to <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/platform.openai.com\/\">OpenAI\u2019s official platform website<\/a>. If you haven\u2019t already, create an account following the simple steps on the website. After that, you can enter the email address and password linked to your OpenAI account to sign in or log in with an existing Google or Microsoft account.<\/p>\n<p>Once you\u2019ve created an account or have logged into an existing account, you\u2019ll see your name and your profile icon at the top-right corner of OpenAI\u2019s platform homepage.<\/p>\n<p>To get an API Key, click on your name in the top-right corner to bring up a dropdown menu. Then, click the \u201c<a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/platform.openai.com\/account\/api-keys\">View API keys<\/a>\u201d option.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-885939\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/04\/red-arrows-showing-how-to-get-to-the-generate-api-key-page-on-openais-website.jpg?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Numbered red arrows showing how to get to the page on OpenAI's website where you can generate an API Key.\" width=\"1880\" height=\"836\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>At this point, you\u2019ll be on a page that has an option to \u201cCreate new secret key\u201d near the center. If you do not have an API key, click this button to get one. Make sure to save the API key as soon as possible. Once the window showing it closes, you won\u2019t be able to reopen it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-885940\" data-pagespeed-lazy-src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/04\/red-arrow-pointing-to-the-button-that-generates-a-new-API-key.jpg?trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"A red arrow pointing to a button that says &quot;Create new secret key&quot;.\" width=\"977\" height=\"652\" src=\"\/pagespeed_static\/1.JiBnMqyl6S.gif\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Is_an_OpenAI_API_Key_Free\"><\/span>Is an OpenAI API Key Free?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can create an OpenAI API key for free. New free trial users receive $5 (USD) worth of credit. However, this expires after three months. Once your credit has been used up or expires, you can enter billing information to continue using the API of your choice. Keep in mind that if you don\u2019t enter any billing information, you will still have login access but won\u2019t be able to make further API requests.<\/p>\n<p>OpenAI enforces rate limits at the organization level; if you\u2019re using their tools for business, you\u2019ll have to pay depending on a few factors. Rate limits are measured in two ways: RPM (requests per minute) and TPM (tokens per minute).<\/p>\n<p>If you\u2019re looking for specific costs based on the AI model you want to use (for example, <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.howtogeek.com\/882274\/gpt-3-5-vs-gpt-4\/\">GPT-4 or gpt-3.5-turbo, as used in ChatGPT), check out <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/openai.com\/pricing\">OpenAI\u2019s AI model pricing page<\/a>. In many cases, the API could be much cheaper than a <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.reviewgeek.com\/147498\/is-chatgpt-plus-worth-the-money\/\">paid ChatGPT Plus subscription<\/a>\u2014though it depends how much you use it. For a complete overview of exact rate limits, examples, and other helpful information, visit <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/platform.openai.com\/docs\/guides\/rate-limits\/overview\">OpenAI\u2019s Rate Limits page<\/a>.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>GPT 3.5 vs. GPT 4: What&#8217;s the Difference?<\/em><\/strong><\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"How_to_Fix_%E2%80%9CIncorrect_API_Key_Provided%E2%80%9D_for_OpenAI\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_2\">How to Fix \u201cIncorrect API Key Provided\u201d for OpenAI<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before you send email complaints to OpenAI, you should check the following:<\/p>\n<ul>\n<li>Scan for typos and extra spaces in your API Key<\/li>\n<li>Make sure you\u2019re not using the API Key for a different organization or AI project<\/li>\n<li>Verify if your API Key has been deleted, deactivated, or cached<\/li>\n<\/ul>\n<p>Avoiding the above-mentioned errors can quickly and easily solve your problem and let you get back to work as soon as possible.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"What_to_Do_If_an_OpenAI_API_Key_Isnt_Working\"><\/span><a rel=\"nofollow noopener\" target=\"_blank\" name=\"autotoc_anchor_3\">What to Do If an OpenAI API Key Isn\u2019t Working<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>If you\u2019re still having issues despite not having any of the errors we listed above, try\u00a0clearing your browser\u2019s cache and cookies before trying again.<\/p>\n<p>To make sure your API key is formatted correctly, you can consult <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/platform.openai.com\/docs\/api-reference\/authentication\">the authentication page on OpenAI\u2019s platform website<\/a>. This page goes into detail about how to verify if your API is working through how requests are made and also lists some helpful examples. If all else fails, you can potentially generate a new API Key (follow the steps at the top of this article).<\/p>\n<p>Additionally, we recommend taking a look at <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/help.openai.com\/en\/articles\/5112595-best-practices-for-api-key-safety\">OpenAI\u2019s article about best practices for API Key safety<\/a>. It can help you steer clear of common problems and it also breaks down how the API Key process works.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>What is an &#8220;API&#8221;, and How Do You Use One?<\/em><\/strong><\/p>\n<\/div>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/885918\/how-to-get-an-openai-api-key\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hannah Stryker \/ How-To Geek Go to OpenAI&#8217;s Platform website at platform.openai.com and sign in with an OpenAI account. Click your profile icon at the top-right corner of the page and select &#8220;View API Keys.&#8221; Click &#8220;Create New Secret Key&#8221; to generate a new API key. Lots of applications and AI tools now require you&#8230;<\/p>\n","protected":false},"author":1,"featured_media":570029,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2023\/04\/52753098091_b8ae3de061_o.jpg?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-570028","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/570028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=570028"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/570028\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/570029"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=570028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=570028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=570028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}