The Get Pronto SDK provides a simple interface for interacting with the Get Pronto API from TypeScript and JavaScript applications.
Install the SDK using your preferred package manager:
npm install @getpronto-io/getpronto-sdk
yarn add @getpronto-io/getpronto-sdk
pnpm add @getpronto-io/getpronto-sdk
After installation, initialize the client with your API key:
import GetProntoClient from "@getpronto-io/getpronto-sdk";
// Initialize the client
const client = new GetProntoClient({
apiKey: "YOUR_API_KEY"
});
Important: Your API key carries many privileges, so be sure to keep it secure. Learn more about API key management in our Authentication guide.
The SDK client accepts the following configuration options:
Option | Type | Required | Description |
---|---|---|---|
apiKey | string | Yes | Your Get Pronto API key for authentication |
baseUrl | string | No | Custom API base URL (defaults to https://api.getpronto.io/v1) |
headers | Record<string, string> | No | Additional headers to include in all requests |
Example with custom configuration options:
import GetProntoClient from "@getpronto-io/getpronto-sdk";
// Initialize with additional options
const client = new GetProntoClient({
apiKey: "YOUR_API_KEY",
baseUrl: "https://api.your-domain.com/v1",
headers: {
"User-Agent": "MyApp/1.0.0"
}
});
The SDK is written in TypeScript and includes type definitions. Type hints and autocompletion will work out of the box in TypeScript projects and IDEs that support TypeScript.
You can import types from the SDK for use in your application:
import {
ClientConfig,
FileMetadata,
ImageTransformOptions
} from "@getpronto-io/getpronto-sdk";
Continue exploring our documentation with these related topics: