{"id":61,"date":"2023-01-28T05:29:38","date_gmt":"2023-01-28T05:29:38","guid":{"rendered":"https:\/\/easycodingschool.com\/?p=61"},"modified":"2023-07-29T13:18:47","modified_gmt":"2023-07-29T13:18:47","slug":"how-to-set-up-your-laravel-application-with-openai-account-using-the-api","status":"publish","type":"post","link":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/","title":{"rendered":"How to set up your Laravel application with OpenAi account using the API ?"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Today, <a href=\"https:\/\/easycodingschool.com\/blog\/what-is-chat-gpt-its-features\/\">OpenAi<\/a> is one of the most trending topics, software program improvement as an<br \/>\neffective synthetic intelligence platform that makes it smooth for builders to create AI-powered<br \/>\napplications.<\/span><\/p>\n<h2><strong>Brief Explanation of Laravel in two words?<\/strong><\/h2>\n<p><span style=\"font-weight: 400;\">Laravel is a free, open-source PHP web framework used for web utility improvement. It is<br \/>\ndesigned to make the development method greater green by offering a stylish syntax and equipment for not unusual<br \/>\nplace responsibilities which include routing, authentication, and caching. Laravel&#8217;s syntax is influenced by Ruby on<br \/>\nRails, and it makes use of an MVC (model-view-controller) architectural pattern. It additionally consists of<br \/>\nintegrated assist for database migrations, object-relational mapping (ORM), and a templating engine referred to as<br \/>\nBlade. Laravel&#8217;s recognition has grown hastily in current years and it&#8217;s now one of the most famous PHP<br \/>\nframeworks.<\/span><\/p>\n<h1>How to set up your Laravel application with an OpenAi account using the API?<\/h1>\n<p><span style=\"font-weight: 400;\">Before you start, you need to register for <\/span><a href=\"https:\/\/beta.openai.com\/account\/api-keys\"><span style=\"font-weight: 400;\">OpenAi<\/span><\/a><span style=\"font-weight: 400;\">.After registering, create a new key:<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-63 size-full\" src=\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/Api-interface.webp\" alt=\"Laravel application with an OpenAi\" width=\"760\" height=\"401\" srcset=\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/Api-interface.webp 760w, https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/Api-interface-300x158.webp 300w\" sizes=\"auto, (max-width: 760px) 100vw, 760px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-66 size-full\" src=\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/API.webp\" alt=\"Laravel application with an OpenAi\" width=\"784\" height=\"305\" srcset=\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/API.webp 784w, https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/API-300x117.webp 300w, https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/API-768x299.webp 768w\" sizes=\"auto, (max-width: 784px) 100vw, 784px\" \/><\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li>Enter your API key in your\u00a0\u201c.env\u201d\u00a0file:<br \/>\n<span style=\"text-align: center; font-size: 18px; margin: 20px;\"><code>OPENAI_API_KEY= \"your_key_openai\"<\/code><\/span><\/li>\n<li>Install\u00a0OpenAi PHP\u00a0client (allows to interact with <a href=\"https:\/\/easycodingschool.com\/blog\/what-is-chat-gpt-its-features\/\">OpenAi API<\/a>) using composer<br \/>\nwith this command:<br \/>\n<span style=\"text-align: center; font-size: 18px; margin: 20px;\"><code>composer require openai-php\/client<\/code><\/span><\/li>\n<li>Create a service that uses the OpenAi PHP library to communicate with the OpenAi<br \/>\nservice, for example:<\/p>\n<div>\n<div><code>&lt;?php<\/code><\/div>\n<div><code>namespace App\\Services;<\/code><\/div>\n<div><code>use OpenAI;<\/code><\/div>\n<div><code>class GeneratorOpenAIService<\/code><\/div>\n<div><code>{<\/code><\/div>\n<div><code>\u00a0 \u00a0 private $client;<\/code><\/div>\n<div><code>\u00a0 \u00a0 public function __construct()<\/code><\/div>\n<div><code>\u00a0 \u00a0 {<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 $this-&gt;client = OpenAI::client(env('OPENAI_API_KEY'));<\/code><\/div>\n<div><code>\u00a0 \u00a0 }<\/code><\/div>\n<div><code>\u00a0 \u00a0 public function generateResponseOpenAi(string $question): string<\/code><\/div>\n<div><code>\u00a0 \u00a0 {<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 $response = $this-&gt;client-&gt;completions()-&gt;create([<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'model' =&gt; 'text-davinci-003',<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'temperature' =&gt; 0.9,<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'top_p' =&gt; 1,<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'frequency_penalty' =&gt; 0,<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'presence_penalty' =&gt; 0,<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'prompt' =&gt; $question,<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 'max_tokens' =&gt; 4000,<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 ]);<\/code><\/div>\n<div><code>\u00a0 \u00a0 \u00a0 \u00a0 return $response['choices'][0]['text'];<\/code><\/div>\n<div><code>\u00a0 \u00a0 }<\/code><\/div>\n<div><code>}<\/code><\/div>\n<\/div>\n<div><\/div>\n<p>Before moving directly to the subsequent step, I quote some feedback approximately the frame of the \u201cCreate\u201d request.<\/p>\n<p><strong>model:<\/strong> The OpenAi API is powered through its own circle of relatives of fashions with distinct competencies and prices. For me, I\u2019m using the state-of-the-art and finest model of the GPT-3 language model. GPT-3 can do the whole lot different fashions can do, frequently with better quality, longer output, and higher coaching tracking.<\/p>\n<p><strong>temperature:<\/strong> 0,9 (for more creative applications)<br \/>\n<strong>prompt:<\/strong> the text<br \/>\n<strong>max_tokens:<\/strong> The number of tokens in your prompt plus max_tokens cannot exceed the template context length (4000 tokens).<\/li>\n<li>Inject the service into your controller where you want to use it and call the \u201cgenerateResponseOpenAi\u201d method<br \/>\n<span style=\"text-align: center; font-size: 18px; margin: 20px;\"><br \/>\n<\/span><code><span class=\"hljs-meta\">&lt;?php<\/span><\/code><br \/>\n<code><span class=\"hljs-keyword\">namespace<\/span> <span class=\"hljs-title.class\">App<\/span>\\<span class=\"hljs-title.class\">Http<\/span>\\<span class=\"hljs-title.class\">Controllers<\/span>;<\/code><br \/>\n<code><span class=\"hljs-keyword\">use<\/span> <span class=\"hljs-title\">App<\/span>\\<span class=\"hljs-title\">Services<\/span>\\<span class=\"hljs-title\">GeneratorOpenAIService<\/span>;<\/code><br \/>\n<code><span class=\"hljs-class\"><span class=\"hljs-keyword\">class<\/span> <span class=\"hljs-title\">OpenAIController<\/span> <span class=\"hljs-keyword\">extends<\/span> <span class=\"hljs-title\">Controller<\/span><br \/>\n<\/span>{<\/code><br \/>\n<code><span class=\"hljs-keyword\">private<\/span> <span class=\"hljs-variable\">$openAiService<\/span>;<\/code><br \/>\n<code><span class=\"hljs-keyword\">public<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">__construct<\/span>(<span class=\"hljs-params\">GeneratorOpenAIService <span class=\"hljs-variable\">$openaiService<\/span><\/span>)<br \/>\n<\/span>{<\/code><br \/>\n<code><span class=\"hljs-variable.language\">$this<\/span>-&gt;openAiService= <span class=\"hljs-variable\">$openaiService<\/span>;<\/code><br \/>\n<code>}<\/code><br \/>\n<code><span class=\"hljs-keyword\">public<\/span> <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">chatOpenAi<\/span>(<span class=\"hljs-params\">Request <span class=\"hljs-variable\">$request<\/span><\/span>)<br \/>\n<\/span>{<\/code><br \/>\n<code><span class=\"hljs-variable\">$question<\/span> = <span class=\"hljs-variable\">$request<\/span>-&gt;question;<\/code><br \/>\n<code><span class=\"hljs-keyword\">if<\/span> (<span class=\"hljs-variable\">$question<\/span> == <span class=\"hljs-literal\">null<\/span>) {<\/code><br \/>\n<code><span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-title.function.invoke\">back<\/span>();<\/code><br \/>\n<code>}<\/code><br \/>\n<code><span class=\"hljs-variable\">$response<\/span>= <span class=\"hljs-variable.language\">$this<\/span>-&gt;openAiService-&gt;<span class=\"hljs-title.function.invoke\">generateResponseOpenAi<\/span>(<span class=\"hljs-variable\">$question<\/span>);<\/code><br \/>\n<code><span class=\"hljs-keyword\">return<\/span> <span class=\"hljs-title.function.invoke\">response<\/span>()-&gt;<span class=\"hljs-title.function.invoke\">json<\/span>([<span class=\"hljs-string\">'response'<\/span> =&gt; <span class=\"hljs-variable\">$response<\/span>]);<\/code><br \/>\n<code>}<\/code><br \/>\n<code>}<\/code><\/li>\n<\/ol>\n<h3>Conclusion<\/h3>\n<div>\n<div>In this tutorial, we saw the steps needed to set up your <a href=\"https:\/\/easycodingschool.com\/blog\/what-is-chat-gpt-its-features\/\">OpenAi<\/a> account, use the API, and integrate it into a Laravel application.<\/div>\n<div>Hope this will allow you to use <a href=\"https:\/\/easycodingschool.com\/blog\/what-is-chat-gpt-its-features\/\">OpenAi<\/a> in your Laravel application. Feel free to ask me questions if you need more details.<\/div>\n<\/div>\n<div><\/div>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Today, OpenAi is one of the most trending topics, software program improvement as an<br \/>\neffective synthetic intelligence platform that makes it smooth for builders to create AI-powered<br \/>\napplications.<\/p>\n","protected":false},"author":1,"featured_media":1629,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[5],"tags":[19,13,18,14,15],"class_list":["post-61","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-ai","tag-api","tag-development","tag-laravel","tag-openai"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to set up your Laravel application with OpenAi account using the API ? - Easy Coding School<\/title>\n<meta name=\"description\" content=\"It is one of the most trending topics, software program improvement as an effective synthetic intelligence platform that makes it smooth for builders to create AI-powered applications.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to set up your Laravel application with OpenAi account using the API ? - Easy Coding School\" \/>\n<meta property=\"og:description\" content=\"It is one of the most trending topics, software program improvement as an effective synthetic intelligence platform that makes it smooth for builders to create AI-powered applications.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/\" \/>\n<meta property=\"og:site_name\" content=\"Easy Coding School\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-28T05:29:38+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-29T13:18:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"660\" \/>\n\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"gauravkumarjha19@gmail.com\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"gauravkumarjha19@gmail.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/\"},\"author\":{\"name\":\"gauravkumarjha19@gmail.com\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/#\/schema\/person\/9cabe8e90728da7f26676cbd1744558b\"},\"headline\":\"How to set up your Laravel application with OpenAi account using the API ?\",\"datePublished\":\"2023-01-28T05:29:38+00:00\",\"dateModified\":\"2023-07-29T13:18:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/\"},\"wordCount\":382,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg\",\"keywords\":[\"AI\",\"API\",\"Development\",\"Laravel\",\"OpenAi\"],\"articleSection\":[\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/\",\"url\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/\",\"name\":\"How to set up your Laravel application with OpenAi account using the API ? - Easy Coding School\",\"isPartOf\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg\",\"datePublished\":\"2023-01-28T05:29:38+00:00\",\"dateModified\":\"2023-07-29T13:18:47+00:00\",\"description\":\"It is one of the most trending topics, software program improvement as an effective synthetic intelligence platform that makes it smooth for builders to create AI-powered applications.\",\"breadcrumb\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#primaryimage\",\"url\":\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg\",\"contentUrl\":\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg\",\"width\":660,\"height\":350,\"caption\":\"How to set up your Laravel application with OpenAi account using the API\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/easycodingschool.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to set up your Laravel application with OpenAi account using the API ?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/#website\",\"url\":\"https:\/\/easycodingschool.com\/blog\/\",\"name\":\"Easy Coding School\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/easycodingschool.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/#organization\",\"name\":\"Easy Coding School\",\"url\":\"https:\/\/easycodingschool.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/07\/New-Project-10.png\",\"contentUrl\":\"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/07\/New-Project-10.png\",\"width\":310,\"height\":114,\"caption\":\"Easy Coding School \"},\"image\":{\"@id\":\"https:\/\/easycodingschool.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/#\/schema\/person\/9cabe8e90728da7f26676cbd1744558b\",\"name\":\"gauravkumarjha19@gmail.com\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/easycodingschool.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6846a3cc9bd6cb5b779aef260fe379c4b93fa20e1a4c753eb023ff7c08d7c668?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6846a3cc9bd6cb5b779aef260fe379c4b93fa20e1a4c753eb023ff7c08d7c668?s=96&d=mm&r=g\",\"caption\":\"gauravkumarjha19@gmail.com\"},\"sameAs\":[\"https:\/\/easycodingschool.com\/blog\"],\"url\":\"https:\/\/easycodingschool.com\/blog\/author\/gauravkumarjha19gmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to set up your Laravel application with OpenAi account using the API ? - Easy Coding School","description":"It is one of the most trending topics, software program improvement as an effective synthetic intelligence platform that makes it smooth for builders to create AI-powered applications.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/","og_locale":"en_US","og_type":"article","og_title":"How to set up your Laravel application with OpenAi account using the API ? - Easy Coding School","og_description":"It is one of the most trending topics, software program improvement as an effective synthetic intelligence platform that makes it smooth for builders to create AI-powered applications.","og_url":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/","og_site_name":"Easy Coding School","article_published_time":"2023-01-28T05:29:38+00:00","article_modified_time":"2023-07-29T13:18:47+00:00","og_image":[{"width":660,"height":350,"url":"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg","type":"image\/jpeg"}],"author":"gauravkumarjha19@gmail.com","twitter_card":"summary_large_image","twitter_misc":{"Written by":"gauravkumarjha19@gmail.com","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#article","isPartOf":{"@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/"},"author":{"name":"gauravkumarjha19@gmail.com","@id":"https:\/\/easycodingschool.com\/blog\/#\/schema\/person\/9cabe8e90728da7f26676cbd1744558b"},"headline":"How to set up your Laravel application with OpenAi account using the API ?","datePublished":"2023-01-28T05:29:38+00:00","dateModified":"2023-07-29T13:18:47+00:00","mainEntityOfPage":{"@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/"},"wordCount":382,"commentCount":0,"publisher":{"@id":"https:\/\/easycodingschool.com\/blog\/#organization"},"image":{"@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#primaryimage"},"thumbnailUrl":"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg","keywords":["AI","API","Development","Laravel","OpenAi"],"articleSection":["Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/","url":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/","name":"How to set up your Laravel application with OpenAi account using the API ? - Easy Coding School","isPartOf":{"@id":"https:\/\/easycodingschool.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#primaryimage"},"image":{"@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#primaryimage"},"thumbnailUrl":"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg","datePublished":"2023-01-28T05:29:38+00:00","dateModified":"2023-07-29T13:18:47+00:00","description":"It is one of the most trending topics, software program improvement as an effective synthetic intelligence platform that makes it smooth for builders to create AI-powered applications.","breadcrumb":{"@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#primaryimage","url":"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg","contentUrl":"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/01\/How-to-set-up-your-Laravel-application-with-OpenAi-account-using-the-API-.jpg","width":660,"height":350,"caption":"How to set up your Laravel application with OpenAi account using the API"},{"@type":"BreadcrumbList","@id":"https:\/\/easycodingschool.com\/blog\/how-to-set-up-your-laravel-application-with-openai-account-using-the-api\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/easycodingschool.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to set up your Laravel application with OpenAi account using the API ?"}]},{"@type":"WebSite","@id":"https:\/\/easycodingschool.com\/blog\/#website","url":"https:\/\/easycodingschool.com\/blog\/","name":"Easy Coding School","description":"","publisher":{"@id":"https:\/\/easycodingschool.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/easycodingschool.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/easycodingschool.com\/blog\/#organization","name":"Easy Coding School","url":"https:\/\/easycodingschool.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/easycodingschool.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/07\/New-Project-10.png","contentUrl":"https:\/\/easycodingschool.com\/blog\/wp-content\/uploads\/2023\/07\/New-Project-10.png","width":310,"height":114,"caption":"Easy Coding School "},"image":{"@id":"https:\/\/easycodingschool.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/easycodingschool.com\/blog\/#\/schema\/person\/9cabe8e90728da7f26676cbd1744558b","name":"gauravkumarjha19@gmail.com","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/easycodingschool.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6846a3cc9bd6cb5b779aef260fe379c4b93fa20e1a4c753eb023ff7c08d7c668?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6846a3cc9bd6cb5b779aef260fe379c4b93fa20e1a4c753eb023ff7c08d7c668?s=96&d=mm&r=g","caption":"gauravkumarjha19@gmail.com"},"sameAs":["https:\/\/easycodingschool.com\/blog"],"url":"https:\/\/easycodingschool.com\/blog\/author\/gauravkumarjha19gmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/comments?post=61"}],"version-history":[{"count":25,"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":1641,"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/posts\/61\/revisions\/1641"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/media\/1629"}],"wp:attachment":[{"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/media?parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/categories?post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/easycodingschool.com\/blog\/wp-json\/wp\/v2\/tags?post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}