Documentation

SDK Installation

The Get Pronto SDK provides a simple interface for interacting with the Get Pronto API from TypeScript and JavaScript applications.

Installation

Install the SDK using your preferred package manager:

Using npm

bash
npm install @getpronto-io/getpronto-sdk

Using yarn

bash
yarn add @getpronto-io/getpronto-sdk

Using pnpm

bash
pnpm add @getpronto-io/getpronto-sdk

Basic Usage

After installation, initialize the client with your API key:

typescript
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.

Configuration Options

The SDK client accepts the following configuration options:

OptionTypeRequiredDescription
apiKeystringYesYour Get Pronto API key for authentication
baseUrlstringNoCustom API base URL (defaults to https://api.getpronto.io/v1)
headersRecord<string, string>NoAdditional headers to include in all requests

Advanced Configuration

Example with custom configuration options:

typescript
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"
  }
});

TypeScript Support

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:

typescript
import { 
  ClientConfig,
  FileMetadata,
  ImageTransformOptions 
} from "@getpronto-io/getpronto-sdk";

Next Steps

Continue exploring our documentation with these related topics: