Skip to main content

Official Python client for the WolfScribe Studio API — transcribe audio, video, and YouTube URLs in 3 lines of code

Project description

WolfScribe API Wrapper

Official client libraries for the WolfScribe Studio API — hyper-efficient AI transcription for developers, agents, and creators.

npm PyPI License: MIT

Transcribe audio files, video files, and YouTube URLs in 3 lines of code. Built for AI agents, serverless functions, and automation pipelines.


Quick Start

Node.js / TypeScript

npm install wolfscribe-api-wrapper
import { WolfScribe } from "wolfscribe-api-wrapper";

const client = new WolfScribe(process.env.WOLFSCRIBE_API_KEY);

// YouTube transcription — synchronous
const result = await client.transcribeYouTube(
  "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
);
console.log(result.transcript.content);

Python

pip install wolfscribe-api-wrapper
from wolfscribe import WolfScribe

client = WolfScribe(api_key="ws_live_your_key_here")

result = client.transcribe_youtube("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
print(result["transcript"]["content"])

Features

  • YouTube Transcription — Extract transcripts from any YouTube video instantly
  • Media File Transcription — Submit audio/video URLs for AI transcription (MP3, MP4, WAV, M4A, OGG, MOV, AVI, MKV, FLAC)
  • Speaker Diarization — Identify and separate speakers automatically
  • Webhook Callbacks — Receive async notifications when transcription completes
  • Wallet-Based Billing — Pay-as-you-go, no monthly commitments
  • TypeScript & Python — Full type safety in both ecosystems

Pricing

Service Cost
YouTube transcription $0.008 per video
Audio/Video file transcription $0.0108 per minute (~$0.65/hr)

Pre-fund your wallet via the WolfScribe dashboard.


Usage

YouTube Transcription (Synchronous)

YouTube transcripts are returned immediately — no waiting.

// TypeScript
const result = await client.transcribeYouTube(
  "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
  {
    language: "en",                    // optional: "auto" | "en" | "es" | "fr" | "de" | "it"
    title: "My Video Title",           // optional
    webhookUrl: "https://example.com", // optional
  }
);
// result.transcript.content     -> full text
// result.transcript.id          -> transcript ID
// result.transcript.durationSeconds -> duration
# Python
result = client.transcribe_youtube(
    "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
    language="en",
)

Media File Transcription (Asynchronous)

Media files are processed asynchronously. Poll for completion or use a webhook.

// TypeScript — with webhook
const job = await client.transcribeMedia(
  "https://storage.example.com/podcast.mp3",
  {
    title: "My Podcast",
    identifySpeakers: true,
    webhookUrl: "https://my-server.com/webhook",
  }
);
console.log(`Job ID: ${job.transcriptId}`);

// Poll for results
let transcript = await client.getTranscript(job.transcriptId);
while (transcript.status === "processing") {
  await new Promise(r => setTimeout(r, 5000));
  transcript = await client.getTranscript(job.transcriptId);
}
console.log(transcript.content);
# Python — polling
job = client.transcribe_media(
    "https://storage.example.com/podcast.mp3",
    identify_speakers=True,
)

transcript = client.get_transcript(job["transcriptId"])
while transcript["status"] == "processing":
    import time
    time.sleep(5)
    transcript = client.get_transcript(job["transcriptId"])

Check Transcription Status

const transcript = await client.getTranscript("cm_media_xyz789p");
// { id, status, title, durationSeconds, content, speakerData, costUnitsCharged }
transcript = client.get_transcript("cm_media_xyz789p")

Manage API Keys

// List keys
const keys = await client.listApiKeys();

// Create a new key (returns full key once)
const newKey = await client.createApiKey("My Agent Key");
console.log(newKey.key); // ws_live_...

// Revoke a key
await client.revokeApiKey(keys[0].id);
keys = client.list_api_keys()
new_key = client.create_api_key("My Agent Key")
client.revoke_api_key(keys[0]["id"])

Usage Logs

const logs = await client.getUsageLogs();
// [{ endpointType, status, costCharged, createdAt }]
logs = client.get_usage_logs()

API Reference

POST /api/v1/transcribe

Submit a transcription job.

Parameter Type Required Description
type string yes "youtube" or "media"
url string yes YouTube URL or public media file URL
title string no Display name for the transcript
language string no Language code ("en", "es", "fr", "de") or "auto"
identifySpeakers boolean no Enable speaker diarization
mainSpeakerName string no Override dominant speaker label
webhookUrl string no URL for async completion callback

GET /api/v1/transcribe/:id

Retrieve transcription results. Status values: "completed", "processing", "failed".

GET /api/v1/keys

List all API keys for the authenticated user.

POST /api/v1/keys

Create a new API key. The full key is returned only once during creation.

DELETE /api/v1/keys?id=:id

Revoke an API key.

GET /api/v1/usage-logs

Get API usage history (last 100 entries).


Webhooks

When submitting async jobs (type: "media"), provide a webhookUrl. WolfScribe will POST the result to your endpoint when processing completes.

{
  "event": "transcript.completed",
  "transcript": {
    "id": "cm_media_xyz789p",
    "status": "completed",
    "durationSeconds": 120,
    "content": "Full transcript text with speaker labels...",
    "speakerData": [
      { "speaker": "Speaker A", "start": 0, "end": 4500, "text": "Hello everyone." }
    ]
  }
}

Events: transcript.completed | transcript.failed


Error Handling

import {
  WolfScribeError,
  AuthenticationError,
  InsufficientFundsError,
  ValidationError,
  NotFoundError,
} from "wolfscribe-api-wrapper";

try {
  await client.transcribeYouTube("https://youtube.com/watch?v=...");
} catch (error) {
  if (error instanceof InsufficientFundsError) {
    console.error("Top up your wallet at https://wolfscribe.live");
  }
  if (error instanceof AuthenticationError) {
    console.error("Check your API key");
  }
}
from wolfscribe import WolfScribe, AuthenticationError, InsufficientFundsError

try:
    client.transcribe_youtube("https://youtube.com/watch?v=...")
except InsufficientFundsError:
    print("Top up your wallet at https://wolfscribe.live")
except AuthenticationError:
    print("Check your API key")
Status Error Meaning
401 AuthenticationError Invalid or missing API key
402 InsufficientFundsError Wallet balance too low
400 ValidationError Missing or invalid parameters
404 NotFoundError Transcript not found
500 WolfScribeError Server error (not billed)

Environment Variables

WOLFSCRIBE_API_KEY=ws_live_your_key_here

The client reads WOLFSCRIBE_API_KEY from the environment automatically when no key is passed to the constructor.


Requirements

  • Node.js >= 18 (TypeScript/JS)
  • Python >= 3.9

Links


License

MIT © More Than Design UK Ltd

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wolfscribe_api_wrapper-0.1.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wolfscribe_api_wrapper-0.1.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file wolfscribe_api_wrapper-0.1.0.tar.gz.

File metadata

  • Download URL: wolfscribe_api_wrapper-0.1.0.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for wolfscribe_api_wrapper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6986843f2930e5d980a491fdf99490e638f671b572401768bb97a447d5927636
MD5 bc380e6eb36f80ebd346b68b1aac3034
BLAKE2b-256 430553e1417498557ccb9d58e1bf42d760670de816c94b3da0ea11fffd974716

See more details on using hashes here.

File details

Details for the file wolfscribe_api_wrapper-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wolfscribe_api_wrapper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b79d4b0a4fa8a7973cd340fdc81452b087cde5c735b873e80047501e028ab7b
MD5 6f1b3662d87f04a57173e00c829fe674
BLAKE2b-256 9f8095f5a9ef9e61414c000144d9ae99072d57813a7d33030b377bf2f1a15385

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page