# AI for Web Devs: Your First API Request to OpenAI

DevFeed: [AI for Web Devs: Your First API Request to OpenAI](<https://devfeed.tech/articles/ai-for-web-devs-your-first-api-request-to-openai-17706.md>)

Original publisher: [Read original article](<https://austingil.com/ai-for-web-devs-first-http-request/>)

Author: Austin

Published: 2023-09-19T11:53:28Z

Content type: tutorial

Language: en

Sources: [Back End - Austin Gil](<https://devfeed.tech/sources/back-end-austin-gil.md>)

Topics: [OpenAI](<https://devfeed.tech/topics/openai.md>), [Qwik](<https://devfeed.tech/topics/qwik.md>), [API](<https://devfeed.tech/topics/api.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [API keys](<https://devfeed.tech/topics/api-keys.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [api](<https://devfeed.tech/tags/api.md>), [api-keys](<https://devfeed.tech/tags/api-keys.md>), [artificial-intelligence](<https://devfeed.tech/tags/artificial-intelligence.md>), [back-end](<https://devfeed.tech/tags/back-end.md>), [coding](<https://devfeed.tech/tags/coding.md>), [development](<https://devfeed.tech/tags/development.md>), [front-end](<https://devfeed.tech/tags/front-end.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [html](<https://devfeed.tech/tags/html.md>), [http](<https://devfeed.tech/tags/http.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [js](<https://devfeed.tech/tags/js.md>), [json](<https://devfeed.tech/tags/json.md>), [openai](<https://devfeed.tech/tags/openai.md>), [programming](<https://devfeed.tech/tags/programming.md>), [qwik](<https://devfeed.tech/tags/qwik.md>), [software](<https://devfeed.tech/tags/software.md>), [web-development](<https://devfeed.tech/tags/web-development.md>)

## AI overview

A tutorial on integrating OpenAI API responses into a Qwik web application. It covers generating and protecting API keys, making a chat endpoint request with fetch, handling the JSON response, and beginning an interactive form.

## Source excerpt

Make API request to OpenAI with fetch and Qwik forms, protect API keys with Qwik actions, and hide secrets with environment variables.