Laddro DocsLaddro Docs
SDKs

TypeScript SDK

TypeScript SDK

The official TypeScript/JavaScript SDK for the Laddro Career API.

Installation

npm install @laddro/career-sdk

Quick Start

import { Laddro } from '@laddro/career-sdk'

const client = new Laddro({
  apiKey: process.env.LADDRO_API_KEY!
})

// List templates (public, no auth needed)
const templates = await client.templates.list()

// Parse a resume
const resume = await client.resumes.parse(
  new File([buffer], 'resume.pdf', { type: 'application/pdf' })
)

// Tailor for a job
const result = await client.tailor.create({
  resumeId: resume.id,
  positionName: 'Senior Frontend Engineer',
  jobDescription: 'We are looking for...'
})

Configuration

const client = new Laddro({
  apiKey: 'YOUR_API_KEY',
  baseUrl: 'https://api.laddro.com',  // default
  timeout: 30_000                      // 30s default
})

Templates

// List all templates
const templates = await client.templates.list()

// Get a specific template
const template = await client.templates.get('graphite')

Resumes

// List resumes
const resumes = await client.resumes.list()

// Get a resume
const resume = await client.resumes.get('res_abc123')

// Parse from file
const parsed = await client.resumes.parse(file)

// Render to PDF
const pdf = await client.resumes.render('res_abc123', {
  templateId: 'graphite'
})

Tailoring

// Standard request
const result = await client.tailor.create({
  resumeId: 'res_abc123',
  positionName: 'Senior Engineer',
  jobDescription: 'We are looking for...'
})

// Streaming
const stream = client.tailor.stream({
  resumeId: 'res_abc123',
  positionName: 'Senior Engineer',
  jobDescription: '...'
})
for await (const event of stream) {
  console.log(event.type, event.section, event.content)
}

Cover Letters

// Generate with streaming
const stream = client.coverLetters.generate({
  resumeId: 'res_abc123',
  positionName: 'Senior Engineer',
  jobDescription: '...',
  stream: true
})
for await (const event of stream) {
  process.stdout.write(event.content)
}

// Render to PDF
const pdf = await client.coverLetters.render('cl_abc123', {
  templateId: 'graphite'
})

Export

import { writeFileSync } from 'fs'

const pdf = await client.export({
  resumeId: 'res_abc123',
  templateId: 'graphite'
})

writeFileSync('resume.pdf', Buffer.from(pdf))

Settings (BYOK)

// Get current model
const settings = await client.settings.get()

// Set custom model
await client.settings.setModel({
  provider: 'anthropic',
  model: 'claude-haiku-4.5',
  apiKey: 'sk-ant-...'
})

// Reset to default
await client.settings.resetModel()

Error Handling

import { LaddroError } from '@laddro/career-sdk'

try {
  await client.resumes.get('nonexistent')
} catch (error) {
  if (error instanceof LaddroError) {
    console.log(error.status)   // 404
    console.log(error.message)  // "Resume not found"
  }
}

Source

github.com/laddro-app/laddro-career-sdk-ts

On this page