🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

polylingo

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

polylingo

Official Node.js SDK for the PolyLingo translation API

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

polylingo (Node.js)

TypeScript / Node.js client for the PolyLingo translation API.

Requires Node.js 18+.

Install

npm install polylingo

Quick start

import PolyLingo from 'polylingo'

const client = new PolyLingo({
  apiKey: process.env.POLYLINGO_API_KEY!,
  // baseURL: 'https://api.usepolylingo.com/v1',
  // timeout: 120_000,
})

const r = await client.translate({
  content: '# Hello',
  targets: ['es', 'fr'],
  format: 'markdown',
})
console.log(r.translations.es)

API

MethodNotes
client.health()GET /health
client.languages()GET /languages
client.translate({ ... })POST /translate
client.batch({ ... })POST /translate/batch
client.usage()GET /usage
client.jobs.create(...)POST /jobs (202)
client.jobs.get(jobId)GET /jobs/:id
client.jobs.translate({ ... })Submit job, poll until done (pollInterval, timeout, onProgress)

Errors

PolyLingoError is the base type (status, error, message). Subclasses: AuthError (401), RateLimitError (429, optional retryAfter), JobFailedError (failed job, includes jobId).

Documentation

Node SDK on usepolylingo.com

Repository

github.com/UsePolyLingo/polylingo-node

License

MIT

Keywords

translation

FAQs

Package last updated on 10 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts