npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@productminds/parseu-fetch

v0.1.1

Published

Plain TypeScript fetch client for the Parseu API

Readme

@productminds/parseu-fetch

A TypeScript client for the Parseu API built on fetch, with no runtime dependencies. It works in Node.js 20 or later and in any runtime with a global fetch.

Using Effect? Use the Effect-based client, @productminds/parseu, instead.

Install

npm install @productminds/parseu-fetch

Configure

import { createParseuClient } from "@productminds/parseu-fetch";

const parseu = createParseuClient({ apiKey: process.env.PARSEU_API_KEY! });

Options: apiKey (required, sent as a bearer token), baseUrl (defaults to https://api.parseu.ai), and fetch (defaults to the global fetch).

Upload and transcribe

import { openAsBlob } from "node:fs";
import { createParseuClient } from "@productminds/parseu-fetch";

const parseu = createParseuClient({ apiKey: process.env.PARSEU_API_KEY! });

const uploaded = await parseu.upload(await openAsBlob("./audio.wav"), {
  filename: "audio.wav",
});

const result = await parseu.transcribeAndWait({
  input: uploaded.uri,
  language: "auto",
  retention: "default",
});

if (result._tag === "Retained" && "text" in result.body) {
  console.log(result.body.text);
}

transcribeAndWait starts the job and polls until the result is final. To control each step, call transcribe, getJob, and getResult yourself, or call waitForResult(jobId) for an existing job. Both accept { intervalMs = 3000, timeoutMs = 600000, signal }.

upload accepts a Blob/File, or a FormData with a file entry. For large files, call createPresignedUpload(), PUT the bytes to the returned upload_url, then transcribe the returned uri.

Results

getResult returns an object tagged with _tag:

| _tag | Meaning | Fields | | ---------- | ---------------------------------------------------- | ------------------------------- | | Retained | Completed retained result | jobId, body | | Zdr | Completed transient result requiring acknowledgement | jobId, body, resultSha256 | | Pending | Result recovery is still in progress; poll again | jobId, body | | Deleted | Result is deleted or expired | jobId, body |

waitForResult and transcribeAndWait never return Pending.

Zero data retention (ZDR)

For ZDR, submit a directly accessible HTTPS audio URL with retention: "none". The result is transient: after you have stored it, acknowledge it to trigger verified deletion. The client never acknowledges for you.

A ZDR result is available for a limited window after it is ready, currently 15 minutes, or until you acknowledge it. Fetch and acknowledge it promptly. The window applies to the whole service and cannot be set per request. Results of uploaded files (retention: "default") are retained for 30 days.

const result = await parseu.transcribeAndWait({
  input: "https://your-storage.example.com/audio.wav",
  language: "auto",
  retention: "none",
});

if (result._tag === "Zdr") {
  await saveSomewhereDurable(result.body);
  await parseu.acknowledgeResult({
    jobId: result.jobId,
    resultSha256: result.resultSha256,
  });
}

Errors

  • ParseuError: the API returned a non-2xx response. It has status, requestId (from X-Request-Id; quote it when contacting support), tag, and the parsed error body. Documented error bodies are described by the exported ApiErrorBody type, discriminated by _tag.
  • ParseuJobError: a job waited on ended as failed or canceled.
  • ParseuTimeoutError: the wait timed out. The job keeps running; resume with waitForResult(error.jobId).
  • ParseuNetworkError: the request could not be completed.
  • ParseuAbortError: your AbortSignal aborted the request or wait.
  • ParseuResponseError: a successful response did not match the API contract.
import { ParseuError } from "@productminds/parseu-fetch";

try {
  await parseu.getJob("job_123");
} catch (error) {
  if (error instanceof ParseuError && error.status === 404) {
    console.error("Unknown job", error.requestId);
  } else {
    throw error;
  }
}

Requests are never retried automatically. Every method also accepts { signal } as its last argument to cancel the request.

Methods

upload, createPresignedUpload, getFile, transcribe, getJob, cancelJob, getResult, acknowledgeResult, waitForResult, transcribeAndWait. Full API reference: https://api.parseu.ai/docs.