MakePhotos Docs
SDK Reference

Installation

Install and configure the MakePhotos SDK for Node.js and TypeScript.

Installation

The MakePhotos SDK is a zero-dependency TypeScript package that works in any Node.js environment.

Install

npm install makephotos
pnpm add makephotos
yarn add makephotos

Initialize

import MakePhotos from 'makephotos';

const client = new MakePhotos({
  apiKey: process.env.MAKEPHOTOS_API_KEY,
});

Configuration options

OptionTypeRequiredDescription
apiKeystringYesYour API key (mk_live_...)
baseUrlstringNoAPI base URL (defaults to https://makephotos.ai)

Requirements

  • Node.js 18+ (uses native fetch)
  • An active MakePhotos subscription
  • An API key from the developer dashboard

TypeScript support

The SDK is written in TypeScript and ships with full type definitions. All methods, params, and return types are typed.

import MakePhotos, {
  type GenerateParams,
  type GenerateResult,
  type CreditsInfo,
  MakePhotosError,
} from 'makephotos';

CommonJS

The SDK supports both ESM and CommonJS:

const MakePhotos = require('makephotos').default;

const client = new MakePhotos({
  apiKey: process.env.MAKEPHOTOS_API_KEY,
});

On this page