{"version":3,"sources":["../src/client.ts","../src/resources/text-to-video.ts","../src/contract_gen.ts","../src/resources/image-to-video.ts","../src/resources/text-to-image.ts","../src/resources/segment-map.ts","../src/resources/edit-image.ts","../src/resources/extensions.ts","../src/resources/upscales.ts","../src/index.ts"],"sourcesContent":["import { BaseClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToVideo } from './resources/text-to-video';\nimport { ImageToVideo } from './resources/image-to-video';\nimport { TextToImage } from './resources/text-to-image';\nimport { SegmentMap } from './resources/segment-map';\nimport { EditImage } from './resources/edit-image';\nimport { Extensions } from './resources/extensions';\nimport { Upscales } from './resources/upscales';\n\n/**\n * Grok-Imagine multimodal generation API client.\n *\n * Image generation, video generation, image editing, video extension,\n * and video upscaling.\n *\n * @example\n * ```typescript\n * const client = new GrokImagineClient({\n *   apiKey: 'your-api-key',\n *   baseUrl: 'https://runapi.ai',\n * });\n *\n * const result = await client.textToVideo.run({\n *   model: 'grok-imagine-text-to-video',\n *   prompt: 'A drone shot over a neon cityscape at night',\n *   output_resolution: '720p',\n * });\n * ```\n */\nexport class GrokImagineClient extends BaseClient {\n  /** Text-to-video generation. */\n  public readonly textToVideo: TextToVideo;\n  /** Image-to-video generation (external URLs or prior text-to-image task). */\n  public readonly imageToVideo: ImageToVideo;\n  /** Text-to-image generation. */\n  public readonly textToImage: TextToImage;\n  /** Segment-map generation from an Image 2.0 text-to-image task. */\n  public readonly segmentMap: SegmentMap;\n  /** Prompt-guided image editing. */\n  public readonly editImage: EditImage;\n  /** Extend a previously generated video. */\n  public readonly extensions: Extensions;\n  /** Upscale a previously generated video. */\n  public readonly upscales: Upscales;\n\n  constructor(options: ClientOptions = {}) {\n    super(options);\n    this.textToVideo = new TextToVideo(this.http);\n    this.imageToVideo = new ImageToVideo(this.http);\n    this.textToImage = new TextToImage(this.http);\n    this.segmentMap = new SegmentMap(this.http);\n    this.editImage = new EditImage(this.http);\n    this.extensions = new Extensions(this.http);\n    this.upscales = new Upscales(this.http);\n  }\n}\n","import type { ActionSchema, HttpClient, PollingOptions, RequestOptions } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type {\n  CompletedGrokImagineVideoResponse,\n  GrokImagineTextToVideoParams,\n  GrokImagineVideoResponse,\n  TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/grok_imagine/text_to_video';\n\n/** Generates videos from text prompts with configurable aspect ratio, duration, and resolution. */\nexport class TextToVideo {\n  constructor(private readonly http: HttpClient) {}\n\n  /**\n   * Generate a video and wait until complete.\n   * @param params Text-to-video parameters.\n   * @param options Per-request and polling overrides.\n   * @returns The completed video with results.\n   */\n  async run(\n    params: GrokImagineTextToVideoParams,\n    options?: RequestOptions & PollingOptions\n  ): Promise<CompletedGrokImagineVideoResponse> {\n    const { id } = await this.create(params, options);\n    const response = await pollUntilComplete<GrokImagineVideoResponse>(() => this.get(id, options), {\n      maxWaitMs: options?.maxWaitMs,\n      pollIntervalMs: options?.pollIntervalMs,\n    });\n    return response as CompletedGrokImagineVideoResponse;\n  }\n\n  /**\n   * Create a text-to-video task; returns immediately with a task id.\n   * @param params Text-to-video parameters.\n   * @param options Per-request overrides.\n   * @returns The task creation result with id.\n   */\n  async create(params: GrokImagineTextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n    const body = compactParams(params);\n    validateParams(contract['text-to-video'] as ActionSchema, body as Record<string, unknown>);\n    return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n      body,\n      ...options,\n    });\n  }\n\n  /**\n   * Fetch the current status of a text-to-video task.\n   * @param id The task id.\n   * @param options Per-request overrides.\n   * @returns The current video task status.\n   */\n  async get(id: string, options?: RequestOptions): Promise<GrokImagineVideoResponse> {\n    return this.http.request<GrokImagineVideoResponse>('GET', `${ENDPOINT}/${id}`, options ?? {});\n  }\n}\n","export const contract = {\n  \"edit-image\": {\n    \"models\": [\n      \"grok-imagine-edit-image\",\n      \"grok-imagine-image-2-0\"\n    ],\n    \"fields_by_model\": {\n      \"grok-imagine-edit-image\": {\n        \"model\": {\n          \"required\": true\n        },\n        \"source_image_url\": {\n          \"required\": true\n        }\n      },\n      \"grok-imagine-image-2-0\": {\n        \"aspect_ratio\": {\n          \"enum\": [\n            \"1:1\",\n            \"2:3\",\n            \"3:2\",\n            \"16:9\",\n            \"9:16\",\n            \"auto\"\n          ],\n          \"required\": true\n        },\n        \"model\": {\n          \"required\": true\n        },\n        \"prompt\": {\n          \"max\": 390000,\n          \"length\": true\n        },\n        \"source_image_urls\": {\n          \"required\": true,\n          \"min_items\": 1,\n          \"max_items\": 5\n        }\n      }\n    },\n    \"rules\": [\n      {\n        \"when\": {\n          \"model\": \"grok-imagine-edit-image\"\n        },\n        \"forbidden\": [\n          \"source_task_id\",\n          \"mask_indices\",\n          \"source_image_urls\",\n          \"aspect_ratio\"\n        ]\n      },\n      {\n        \"when\": {\n          \"model\": \"grok-imagine-image-2-0\"\n        },\n        \"forbidden\": [\n          \"source_image_url\",\n          \"source_task_id\",\n          \"mask_indices\",\n          \"enable_safety_checker\"\n        ]\n      }\n    ]\n  },\n  \"extend\": {\n    \"models\": [],\n    \"fields_by_model\": {\n      \"_\": {\n        \"extension_duration_seconds\": {\n          \"enum\": [\n            6,\n            10\n          ],\n          \"required\": true,\n          \"type\": \"integer\"\n        },\n        \"prompt\": {\n          \"required\": true,\n          \"max\": 5000,\n          \"length\": true\n        },\n        \"source_task_id\": {\n          \"required\": true\n        },\n        \"start_seconds\": {\n          \"required\": true,\n          \"min\": 0,\n          \"type\": \"integer\"\n        }\n      }\n    }\n  },\n  \"image-to-video\": {\n    \"models\": [\n      \"grok-imagine-image-to-video\",\n      \"grok-imagine-video-1.5-fast\",\n      \"grok-imagine-video-1.5-preview\"\n    ],\n    \"fields_by_model\": {\n      \"grok-imagine-image-to-video\": {\n        \"aspect_ratio\": {\n          \"enum\": [\n            \"2:3\",\n            \"3:2\",\n            \"1:1\",\n            \"16:9\",\n            \"9:16\"\n          ]\n        },\n        \"duration_seconds\": {\n          \"min\": 6,\n          \"max\": 30,\n          \"type\": \"integer\"\n        },\n        \"index\": {\n          \"min\": 0,\n          \"max\": 5,\n          \"type\": \"integer\"\n        },\n        \"model\": {\n          \"required\": true\n        },\n        \"motion_style\": {\n          \"enum\": [\n            \"fun\",\n            \"normal\",\n            \"spicy\"\n          ]\n        },\n        \"output_resolution\": {\n          \"enum\": [\n            \"480p\",\n            \"720p\"\n          ]\n        },\n        \"prompt\": {\n          \"max\": 5000,\n          \"length\": true\n        }\n      },\n      \"grok-imagine-video-1.5-fast\": {\n        \"aspect_ratio\": {\n          \"enum\": [\n            \"1:1\",\n            \"16:9\",\n            \"9:16\",\n            \"3:2\",\n            \"2:3\"\n          ]\n        },\n        \"duration_seconds\": {\n          \"min\": 1,\n          \"max\": 30,\n          \"type\": \"integer\"\n        },\n        \"index\": {\n          \"type\": \"integer\"\n        },\n        \"model\": {\n          \"required\": true\n        },\n        \"output_resolution\": {\n          \"enum\": [\n            \"480p\",\n            \"720p\"\n          ]\n        },\n        \"prompt\": {\n          \"max\": 5000,\n          \"length\": true\n        },\n        \"source_image_url\": {\n          \"required\": true\n        }\n      },\n      \"grok-imagine-video-1.5-preview\": {\n        \"aspect_ratio\": {\n          \"enum\": [\n            \"1:1\",\n            \"16:9\",\n            \"9:16\",\n            \"3:2\",\n            \"2:3\",\n            \"auto\"\n          ]\n        },\n        \"duration_seconds\": {\n          \"min\": 1,\n          \"max\": 15,\n          \"type\": \"integer\"\n        },\n        \"index\": {\n          \"type\": \"integer\"\n        },\n        \"model\": {\n          \"required\": true\n        },\n        \"output_resolution\": {\n          \"enum\": [\n            \"480p\",\n            \"720p\",\n            \"1080p\"\n          ]\n        },\n        \"prompt\": {\n          \"min\": 1,\n          \"max\": 4096,\n          \"length\": true\n        },\n        \"reference_image_urls\": {\n          \"max_items\": 6\n        },\n        \"source_image_url\": {\n          \"required\": true\n        }\n      }\n    },\n    \"rules\": [\n      {\n        \"when\": {\n          \"model\": \"grok-imagine-image-to-video\"\n        },\n        \"forbidden\": [\n          \"reference_image_urls\"\n        ]\n      },\n      {\n        \"when\": {\n          \"model\": \"grok-imagine-video-1.5-fast\"\n        },\n        \"forbidden\": [\n          \"source_task_id\",\n          \"index\",\n          \"motion_style\",\n          \"enable_safety_checker\"\n        ]\n      },\n      {\n        \"when\": {\n          \"model\": \"grok-imagine-video-1.5-preview\"\n        },\n        \"forbidden\": [\n          \"source_task_id\",\n          \"index\",\n          \"motion_style\",\n          \"enable_safety_checker\"\n        ]\n      }\n    ]\n  },\n  \"segment-map\": {\n    \"models\": [\n      \"grok-imagine-image-2-0\"\n    ],\n    \"fields_by_model\": {\n      \"grok-imagine-image-2-0\": {\n        \"model\": {\n          \"required\": true\n        }\n      }\n    },\n    \"rules\": [\n      {\n        \"required_any\": [\n          \"image_url\",\n          \"source_task_id\"\n        ]\n      },\n      {\n        \"when\": {\n          \"image_url\": {\n            \"present\": true\n          }\n        },\n        \"forbidden\": [\n          \"source_task_id\"\n        ]\n      },\n      {\n        \"when\": {\n          \"source_task_id\": {\n            \"present\": true\n          }\n        },\n        \"forbidden\": [\n          \"image_url\"\n        ]\n      }\n    ]\n  },\n  \"text-to-image\": {\n    \"models\": [\n      \"grok-imagine-image-2-0\",\n      \"grok-imagine-text-to-image\"\n    ],\n    \"fields_by_model\": {\n      \"grok-imagine-image-2-0\": {\n        \"aspect_ratio\": {\n          \"enum\": [\n            \"1:1\",\n            \"2:3\",\n            \"3:2\",\n            \"16:9\",\n            \"9:16\"\n          ],\n          \"required\": true\n        },\n        \"model\": {\n          \"required\": true\n        },\n        \"prompt\": {\n          \"required\": true\n        }\n      },\n      \"grok-imagine-text-to-image\": {\n        \"aspect_ratio\": {\n          \"enum\": [\n            \"2:3\",\n            \"3:2\",\n            \"1:1\",\n            \"16:9\",\n            \"9:16\"\n          ]\n        },\n        \"model\": {\n          \"required\": true\n        },\n        \"prompt\": {\n          \"required\": true,\n          \"max\": 5000,\n          \"length\": true\n        }\n      }\n    },\n    \"rules\": [\n      {\n        \"when\": {\n          \"model\": \"grok-imagine-image-2-0\"\n        },\n        \"forbidden\": [\n          \"enable_safety_checker\",\n          \"enable_pro\"\n        ]\n      }\n    ]\n  },\n  \"text-to-video\": {\n    \"models\": [\n      \"grok-imagine-text-to-video\",\n      \"grok-imagine-video-1.5-fast\",\n      \"grok-imagine-video-1.5-preview\"\n    ],\n    \"fields_by_model\": {\n      \"grok-imagine-text-to-video\": {\n        \"aspect_ratio\": {\n          \"enum\": [\n            \"2:3\",\n            \"3:2\",\n            \"1:1\",\n            \"16:9\",\n            \"9:16\"\n          ]\n        },\n        \"duration_seconds\": {\n          \"min\": 6,\n          \"max\": 30,\n          \"type\": \"integer\"\n        },\n        \"model\": {\n          \"required\": true\n        },\n        \"motion_style\": {\n          \"enum\": [\n            \"fun\",\n            \"normal\",\n            \"spicy\"\n          ]\n        },\n        \"output_resolution\": {\n          \"enum\": [\n            \"480p\",\n            \"720p\"\n          ]\n        },\n        \"prompt\": {\n          \"required\": true,\n          \"max\": 5000,\n          \"length\": true\n        }\n      },\n      \"grok-imagine-video-1.5-fast\": {\n        \"aspect_ratio\": {\n          \"enum\": [\n            \"1:1\",\n            \"16:9\",\n            \"9:16\",\n            \"3:2\",\n            \"2:3\"\n          ]\n        },\n        \"duration_seconds\": {\n          \"min\": 1,\n          \"max\": 30,\n          \"type\": \"integer\"\n        },\n        \"model\": {\n          \"required\": true\n        },\n        \"output_resolution\": {\n          \"enum\": [\n            \"480p\",\n            \"720p\"\n          ]\n        },\n        \"prompt\": {\n          \"required\": true,\n          \"max\": 5000,\n          \"length\": true\n        }\n      },\n      \"grok-imagine-video-1.5-preview\": {\n        \"aspect_ratio\": {\n          \"enum\": [\n            \"1:1\",\n            \"16:9\",\n            \"9:16\",\n            \"3:2\",\n            \"2:3\",\n            \"auto\"\n          ]\n        },\n        \"duration_seconds\": {\n          \"min\": 1,\n          \"max\": 15,\n          \"type\": \"integer\"\n        },\n        \"model\": {\n          \"required\": true\n        },\n        \"output_resolution\": {\n          \"enum\": [\n            \"480p\",\n            \"720p\",\n            \"1080p\"\n          ]\n        },\n        \"prompt\": {\n          \"required\": true,\n          \"min\": 1,\n          \"max\": 4096,\n          \"length\": true\n        },\n        \"reference_image_urls\": {\n          \"max_items\": 7\n        }\n      }\n    },\n    \"rules\": [\n      {\n        \"when\": {\n          \"model\": \"grok-imagine-text-to-video\"\n        },\n        \"forbidden\": [\n          \"reference_image_urls\"\n        ]\n      },\n      {\n        \"when\": {\n          \"model\": \"grok-imagine-video-1.5-fast\"\n        },\n        \"forbidden\": [\n          \"motion_style\",\n          \"enable_safety_checker\"\n        ]\n      },\n      {\n        \"when\": {\n          \"model\": \"grok-imagine-video-1.5-preview\"\n        },\n        \"forbidden\": [\n          \"motion_style\",\n          \"enable_safety_checker\"\n        ]\n      }\n    ]\n  },\n  \"upscale-image\": {\n    \"models\": [],\n    \"fields_by_model\": {\n      \"_\": {\n        \"source_task_id\": {\n          \"required\": true\n        }\n      }\n    }\n  }\n} as const;\n","import type { ActionSchema, HttpClient, PollingOptions, RequestOptions } from '@runapi.ai/core';\nimport { compactParams, validateParams, ValidationError } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type {\n  CompletedGrokImagineVideoResponse,\n  GrokImagineImageToVideoParams,\n  GrokImagineVideoResponse,\n  TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/grok_imagine/image_to_video';\n\n/** Generates videos from reference images or a prior text-to-image task. */\nexport class ImageToVideo {\n  constructor(private readonly http: HttpClient) {}\n\n  /**\n   * Generate a video and wait until complete.\n   * @param params Image-to-video parameters.\n   * @param options Per-request and polling overrides.\n   * @returns The completed video with results.\n   */\n  async run(\n    params: GrokImagineImageToVideoParams,\n    options?: RequestOptions & PollingOptions\n  ): Promise<CompletedGrokImagineVideoResponse> {\n    const { id } = await this.create(params, options);\n    const response = await pollUntilComplete<GrokImagineVideoResponse>(() => this.get(id, options), {\n      maxWaitMs: options?.maxWaitMs,\n      pollIntervalMs: options?.pollIntervalMs,\n    });\n    return response as CompletedGrokImagineVideoResponse;\n  }\n\n  /**\n   * Create an image-to-video task; returns immediately with a task id.\n   * @param params Image-to-video parameters.\n   * @param options Per-request overrides.\n   * @returns The task creation result with id.\n   */\n  async create(params: GrokImagineImageToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n    const input = params as unknown as Record<string, unknown>;\n    if (input.motion_style === 'spicy' && input.source_image_url) {\n      throw new ValidationError('spicy motion_style requires a source_task_id source image.');\n    }\n\n    const body = compactParams(params);\n    validateParams(contract['image-to-video'] as ActionSchema, body as Record<string, unknown>);\n    return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n      body,\n      ...options,\n    });\n  }\n\n  /**\n   * Fetch the current status of an image-to-video task.\n   * @param id The task id.\n   * @param options Per-request overrides.\n   * @returns The current video task status.\n   */\n  async get(id: string, options?: RequestOptions): Promise<GrokImagineVideoResponse> {\n    return this.http.request<GrokImagineVideoResponse>('GET', `${ENDPOINT}/${id}`, options ?? {});\n  }\n}\n","import type { ActionSchema, HttpClient, PollingOptions, RequestOptions } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type {\n  CompletedGrokImagineImageResponse,\n  GrokImagineImageResponse,\n  GrokImagineTextToImageParams,\n  TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/grok_imagine/text_to_image';\n\n/** Generates images from text prompts. */\nexport class TextToImage {\n  constructor(private readonly http: HttpClient) {}\n\n  /**\n   * Generate an image and wait until complete.\n   * @param params Text-to-image parameters.\n   * @param options Per-request and polling overrides.\n   * @returns The completed image with results.\n   */\n  async run(\n    params: GrokImagineTextToImageParams,\n    options?: RequestOptions & PollingOptions\n  ): Promise<CompletedGrokImagineImageResponse> {\n    const { id } = await this.create(params, options);\n    const response = await pollUntilComplete<GrokImagineImageResponse>(() => this.get(id, options), {\n      maxWaitMs: options?.maxWaitMs,\n      pollIntervalMs: options?.pollIntervalMs,\n    });\n    return response as CompletedGrokImagineImageResponse;\n  }\n\n  /**\n   * Create a text-to-image task; returns immediately with a task id.\n   * @param params Text-to-image parameters.\n   * @param options Per-request overrides.\n   * @returns The task creation result with id.\n   */\n  async create(params: GrokImagineTextToImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n    const body = compactParams(params);\n    validateParams(contract['text-to-image'] as ActionSchema, body as Record<string, unknown>);\n    return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n      body,\n      ...options,\n    });\n  }\n\n  /**\n   * Fetch the current status of a text-to-image task.\n   * @param id The task id.\n   * @param options Per-request overrides.\n   * @returns The current image task status.\n   */\n  async get(id: string, options?: RequestOptions): Promise<GrokImagineImageResponse> {\n    return this.http.request<GrokImagineImageResponse>('GET', `${ENDPOINT}/${id}`, options ?? {});\n  }\n}\n","import type { ActionSchema, HttpClient, PollingOptions, RequestOptions } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type {\n  CompletedGrokImagineSegmentMapResponse,\n  GrokImagineSegmentMapResponse,\n  GrokImagineSegmentMapParams,\n  TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/grok_imagine/segment_map';\n\n/** Creates an editable segmentation map from a public image URL. */\nexport class SegmentMap {\n  constructor(private readonly http: HttpClient) {}\n\n  async run(\n    params: GrokImagineSegmentMapParams,\n    options?: RequestOptions & PollingOptions\n  ): Promise<CompletedGrokImagineSegmentMapResponse> {\n    const { id } = await this.create(params, options);\n    const response = await pollUntilComplete<GrokImagineSegmentMapResponse>(() => this.get(id, options), {\n      maxWaitMs: options?.maxWaitMs,\n      pollIntervalMs: options?.pollIntervalMs,\n    });\n    return response as CompletedGrokImagineSegmentMapResponse;\n  }\n\n  async create(params: GrokImagineSegmentMapParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n    const body = compactParams(params);\n    validateParams(contract['segment-map'] as ActionSchema, body as Record<string, unknown>);\n    return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n      body,\n      ...options,\n    });\n  }\n\n  async get(id: string, options?: RequestOptions): Promise<GrokImagineSegmentMapResponse> {\n    return this.http.request<GrokImagineSegmentMapResponse>('GET', `${ENDPOINT}/${id}`, options ?? {});\n  }\n}\n","import type { ActionSchema, HttpClient, PollingOptions, RequestOptions } from '@runapi.ai/core';\nimport { compactParams, validateParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport { contract } from '../contract_gen';\nimport type {\n  CompletedGrokImagineImageResponse,\n  GrokImagineEditImageParams,\n  GrokImagineImageResponse,\n  TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/grok_imagine/edit_image';\n\n/** Applies prompt-guided edits to a source image. */\nexport class EditImage {\n  constructor(private readonly http: HttpClient) {}\n\n  /**\n   * Edit an image and wait until complete.\n   * @param params Image edit parameters.\n   * @param options Per-request and polling overrides.\n   * @returns The completed edit with images.\n   */\n  async run(\n    params: GrokImagineEditImageParams,\n    options?: RequestOptions & PollingOptions\n  ): Promise<CompletedGrokImagineImageResponse> {\n    const { id } = await this.create(params, options);\n    const response = await pollUntilComplete<GrokImagineImageResponse>(() => this.get(id, options), {\n      maxWaitMs: options?.maxWaitMs,\n      pollIntervalMs: options?.pollIntervalMs,\n    });\n    return response as CompletedGrokImagineImageResponse;\n  }\n\n  /**\n   * Create an image edit task; returns immediately with a task id.\n   * @param params Image edit parameters.\n   * @param options Per-request overrides.\n   * @returns The task creation result with id.\n   */\n  async create(params: GrokImagineEditImageParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n    const body = compactParams(params);\n    validateParams(contract['edit-image'] as ActionSchema, body as Record<string, unknown>);\n    return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n      body,\n      ...options,\n    });\n  }\n\n  /**\n   * Fetch the current status of an image edit task.\n   * @param id The task id.\n   * @param options Per-request overrides.\n   * @returns The current image task status.\n   */\n  async get(id: string, options?: RequestOptions): Promise<GrokImagineImageResponse> {\n    return this.http.request<GrokImagineImageResponse>('GET', `${ENDPOINT}/${id}`, options ?? {});\n  }\n}\n","import type { HttpClient, PollingOptions, RequestOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport type {\n  CompletedGrokImagineVideoResponse,\n  GrokImagineExtendParams,\n  GrokImagineVideoResponse,\n  TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/grok_imagine/extend_video';\n\n/** Appends new footage to a previously generated video from a chosen timestamp. */\nexport class Extensions {\n  constructor(private readonly http: HttpClient) {}\n\n  /**\n   * Extend a video and wait until complete.\n   * @param params Video extension parameters.\n   * @param options Per-request and polling overrides.\n   * @returns The completed video with results.\n   */\n  async run(\n    params: GrokImagineExtendParams,\n    options?: RequestOptions & PollingOptions\n  ): Promise<CompletedGrokImagineVideoResponse> {\n    const { id } = await this.create(params, options);\n    const response = await pollUntilComplete<GrokImagineVideoResponse>(() => this.get(id, options), {\n      maxWaitMs: options?.maxWaitMs,\n      pollIntervalMs: options?.pollIntervalMs,\n    });\n    return response as CompletedGrokImagineVideoResponse;\n  }\n\n  /**\n   * Create a video extension task; returns immediately with a task id.\n   * @param params Video extension parameters.\n   * @param options Per-request overrides.\n   * @returns The task creation result with id.\n   */\n  async create(params: GrokImagineExtendParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n    return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n      body: compactParams(params),\n      ...options,\n    });\n  }\n\n  /**\n   * Fetch the current status of a video extension task.\n   * @param id The task id.\n   * @param options Per-request overrides.\n   * @returns The current video task status.\n   */\n  async get(id: string, options?: RequestOptions): Promise<GrokImagineVideoResponse> {\n    return this.http.request<GrokImagineVideoResponse>('GET', `${ENDPOINT}/${id}`, options ?? {});\n  }\n}\n","import type { HttpClient, PollingOptions, RequestOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport type {\n  CompletedGrokImagineVideoResponse,\n  GrokImagineUpscaleParams,\n  GrokImagineVideoResponse,\n  TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/grok_imagine/upscale_image';\n\n/** Upscales a previously generated image to higher resolution. */\nexport class Upscales {\n  constructor(private readonly http: HttpClient) {}\n\n  /**\n   * Upscale an image and wait until complete.\n   * @param params Upscale parameters.\n   * @param options Per-request and polling overrides.\n   * @returns The completed upscale with results.\n   */\n  async run(\n    params: GrokImagineUpscaleParams,\n    options?: RequestOptions & PollingOptions\n  ): Promise<CompletedGrokImagineVideoResponse> {\n    const { id } = await this.create(params, options);\n    const response = await pollUntilComplete<GrokImagineVideoResponse>(() => this.get(id, options), {\n      maxWaitMs: options?.maxWaitMs,\n      pollIntervalMs: options?.pollIntervalMs,\n    });\n    return response as CompletedGrokImagineVideoResponse;\n  }\n\n  /**\n   * Create an upscale task; returns immediately with a task id.\n   * @param params Upscale parameters.\n   * @param options Per-request overrides.\n   * @returns The task creation result with id.\n   */\n  async create(params: GrokImagineUpscaleParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n    return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n      body: compactParams(params),\n      ...options,\n    });\n  }\n\n  /**\n   * Fetch the current status of an upscale task.\n   * @param id The task id.\n   * @param options Per-request overrides.\n   * @returns The current upscale task status.\n   */\n  async get(id: string, options?: RequestOptions): Promise<GrokImagineVideoResponse> {\n    return this.http.request<GrokImagineVideoResponse>('GET', `${ENDPOINT}/${id}`, options ?? {});\n  }\n}\n","export { GrokImagineClient } from './client';\nexport * from './types';\n\nexport {\n  RunApiError,\n  AuthenticationError,\n  InsufficientCreditsError,\n  NotFoundError,\n  ValidationError,\n  RateLimitError,\n  ServiceUnavailableError,\n  NetworkError,\n  TimeoutError,\n  TaskTimeoutError,\n  TaskFailedError,\n} from '@runapi.ai/core';\n"],"mappings":";AAAA,SAAS,kBAAsC;;;ACC/C,SAAS,eAAe,sBAAsB;AAC9C,SAAS,yBAAyB;;;ACF3B,IAAM,WAAW;AAAA,EACtB,cAAc;AAAA,IACZ,UAAU;AAAA,MACR;AAAA,MACA;AAAA,IACF;AAAA,IACA,mBAAmB;AAAA,MACjB,2BAA2B;AAAA,QACzB,SAAS;AAAA,UACP,YAAY;AAAA,QACd;AAAA,QACA,oBAAoB;AAAA,UAClB,YAAY;AAAA,QACd;AAAA,MACF;AAAA,MACA,0BAA0B;AAAA,QACxB,gBAAgB;AAAA,UACd,QAAQ;AAAA,YACN;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,UACA,YAAY;AAAA,QACd;AAAA,QACA,SAAS;AAAA,UACP,YAAY;AAAA,QACd;AAAA,QACA,UAAU;AAAA,UACR,OAAO;AAAA,UACP,UAAU;AAAA,QACZ;AAAA,QACA,qBAAqB;AAAA,UACnB,YAAY;AAAA,UACZ,aAAa;AAAA,UACb,aAAa;AAAA,QACf;AAAA,MACF;AAAA,IACF;AAAA,IACA,SAAS;AAAA,MACP;AAAA,QACE,QAAQ;AAAA,UACN,SAAS;AAAA,QACX;AAAA,QACA,aAAa;AAAA,UACX;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,QACE,QAAQ;AAAA,UACN,SAAS;AAAA,QACX;AAAA,QACA,aAAa;AAAA,UACX;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,EACA,UAAU;AAAA,IACR,UAAU,CAAC;AAAA,IACX,mBAAmB;AAAA,MACjB,KAAK;AAAA,QACH,8BAA8B;AAAA,UAC5B,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AEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO;AACb,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAC5C,SAAK,eAAe,IAAI,aAAa,KAAK,IAAI;AAC9C,SAAK,cAAc,IAAI,YAAY,KAAK,IAAI;AAC5C,SAAK,aAAa,IAAI,WAAW,KAAK,IAAI;AAC1C,SAAK,YAAY,IAAI,UAAU,KAAK,IAAI;AACxC,SAAK,aAAa,IAAI,WAAW,KAAK,IAAI;AAC1C,SAAK,WAAW,IAAI,SAAS,KAAK,IAAI;AAAA,EACxC;AACF;;;ASpDA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,mBAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":["compactParams","validateParams","pollUntilComplete","ENDPOINT","pollUntilComplete","compactParams","validateParams","compactParams","validateParams","pollUntilComplete","ENDPOINT","pollUntilComplete","compactParams","validateParams","compactParams","validateParams","pollUntilComplete","ENDPOINT","pollUntilComplete","compactParams","validateParams","compactParams","validateParams","pollUntilComplete","ENDPOINT","pollUntilComplete","compactParams","validateParams","compactParams","pollUntilComplete","ENDPOINT","compactParams","pollUntilComplete","ENDPOINT","ValidationError"]}