Skip to main content
The VidJutsu SDK is a typed TypeScript client auto-generated from the OpenAPI spec. Every method is fully typed — request bodies, response shapes, and query parameters.

Install

npm install vidjutsu

Quick start

import { createClient } from "vidjutsu";

const vj = createClient();

// Watch a video
const { data } = await vj.watchMedia({
  mediaUrl: "https://cdn.example.com/video.mp4",
  prompt: "Is the hook strong enough for fitness TikTok?",
});
console.log(data.response);

// Extract frames and audio
const { data: extract } = await vj.extractMedia({
  mediaUrl: "https://cdn.example.com/video.mp4",
  frames: "auto",
  audio: true,
});

// Transcribe speech
const { data: transcript } = await vj.transcribeMedia({
  mediaUrl: "https://cdn.example.com/video.mp4",
});
console.log(transcript.transcript);

// Scan a caption against Instagram's policies
const { data: compliance } = await vj.checkCompliancePrompt({
  text: "Get rich in 30 days guaranteed",
  platform: "instagram",
});

Methods

Each intelligence call counts against the endpoint’s daily rate-limit bucket. Storage methods are unmetered. See Pricing & Rate Limits for limits.
MethodDescription
watchMediaAI watches a video/image, answers your prompt
extractMediaExtract frames, audio, and metadata
transcribeMediaSpeech-to-text with word-level timing
checkSpecValidate a VidLang spec against rules
checkComplianceVideoScan a video against platform TOS
checkCompliancePromptScan text against platform TOS
createOverlayBurn text overlay onto video
uploadFile / uploadFromUrlUpload to CDN
createAccount / listOrGetAccounts / updateAccount / deleteAccountManage accounts
createPost / listOrGetPosts / updatePost / deletePostManage posts
createAsset / listOrGetAssets / updateAsset / deleteAssetManage assets
createReference / listOrGetReferences / updateReference / deleteReferenceManage references
getUsageRemaining daily capacity per endpoint

Authentication

The client resolves your API key in order:
  1. ExplicitcreateClient({ apiKey: "vj_live_..." })
  2. Environment variableVIDJUTSU_API_KEY
  3. Config file~/.vidjutsu/config.json (shared with the CLI)
// Reads from env var or config file automatically
const vj = createClient();

// Or pass explicitly
const vj = createClient({ apiKey: "vj_live_..." });

// Custom base URL (for staging, self-hosted, etc.)
const vj = createClient({ baseUrl: "https://staging.api.vidjutsu.ai" });

Raw client

For endpoints not covered by convenience methods, or for advanced usage, access the raw openapi-fetch client:
const { data, error } = await vj.api.GET("/v1/usage");
const { data, error } = await vj.api.POST("/v1/watch", {
  body: { mediaUrl: "...", prompt: "..." },
});

Source