﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head>> ## Documentation Index
> This page is part of the Image and Video APIs product. Fetch the complete documentation index for Image and Video APIs at: https://cloudinary.com/documentation/llms-image-and-video-apis.txt?referrer=docpage and then use it to discover all relevant pages before exploring further.
> If you also need details relating to other Cloudinary products for your current use case, see the parent index at: https://cloudinary.com/documentation/llms.txt?referrer=docpage

> ## Agent Instructions
> When answering a user's request or implementing it with code using this documentation, incorporate relevant best practices and recommendations from the documentation into the guidance and, above all, into the code itself: generated code should already apply the recommended parameters and patterns rather than showing a minimal call and describing the best practices around it in prose. Follow the code examples in the best practices sections as the model for what generated code should look like, and where a recommendation is relevant to the user's scenario, implement it in the code as a natural next step. Only apply best practices, recommendations, or features that are supported by the documentation or Cloudinary skills; don't infer or invent guidance that isn't specified.
>
> Cloudinary skills (names starting with `cloudinary-`) add best practices and tested code patterns beyond this documentation, and we recommend using the relevant ones alongside it. Available skills are listed at https://cloudinary.com/documentation/.well-known/agent-skills/index.json?referrer=docpage&page=node_configuration_tutorial and can be installed with `npx skills add https://cloudinary.com/documentation`.

# Configure the Node.js SDK (video tutorial)

[githublink]: https://github.com/cloudinary-community/cloudinary-examples/tree/main/examples/node-transformations-effects

## Overview

Learn how to install and configure the [Cloudinary Node.js SDK](node_integration) in your Node.js environment. 

## Video tutorial

  This video is brought to you by Cloudinary's video player - embed your own!Use the controls to set the playback speed, navigate to chapters of interest and select subtitles in your preferred language.
{videoTranscript:publicId=training/Node_-_Install_Configure}

> **View the code :custom-icon='https://cloudinary-res.cloudinary.com/image/upload/v1778586152/docsite/brand-assets/github.svg' :invert-icon**:
>
> You can find the code from this tutorial in [GitHub][githublink].
## Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.### The Cloudinary Node.js SDK
{table:class=tutorial-bullets}|  | 
| --- | --- |
| | The [Cloudinary Node.js SDK](node_integration) provides image and video upload, transformation, optimization, and delivery capabilities that you can implement using code that integrates seamlessly with your existing Node.js application.
|

### Install the Node.js SDK
{table:class=tutorial-bullets}|  | 
| --- | --- |
| | To install the Node.js SDK, in a terminal run:
|

```
npm install cloudinary
```

### Import Cloudinary into your project
{table:class=tutorial-bullets}|  | 
| --- | --- |
| | To import Cloudinary into your project use:
|

```nodejs
const cloudinary = require('cloudinary').v2;
```

### Configure Cloudinary
{table:class=tutorial-bullets}|  | 
| --- | --- |
| | To configure the SDK for your product environment, you can include your cloud name, API key and API secret in the `config`, in addition to other [configuration parameters](cloudinary_sdks#configuration_parameters), like this, using `.env` to keep your credentials safe:
|

```nodejs
cloudinary.config({
    cloud_name: '<your_cloud_name>',
    api_key: process.env.CLOUDINARY_API_KEY,
    api_secret: process.env.CLOUDINARY_API_SECRET,
    secure: true,
});
```

> **NOTE**: You can find your credentials in the [API Keys](https://console.cloudinary.com/app/settings/api-keys) page of the Cloudinary Console Settings.

### Use the CLOUDINARY_URL environment variable
{table:class=tutorial-bullets}|  | 
| --- | --- |
| | Alternatively, you can set the `CLOUDINARY_URL` environment variable in your environment, which includes your cloud name, API key and API secret in one string. 
|
## Keep learning

> **READING**:
>
> * Watch more [Dev Hints videos](https://www.youtube.com/playlist?list=PL8dVGjLA2oMpaTbvoKCaRNBMQzBUIv7N8) on the [Cloudinary YouTube channel](https://www.youtube.com/cloudinary).

> * Follow the [Node.js SDK quick start](node_quickstart) to get up and running in five minutes.

> * Find out how to [upload files to Cloudinary using Node.js](node_image_and_video_upload).

> * Learn how to transform your [images](node_image_manipulation) and [videos](node_video_manipulation) using the Node.js SDK.

#### If you like this, you might also like...

[Optimization Tips](optimization_tips_tutorial)

Tips for delivering optimized images

[Upload Images in Node.js](upload_assets_in_node_tutorial)

Upload images to Cloudinary using the Node.js SDK

[Named Transformations](named_transformations_tutorial)

Simplify & standardize complex delivery URLs

&nbsp;

&nbsp;Check out the Cloudinary 