{
  "name": "@forge-sdk/media",
  "language": "typescript",
  "version": "0.1.0",
  "description": "Image generation, speech synthesis, transcription, and video generation for the Forge SDK",
  "manifest": "forge-ts/packages/forge-media/package.json",
  "manifestSha256": "820846db6c50c6645f9657b11622b411badbeb3cfef0f907874eba67f1235dfe",
  "status": "source-reference",
  "registryPublicationVerified": false,
  "route": "/libraries/typescript/media",
  "features": {},
  "files": [
    {
      "path": "forge-ts/packages/forge-media/src/error.ts",
      "sha256": "11694c3f4152569dad54ee5a3ac553d1c23d22400a05a89921351429b7d07594",
      "artifactSha256": "1a7dec13a0a26f98fe2c3b4ec68cd410e176213b68391a6098198c6c93229100",
      "url": "/reference/source/forge-ts/packages/forge-media/src/error.ts.txt",
      "declarations": [
        {
          "name": "export const ForgeMediaErrorCode = {",
          "line": 13,
          "signature": "export const ForgeMediaErrorCode /* type inferred in source */;",
          "documentation": "Error types for the `@forge-sdk/media` package.\n\nAll errors are typed and actionable. Error messages include enough context\nfor the developer to diagnose the issue without reading source code.\nError code enumeration for `@forge-sdk/media`."
        },
        {
          "name": "ForgeMediaErrorCodeType",
          "line": 23,
          "signature": "export type ForgeMediaErrorCodeType = (typeof ForgeMediaErrorCode)[keyof typeof ForgeMediaErrorCode];",
          "documentation": "Error code type."
        },
        {
          "name": "ForgeMediaError",
          "line": 42,
          "signature": "export class ForgeMediaError extends Error {\n  public readonly code: ForgeMediaErrorCodeType;\n  static generationFailed(model: string, reason: string): ForgeMediaError;\n  static transcriptionFailed(model: string, reason: string): ForgeMediaError;\n  static speechFailed(model: string, reason: string): ForgeMediaError;\n  static videoFailed(model: string, reason: string): ForgeMediaError;\n  static unsupportedFormat(format: string, supported: string[]): ForgeMediaError;\n  static core(reason: string): ForgeMediaError;\n}",
          "documentation": "Error class for media operations.\n\nCovers image generation, speech synthesis, transcription, video generation,\nand format compatibility errors."
        }
      ]
    },
    {
      "path": "forge-ts/packages/forge-media/src/image.ts",
      "sha256": "392397e64374a3219161aeb6442bb56dd25a3fd101ca0c6a488d9d7d01684110",
      "artifactSha256": "68a3be7e485429835e51c292c1f22c3d6c639eae7baa1475a7e349d9f81532cf",
      "url": "/reference/source/forge-ts/packages/forge-media/src/image.ts.txt",
      "declarations": [
        {
          "name": "export const ImageFormat = {",
          "line": 18,
          "signature": "export const ImageFormat /* type inferred in source */;",
          "documentation": "Supported image output formats.\n\nANVIL Spec section 10.1 -- Media formats."
        },
        {
          "name": "ImageFormat",
          "line": 25,
          "signature": "export type ImageFormat = (typeof ImageFormat)[keyof typeof ImageFormat];",
          "documentation": "Image format type."
        },
        {
          "name": "imageMimeType",
          "line": 33,
          "signature": "export function imageMimeType(format: ImageFormat): string;",
          "documentation": "Returns the MIME type for an image format."
        },
        {
          "name": "imageExtension",
          "line": 47,
          "signature": "export function imageExtension(format: ImageFormat): string;",
          "documentation": "Returns the file extension for an image format."
        },
        {
          "name": "ImageOptions",
          "line": 54,
          "signature": "export interface ImageOptions {\n  /** Image width in pixels. */\n  readonly width?: number;\n  /** Image height in pixels. */\n  readonly height?: number;\n  /** Output format. Defaults to PNG. */\n  readonly format?: ImageFormat;\n  /** Quality level (0-100). Only applies to JPEG and WebP. */\n  readonly quality?: number;\n  /** Style hint for the generator (e.g., 'vivid', 'natural'). */\n  readonly style?: string;\n}",
          "documentation": "Options for image generation."
        },
        {
          "name": "ImageResult",
          "line": 70,
          "signature": "export interface ImageResult {\n  /** The raw image data as a Uint8Array. */\n  readonly data: Uint8Array;\n  /** The MIME type of the generated image. */\n  readonly mimeType: string;\n  /** The width of the generated image in pixels. */\n  readonly width: number;\n  /** The height of the generated image in pixels. */\n  readonly height: number;\n  /** The model identifier that produced this image. */\n  readonly model: string;\n}",
          "documentation": "The result of an image generation operation."
        },
        {
          "name": "ImageProvider",
          "line": 100,
          "signature": "export interface ImageProvider {\n  /** Returns the model identifier. */\n  modelId(): string;\n  /** Returns the provider name (e.g., 'openai', 'stability'). */\n  providerName(): string;\n\n  /**\n   * Generates an image from a text prompt.\n   *\n   * @param prompt - The text description of the desired image.\n   * @param options - Optional generation parameters.\n   * @returns The generated image result.\n   * @throws {ForgeMediaError} If generation fails.\n   */\n  generateImage(prompt: string, options?: ImageOptions): Promise<ImageResult>;\n}",
          "documentation": "Interface for image generation providers.\n\nImplementors connect to an image generation model (e.g., DALL-E 3,\nStable Diffusion, Midjourney API) and produce images from text prompts."
        },
        {
          "name": "generateImage",
          "line": 138,
          "signature": "export async function generateImage(\n  provider: ImageProvider,\n  prompt: string,\n  options?: ImageOptions\n): Promise<ImageResult>;",
          "documentation": "Generates an image using the given provider.\n\nThis is a convenience function that delegates to the provider's\n`generateImage` method with error wrapping."
        }
      ]
    },
    {
      "path": "forge-ts/packages/forge-media/src/index.ts",
      "sha256": "09397e7d35bd7842805caade8973b6f1afd813cef4f1ccba0188019ab292a2df",
      "artifactSha256": "9fb47b965d1054a2084ebf4c9ad87c32b88f7fea9ab8b782a5bc07e83906d24c",
      "url": "/reference/source/forge-ts/packages/forge-media/src/index.ts.txt",
      "declarations": [
        {
          "name": "export { ForgeMediaError, ForgeMediaErrorCode, type ForgeMediaErrorCodeType } from './error.js';",
          "line": 14,
          "signature": "export { ForgeMediaError, ForgeMediaErrorCode, type ForgeMediaErrorCodeType } from './error.js';",
          "documentation": ""
        },
        {
          "name": "export {",
          "line": 17,
          "signature": "export {\n  type ImageProvider,\n  type ImageOptions,\n  type ImageResult,\n  ImageFormat,\n  imageMimeType,\n  imageExtension,\n  generateImage,\n} from './image.js';",
          "documentation": ""
        },
        {
          "name": "export {",
          "line": 28,
          "signature": "export {\n  type SpeechProvider,\n  type SpeechOptions,\n  type SpeechResult,\n  AudioFormat,\n  audioMimeType,\n  speak,\n} from './speech.js';",
          "documentation": ""
        },
        {
          "name": "export {",
          "line": 38,
          "signature": "export {\n  type TranscriptionProvider,\n  type TranscriptionOptions,\n  type TranscriptionResult,\n  type TranscriptionSegment,\n  transcribe,\n} from './transcription.js';",
          "documentation": ""
        },
        {
          "name": "export {",
          "line": 47,
          "signature": "export {\n  type VideoProvider,\n  type VideoOptions,\n  type VideoResult,\n  VideoFormat,\n  videoMimeType,\n  generateVideo,\n} from './video.js';",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-ts/packages/forge-media/src/speech.ts",
      "sha256": "c66d2fa660ef195bd89a1a2a079a39bfb9c7e6c769c37a749db18823645c9b44",
      "artifactSha256": "29a94114800f08f28ef20a9b261c02af923ef3c64b6b7fb56478225f933ed7c3",
      "url": "/reference/source/forge-ts/packages/forge-media/src/speech.ts.txt",
      "declarations": [
        {
          "name": "export const AudioFormat = {",
          "line": 15,
          "signature": "export const AudioFormat /* type inferred in source */;",
          "documentation": "Supported audio output formats."
        },
        {
          "name": "AudioFormat",
          "line": 23,
          "signature": "export type AudioFormat = (typeof AudioFormat)[keyof typeof AudioFormat];",
          "documentation": "Audio format type."
        },
        {
          "name": "audioMimeType",
          "line": 31,
          "signature": "export function audioMimeType(format: AudioFormat): string;",
          "documentation": "Returns the MIME type for an audio format."
        },
        {
          "name": "SpeechOptions",
          "line": 43,
          "signature": "export interface SpeechOptions {\n  /** Voice identifier (provider-specific). */\n  readonly voice?: string;\n  /** Speech speed multiplier. 1.0 is normal speed. */\n  readonly speed?: number;\n  /** Output audio format. Defaults to MP3. */\n  readonly format?: AudioFormat;\n}",
          "documentation": "Options for speech synthesis."
        },
        {
          "name": "SpeechResult",
          "line": 55,
          "signature": "export interface SpeechResult {\n  /** The raw audio data as a Uint8Array. */\n  readonly audio: Uint8Array;\n  /** The MIME type of the generated audio. */\n  readonly mimeType: string;\n  /** Duration of the audio in seconds, if known. */\n  readonly durationSeconds?: number;\n}",
          "documentation": "The result of a speech synthesis operation."
        },
        {
          "name": "SpeechProvider",
          "line": 81,
          "signature": "export interface SpeechProvider {\n  /** Returns the model identifier. */\n  modelId(): string;\n  /** Returns the provider name. */\n  providerName(): string;\n\n  /**\n   * Synthesizes speech from text.\n   *\n   * @param text - The text to convert to speech.\n   * @param options - Optional synthesis parameters.\n   * @returns The generated speech result.\n   * @throws {ForgeMediaError} If synthesis fails.\n   */\n  speak(text: string, options?: SpeechOptions): Promise<SpeechResult>;\n}",
          "documentation": "Interface for speech synthesis providers.\n\nImplementors connect to a TTS model (e.g., OpenAI TTS, Google Cloud TTS,\nElevenLabs) and produce audio from text."
        },
        {
          "name": "speak",
          "line": 115,
          "signature": "export async function speak(\n  provider: SpeechProvider,\n  text: string,\n  options?: SpeechOptions\n): Promise<SpeechResult>;",
          "documentation": "Synthesizes speech from text using the given provider."
        }
      ]
    },
    {
      "path": "forge-ts/packages/forge-media/src/transcription.ts",
      "sha256": "7be0cbc6e1d295993b410f0d6055173a101fd9b374078fef6497c095258ea0e3",
      "artifactSha256": "1caebd78728062e46e1441077505be2947dd06a8c0152404d65079634f513f2b",
      "url": "/reference/source/forge-ts/packages/forge-media/src/transcription.ts.txt",
      "declarations": [
        {
          "name": "TranscriptionSegment",
          "line": 15,
          "signature": "export interface TranscriptionSegment {\n  /** Start time of the segment in seconds. */\n  readonly start: number;\n  /** End time of the segment in seconds. */\n  readonly end: number;\n  /** The transcribed text for this segment. */\n  readonly text: string;\n}",
          "documentation": "A segment of transcribed audio with timing information."
        },
        {
          "name": "TranscriptionOptions",
          "line": 27,
          "signature": "export interface TranscriptionOptions {\n  /** Language hint (ISO 639-1 code, e.g., 'en', 'fr', 'de'). */\n  readonly language?: string;\n  /** Prompt hint to guide the transcription model. */\n  readonly prompt?: string;\n}",
          "documentation": "Options for audio transcription."
        },
        {
          "name": "TranscriptionResult",
          "line": 37,
          "signature": "export interface TranscriptionResult {\n  /** The full transcribed text. */\n  readonly text: string;\n  /** The detected or specified language. */\n  readonly language?: string;\n  /** Duration of the audio in seconds, if known. */\n  readonly durationSeconds?: number;\n  /** Word-level or sentence-level timing segments. */\n  readonly segments: readonly TranscriptionSegment[];\n}",
          "documentation": "The result of an audio transcription operation."
        },
        {
          "name": "TranscriptionProvider",
          "line": 65,
          "signature": "export interface TranscriptionProvider {\n  /** Returns the model identifier. */\n  modelId(): string;\n  /** Returns the provider name. */\n  providerName(): string;\n\n  /**\n   * Transcribes audio to text.\n   *\n   * @param audio - The raw audio data.\n   * @param options - Optional transcription parameters.\n   * @returns The transcription result.\n   * @throws {ForgeMediaError} If transcription fails.\n   */\n  transcribe(audio: Uint8Array, options?: TranscriptionOptions): Promise<TranscriptionResult>;\n}",
          "documentation": "Interface for audio transcription providers.\n\nImplementors connect to a STT model (e.g., OpenAI Whisper, Google Cloud STT,\nDeepgram) and produce text from audio."
        },
        {
          "name": "transcribe",
          "line": 97,
          "signature": "export async function transcribe(\n  provider: TranscriptionProvider,\n  audio: Uint8Array,\n  options?: TranscriptionOptions\n): Promise<TranscriptionResult>;",
          "documentation": "Transcribes audio using the given provider."
        }
      ]
    },
    {
      "path": "forge-ts/packages/forge-media/src/video.ts",
      "sha256": "f0302437dff6d685767c7c0dcc1e0a515f511f5b504274bd88c16f4907d36f47",
      "artifactSha256": "482a5b6e35feb8f991a9a13cb5ed2edb13fa162388765274e0f7f608fa33f2f2",
      "url": "/reference/source/forge-ts/packages/forge-media/src/video.ts.txt",
      "declarations": [
        {
          "name": "export const VideoFormat = {",
          "line": 15,
          "signature": "export const VideoFormat /* type inferred in source */;",
          "documentation": "Supported video output formats."
        },
        {
          "name": "VideoFormat",
          "line": 21,
          "signature": "export type VideoFormat = (typeof VideoFormat)[keyof typeof VideoFormat];",
          "documentation": "Video format type."
        },
        {
          "name": "videoMimeType",
          "line": 29,
          "signature": "export function videoMimeType(format: VideoFormat): string;",
          "documentation": "Returns the MIME type for a video format."
        },
        {
          "name": "VideoOptions",
          "line": 39,
          "signature": "export interface VideoOptions {\n  /** Video width in pixels. */\n  readonly width?: number;\n  /** Video height in pixels. */\n  readonly height?: number;\n  /** Duration of the video in seconds. */\n  readonly durationSeconds?: number;\n  /** Output format. Defaults to MP4. */\n  readonly format?: VideoFormat;\n}",
          "documentation": "Options for video generation."
        },
        {
          "name": "VideoResult",
          "line": 53,
          "signature": "export interface VideoResult {\n  /** The raw video data as a Uint8Array. */\n  readonly data: Uint8Array;\n  /** The MIME type of the generated video. */\n  readonly mimeType: string;\n  /** Duration of the generated video in seconds. */\n  readonly durationSeconds: number;\n  /** The width of the generated video in pixels. */\n  readonly width: number;\n  /** The height of the generated video in pixels. */\n  readonly height: number;\n}",
          "documentation": "The result of a video generation operation."
        },
        {
          "name": "VideoProvider",
          "line": 83,
          "signature": "export interface VideoProvider {\n  /** Returns the model identifier. */\n  modelId(): string;\n  /** Returns the provider name. */\n  providerName(): string;\n\n  /**\n   * Generates a video from a text prompt.\n   *\n   * @param prompt - The text description of the desired video.\n   * @param options - Optional generation parameters.\n   * @returns The generated video result.\n   * @throws {ForgeMediaError} If generation fails.\n   */\n  generateVideo(prompt: string, options?: VideoOptions): Promise<VideoResult>;\n}",
          "documentation": "Interface for video generation providers.\n\nImplementors connect to a video generation model (e.g., Runway, Pika,\nSora) and produce video from text prompts."
        },
        {
          "name": "generateVideo",
          "line": 117,
          "signature": "export async function generateVideo(\n  provider: VideoProvider,\n  prompt: string,\n  options?: VideoOptions\n): Promise<VideoResult>;",
          "documentation": "Generates a video using the given provider."
        }
      ]
    }
  ]
}
