Edit

Share via


Develop AI apps with JavaScript

This article contains an organized list of the best learning resources for JavaScript developers who are getting started building AI apps. Resources include popular quickstart articles, reference samples, documentation, training courses, and so on.

Resources for Azure OpenAI Service

Azure OpenAI Service provides REST API access to OpenAI's powerful language models. These models can be easily adapted to your specific task including but not limited to content generation, summarization, image understanding, semantic search, and natural language to code translation. Users can access the service through REST APIs, the OpenAI Node API Library, or via the Azure AI Foundry portal.

Libraries

PackageSource codenpm
OpenAI Node API LibrarySource codePackage
Azure OpenAI library for TypeScriptSource codePackage

Samples

LinkDescription
DeepSeek on AzureDemonstrates how to use DeepSeek with JavaScript/TypeScript via the OpenAI Node.js client library or LangChain.js. DeepSeek excels at tasks requiring deep context understanding and complex reasoning. You may experience longer response times compared to other models, because it simulates a thought process (under the <think> tag) before providing an actual answer.
Microblog AIMicroblog AI is an application that showcases the power of Azure Static Web Apps combined with Azure Functions and Server-Side Rendering (SSR) using Remix. The application leverages Azure OpenAI's GPT-4o artificial intelligence to enable the creation of microblogs in a simple and intuitive way.
CompletionsA simple example demonstrating how to get completions for the provided prompt.
Streaming Chat CompletionsA simple example demonstrating how to use  streaming chat completions.
Switch from OpenAI to Azure OpenAIArticle with guidance on the small changes you need to make to your code in order to swap back and forth between OpenAI and the Azure OpenAI Service.
OpenAI with Microsoft Entra ID Role based access controlA look at authentication using Microsoft Entra ID.
OpenAI with Managed IdentitiesAn article detailing more complex security scenarios require Azure role-based access control (Azure RBAC). This document covers how to authenticate to your OpenAI resource using Microsoft Entra ID.
More samplesOpenAI samples covering a range of scenarios.

Documentation

LinkDescription
Azure OpenAI Service DocumentationThe hub page for Azure OpenAI Service documentation.
Quickstart: Get started generating text using Azure OpenAI ServiceA quick set of instructions to set up the services you need and code you must write to prompt a model using JavaScript.
Quickstart: Get started using GPT-35-Turbo and GPT-4 with Azure OpenAI ServiceSimilar to the previous quickstart, but provides an example of system, assistant and user roles to tailor the content when asked certain questions.
Quickstart: Chat with Azure OpenAI models using your own dataSimilar to the first quickstart, but this time you add your own data (like a PDF or other document).
Quickstart: Get started using Azure OpenAI Assistants (Preview)Similar to the first quickstart in this list, but this time you tell the model to use the built-in Python code interpreter to solve math problems step by step. This is a starting point to using your own AI assistants accessed through custom instructions.
Quickstart: Use images in your AI chatsHow to programmatically ask the model to describe the contents of an image.
Quickstart: Generate images with Azure OpenAI ServiceProgrammatically generate images using Dall-E based on a prompt.

Resources for other Azure AI services

In addition to Azure OpenAI Service, there are many other Azure AI services that help developers and organizations rapidly create intelligent, market-ready, and responsible applications with out-of-the-box and prebuilt customizable APIs and models. Example applications include natural language processing for conversations, search, monitoring, translation, speech, vision, and decision-making.

Samples

LinkDescription
Integrate Speech into your apps with Speech SDK SamplesA collection of samples for the Azure Cognitive Services Speech SDK. Links to samples for speech recognition, translation, speech synthesis, and more.
Extract structured data from forms, receipts, invoices, and cards using Form Recognizer in JavaScriptA collection of samples for the Azure.AI.FormRecognizer client library.
Extract, classify, and understand text within documents using Text Analytics in JavaScriptThe client Library for Text Analytics. This is part of the Azure AI Language service, which provides Natural Language Processing (NLP) features for understanding and analyzing text.
Document Translation in JavaScriptA quickstart article that uses Document Translation to translate a source document into a target language while preserving structure and text formatting.
Analyze imagesSample code and setup documents for the Microsoft Azure AI Image Analysis SDK.

Documentation

AI serviceDescriptionAPI referenceQuickstart
Content SafetyAn AI service that detects unwanted content.Content Safety API referenceQuickstart
Document IntelligenceTurn documents into intelligent data-driven solutions.Document Intelligence API referenceQuickstart
LanguageBuild apps with industry-leading natural language understanding capabilities.Text Analytics API referenceQuickstart
SearchBring AI-powered cloud search to your applications.Search API referenceQuickstart
SpeechSpeech to text, text to speech, translation, and speaker recognition.Speech API referenceQuickstart
TranslatorUse AI-powered translation to translate more than 100 in-use, at-risk and endangered languages and dialects.Translation API referenceQuickstart
VisionAnalyze content in images and videos.Image Analysis API referenceQuickstart

Training

LinkDescription
Generative AI for Beginners WorkshopLearn the fundamentals of building Generative AI apps with our 18-lesson comprehensive course by Microsoft Cloud Advocates.
Generative AI for JavaScript developersThis covers the basics of generative AI and how to build AI applications using JavaScript, from local development to deployment on Azure, up to running and scaling your AI models. The YouTube playlist of videos includes a series of videos around 10 minutes long, each focusing on a specific topic.
Get started with Azure AI ServicesAzure AI Services is a collection of services that are building blocks of AI functionality you can integrate into your applications. In this learning path, you learn how to provision, secure, monitor, and deploy Azure AI Services resources and use them to build intelligent solutions.
Microsoft Azure AI Fundamentals: Generative AITraining path to help you understand how large language models form the foundation of generative AI: how Azure OpenAI Service provides access to the latest generative AI technology, how prompts and responses can be fine-tuned and how Microsoft's responsible AI principles drive ethical AI advancements.
Develop Generative AI solutions with Azure OpenAI ServiceAzure OpenAI Service provides access to OpenAI's powerful large language models such as ChatGPT, GPT, Codex, and Embeddings models. This learning path teaches developers how to generate code, images, and text using the Azure OpenAI SDK and other Azure services.
Build AI apps with Azure Database for PostgreSQLThis learning path explores how the Azure AI and Azure Machine Learning Services integrations provided by the Azure AI extension for Azure Database for PostgreSQL - Flexible Server can enable you to build AI-powered apps.

AI app templates

AI app templates provide you with well-maintained, easy to deploy reference implementations that provide a high-quality starting point for your AI apps.

There are two categories of AI app templates, building blocks and end-to-end solutions. Building blocks are smaller-scale samples that focus on specific scenarios and tasks. End-to-end solutions are comprehensive reference samples including documentation, source code, and deployment to allow you to take and extend for your own purposes.

To review a list of key templates available for each programming language, see AI app templates. To browse all available templates, see the AI app templates on the AI App Template gallery.