---
title: "Getting Started with the OpenAI SDK for Deno"
description: "OpenAI's official Deno SDK on deno.land/x is a TypeScript-first module loaded over HTTPS, which makes loading more efficient on edge platforms like Deno Deploy, Netlify and Supabase and gives VS Code type support without extra configuration."
url: "https://swe.quest/articles/getting-started-with-the-openai-sdk-for-deno-c6fcd6c76fd10286"
canonical: "https://deno.com/blog/openai_sdk_deno"
source: "Deno"
published: "2023-12-15"
difficulty: "medium"
kind: "How-to"
reading_minutes: 7
tags: ["typescript","llms","javascript"]
---

# Getting Started with the OpenAI SDK for Deno

A post on [Deno](https://swe.quest/sources/deno.md), published 2023-12-15, 7 min read, How-to. Original: [https://deno.com/blog/openai\_sdk\_deno](https://deno.com/blog/openai_sdk_deno)

## Summary

OpenAI's official Deno SDK on deno.land/x is a TypeScript-first module loaded over HTTPS, which makes loading more efficient on edge platforms like Deno Deploy, Netlify and Supabase and gives VS Code type support without extra configuration. The walkthrough covers installing the SDK through an import map in deno.jsonc and setting OPENAI\_API\_KEY. It then builds three examples: text generation with GPT-4 Turbo, a single-file Hono JSX app that generates images with DALL-E 3, and image analysis with gpt-4-vision-preview through the chat completions API.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)

## Prerequisites

- TypeScript basics ([easy posts on TypeScript](https://swe.quest/tags/typescript.md?difficulty=easy))
- Deno runtime basics

## Keywords

Deno, OpenAI SDK, GPT-4 Turbo, DALL-E 3, GPT-4 Vision, Hono

## Related posts

- [The Dino 🦕, the Llama 🦙, and the Whale 🐋](https://swe.quest/articles/the-dino-the-llama-and-the-whale-cd4c526a1cc60614.md): Deno · 2025-02-27 · Medium · 5 min read · LLMs, TypeScript, JavaScript, Developer tools
  Deno's built-in Jupyter kernel, Ollama and LangChain.js combine into a low-friction environment for experimenting with a locally hosted DeepSeek R1 8B model in TypeScript.
- [Making a web app generator with open ML models](https://swe.quest/articles/making-a-web-app-generator-with-open-ml-models-3da427bd1ac5acd0.md): Hugging Face · 2023-07-03 · Medium · 9 min read · LLMs, AI for coding, JavaScript, Inference & serving
  A Node.js/Express server can generate web apps from a text prompt by streaming tokens from a code LLM (WizardCoder-15B on Hugging Face Inference Endpoints) straight into the browser as HTML.
- [Mozilla Llamafile in Supabase Edge Functions](https://swe.quest/articles/mozilla-llamafile-in-supabase-edge-functions-f67e9f7e5ebbcb62.md): Supabase · 2024-08-21 · Medium · 4 min read · Serverless, Inference & serving, LLMs, TypeScript
  Supabase Edge Functions can now use Mozilla Llamafile, alongside Ollama, as the inference server via an OpenAI-API-compatible mode.
- [Build a REST API with Express, TypeScript, and Deno](https://swe.quest/articles/build-a-rest-api-with-express-typescript-and-deno-803b55a783fab19e.md): Deno · 2023-03-08 · Medium · 5 min read · TypeScript, JavaScript, API design, Runtimes & VMs
  Deno runs Express with TypeScript without any TypeScript build configuration: Express is imported through an npm: specifier and its types are pulled in with a @deno-types comment.
- [Deno 1.34: deno compile supports npm packages](https://swe.quest/articles/deno-1-34-deno-compile-supports-npm-packages-6066648b7bf9ee04.md): Deno · 2023-05-25 · Medium · 6 min read · JavaScript, Runtimes & VMs, Developer tools, TypeScript
  Deno 1.34 lets \`deno compile\` bundle npm packages and their dependencies into a single self-contained executable.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
