@agentmedia/schema
Single source of truth for the agent-media platform — enums, Zod validation schemas, TypeScript types, and the generator registry.

Why This Package Exists
Every option in the agent-media API — tones, music genres, subtitle styles, durations, templates, scene types — is defined exactly once in this package. All consumers (REST API, CLI, dashboard, MCP server, SDKs, docs) import from here. Adding a new subtitle style or template is a one-line change that propagates everywhere on the next build.
Install
npm install @agentmedia/schema
What's Inside
Enums (as const arrays + TypeScript types)
import {
TONES,
MUSIC_GENRES,
SUBTITLE_STYLES,
DURATIONS,
ASPECT_RATIOS,
SCENE_TYPES,
TEMPLATES,
VOICES,
REVIEW_ANGLES,
} from '@agentmedia/schema';
import type { Tone, SubtitleStyle, Template } from '@agentmedia/schema';
Zod Validation Schemas
import { CreateVideoSchema, SubtitleSchema, ProductReviewSchema } from '@agentmedia/schema';
const result = CreateVideoSchema.safeParse(requestBody);
if (!result.success) {
console.error(result.error.issues);
}
Generator Registry
import { GENERATORS, GENERATOR_IDS } from '@agentmedia/schema';
console.log(GENERATOR_IDS);
const schema = GENERATORS.ugc_video.inputSchema;
Use Cases
This package is useful if you're building:
- A custom integration with the agent-media API (validate inputs before sending)
- An SDK in another language (read the enums, generate code)
- A UI that needs dropdown options from the schema
- A testing harness (import valid values for test fixtures)
Build-Time Generation
The schema powers auto-generated artifacts:
generated/openapi.json — full OpenAPI 3.1 spec (via npm run generate:openapi)
supabase/functions/_shared/schema.generated.ts — Deno-compatible copy for edge functions (via npm run generate:edge-schema)
Related Packages
Links
License
Apache-2.0