TypeScript SDK for the Neon API
What you will learn:
What is the Neon TypeScript SDK
How to get started
Related resources
Source code
About the SDK
Neon supports the @neondatabase/api-client library, which is a wrapper for the Neon API. This SDK simplifies integration of TypeScript applications with the Neon platform, providing methods to programmatically manage API keys, Neon projects, branches, databases, endpoints, roles, and operations.
Installation
You can install the library using npm
or yarn
.
npm
:
yarn
:
Get Started
To get started with the @neondatabase/api-client
library, follow these steps:
-
Obtain an API key from the Account settings page in the Neon Console.
-
Click Generate new API key.
-
Enter a name for your API key and click Create.
-
Save your API key to a secure location that enables you to pass it to your code.
-
Import the library:
-
Create an instance of the API client by calling the
createApiClient
function: -
Use the
apiClient
instance to make API calls. For example: