Developer Access

API & SDK

Integrate Texport into your own apps. Your files never leave the user's machine — conversion runs locally in WASM.

API key

Personal keyCredits remaining:

Loading your key…

Step-by-step: from zero to first conversion

The complete procedure.
  1. 1Sign in with your email and password (or Google). Developer access requires a verified account.
  2. 2Top up credits from the Credits or Pricing page. LaTeX ↔ Word conversions are metered; every other converter is free.
  3. 3Generate an API key on this page. The full key is displayed exactly once — copy it into your secret manager immediately.
  4. 4Install the SDK: npm install @texport/sdk.
  5. 5Store the key as TEXPORT_API_KEY in your environment. Never commit it, never ship it in client-side bundles you do not control.
  6. 6Call convert() with your source and a direction. The engine runs locally; only key validation and credit metering touch our servers.
  7. 7Read result.fidelity.score and result.fidelity.warnings before you publish the output.
  8. 8Rotate the key with Regenerate whenever a developer leaves the project or the key may have leaked.

Install the SDK

One package for server and browser.
npm install @texport/sdk

Supports Node.js 18+, Vite, Next.js, Webpack, Remix, Astro, and modern evergreen browsers. Requires WebAssembly and (in the browser) cross-origin isolation headers for the fastest path; the SDK falls back to a single-threaded build when those headers are absent.

Quick example

Convert LaTeX to Word in three lines.
import { convert } from '@texport/sdk'

const docx = await convert(texContent, {
  apiKey: 'txp_your_key_here'
})

Credits are charged per ~300 source words. Admin keys have unlimited conversions.

All conversion options

Every flag the engine accepts.
await convert(source, {
  apiKey:        'txp_...',        // required
  direction:     'tex-to-docx',    // or 'docx-to-tex'
  preserveMath:  true,             // native Word equations (OMML)
  preserveImages:true,             // extract & embed figures
  renderTikz:    false,            // server-render TikZ/PGF diagrams
  keepStructure: true,             // headings, TOC, numbering, cross-refs
  bibliography:  'refs.bib',       // BibTeX file or CSL JSON
  citationStyle: 'numeric',        // 'numeric' | 'author-year'
  fontMap:       {},               // LaTeX family -> Office font
  timeoutMs:     120000,           // hard stop for one conversion
  onProgress:    (p) => {},        // { stage, percent, message }
})

preserveMath

Emits editable OMML equations instead of images. Disable only if your reader needs flattened math.

renderTikz

Sends only the TikZ snippet plus its preamble to the renderer — never the whole document.

bibliography

Accepts a .bib string, a CSL-JSON object, or a path in Node. Missing entries surface as warnings, not failures.

onProgress

Fires for each of the four stages: preprocess, convert, format, verify.

The result object

What comes back on success.
{
  buffer:    ArrayBuffer,   // the generated file
  filename:  'paper.docx',  // derived from the source name
  mimeType:  'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
  creditsUsed: 2,
  fidelity: {
    score: 96,              // 0–100
    warnings: [ { kind, message, line } ],
    gaps:     [ { feature, severity, suggestion } ],
  },
  rawLog:      '...',       // full engine output
  pipelineLog: [ { stage, ms, notes } ],
}

A score at or above 95 means the document is publication-ready after a normal proofread. Below 85, read every warning before distributing the file.

Error codes

Every failure is typed.
codeMeaningWhat to do
auth/missing-keyNo apiKey passed.Set TEXPORT_API_KEY.
auth/invalid-keyKey unknown or malformed.Regenerate on this page.
auth/revokedKey was revoked.Generate a new key.
credits/insufficientBalance below the job cost.Top up on /pricing.
input/too-largeSource exceeds the size limit.Split the document or strip assets.
input/unsupportedFile is not .tex, .docx or a ZIP.Convert to a supported input first.
engine/timeoutConversion exceeded timeoutMs.Raise timeoutMs or simplify the source.
engine/parseLaTeX could not be parsed.Check rawLog for the offending line.
engine/verify-failedOutput failed post-conversion audit.Retry; report if reproducible.
network/rendererTikZ renderer unreachable.Retry, or set renderTikz: false.
rate/limitedToo many concurrent jobs.Back off and retry (see below).
try {
  const out = await convert(tex, { apiKey })
} catch (e) {
  if (e.code === 'credits/insufficient') redirect('/pricing')
  else if (e.code === 'rate/limited') await backoff(e.retryAfterMs)
  else throw e
}

Rate limits & quotas

Fair-use ceilings.
  • Key validation: 120 requests per minute per key.
  • Concurrent conversions: 3 per account (admin keys are exempt).
  • Single .tex source: 2 MB via the MCP path, larger in-process through the SDK.
  • ZIP archives: ~50 MB, recursively flattened before conversion.
  • TikZ render calls: 60 per hour per account.
  • Sustained abuse triggers a temporary 429 with a retryAfterMs hint, not a ban.

Key security & lifecycle

Treat it like a password.
  • Only a SHA-256 hash of your key is stored. We cannot recover or re-display a lost key — regenerate instead.
  • One active key per account. Regenerating instantly invalidates the previous one; deploy the new key before rotating.
  • Revoking stops every integration using the key within seconds.
  • The key carries your credit balance and your role. An admin key grants unlimited conversions — never embed it in a public site.
  • last_used_at on this page is the cheapest leak detector: unexpected activity means rotate now.
  • Server-side use is strongly preferred. If you must call from the browser, proxy through your own backend.

Agent integrations (MCP)

Connect Claude, ChatGPT, or Cursor.

Assistants connect over OAuth — no API key is involved. Add this server URL as a custom connector and approve the consent screen while signed in.

https://textportdocx.in/mcp

Seven tools are exposed: convert_latex_to_docx, get_conversion_result, list_conversions, get_account, list_credit_transactions, list_payments, and purchase_credits.

Troubleshooting

The failures we see most.

Key works locally, fails in production

The env var is not set on the host, or a build inlined an empty string. Log the key prefix (never the key) to confirm.

Conversion is slow the first time

The WASM engine is downloaded and compiled once, then cached. Warm it at boot with a tiny throwaway conversion.

Math renders as images

preserveMath was disabled, or the source uses a math package the engine flattens. Check fidelity.gaps.

Images missing from the output

The figures were referenced but not included. Send a ZIP containing the .tex plus its image files.

Credits deducted on a failed job

They are not. Credits are charged only after a successful, verified output; refunds for double-charges are automatic.

Output opens with a repair prompt in Word

Report it with the rawLog attached — this always indicates a bug we can fix.

Files never leave the user's machine on the SDK and web paths. Only your API key is sent to our servers for validation — file contents are never transmitted or stored. The MCP agent path is the one exception and is described on the MCP setup page.

Read the full documentation → · API terms of use

textportdocx

Loading everything into your browser — please wait…

Everything runs locally in your browser