codai-sdk 0.72.0 → 0.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -6099,8 +6099,26 @@ type paths$1 = {
6099
6099
  readonly get?: never;
6100
6100
  readonly put?: never;
6101
6101
  /**
6102
- * Create a production (brief → video)
6103
- * @description One brief becomes a finished promo video, server-side: ONE model turn storyboards it on a built-in video starter
6102
+ * Create a production (brief → finished output)
6103
+ * @description One brief becomes a finished output of one of 8 kinds (`kind`, default `video`), server-side. Every kind runs one
6104
+ * bounded plan turn (`codai::production-storyboard`), generates its images or music under one wallet hold, saves an
6105
+ * editable creative and builds the output with the regular Studio builders:
6106
+ *
6107
+ * | kind | plan | output (`outputs[].role` → format) |
6108
+ * |---|---|---|
6109
+ * | `video` | storyboard on a starter | MP4 render (`render_id`), vision review + one repair |
6110
+ * | `image` | headline, subline, image prompt, format (1:1, 4:5 or 9:16) | `image` → PNG |
6111
+ * | `deck` | title + 4–8 slides | `document` → PPTX (16:9) |
6112
+ * | `doc` | title + 4–8 sections | `document` → DOCX (A4) |
6113
+ * | `sheet` | title + columns + 5–20 rows | `document` → XLSX |
6114
+ * | `carousel` | 4–8 slides (4:5) | `pages` → ZIP of PNGs, `cover` → PNG |
6115
+ * | `print` | poster or flyer, A4 or A5 | `pdf` → PDF |
6116
+ * | `audio` | jingle or song, ≤ 60 s (Lyria 3 Clip, not available on EU data-residency keys) | `audio` → MP3 |
6117
+ *
6118
+ * `starter`, `voice`, `narration` and `aspect_ratio` apply to `video` only (`starter` with another kind is a 400).
6119
+ * Non-video kinds have no review/repair step and return `kind`, `output_asset_id` and `outputs`; video responses are
6120
+ * unchanged. For `video`:
6121
+ * one brief becomes a finished promo video: ONE model turn storyboards it on a built-in video starter
6104
6122
  * (copy vars, one image prompt and one narration line per scene), every scene gets a codai-image still and a
6105
6123
  * narration line (in parallel, billed once each under one wallet hold), the result is saved as an editable creative
6106
6124
  * and a draft render is queued. When the render is ready a vision review of one frame per scene may fix text once
@@ -8225,7 +8243,7 @@ type components$1 = {
8225
8243
  * @description Outcome of `referral_code`; `null` when not sent.
8226
8244
  * @enum {string|null}
8227
8245
  */
8228
- readonly referral_result: 'window_closed' | 'none' | 'invalid_code' | 'self' | 'already_referred' | 'flagged' | 'granted' | 'cap_reached' | null;
8246
+ readonly referral_result: 'window_closed' | 'none' | 'invalid_code' | 'self' | 'already_referred' | 'flagged' | 'pending_payment' | 'granted' | 'cap_reached' | null;
8229
8247
  readonly training_opt_out: boolean;
8230
8248
  /** Format: uuid */
8231
8249
  readonly user_id: string;
@@ -16748,14 +16766,22 @@ type components$1 = {
16748
16766
  /** Format: date-time */
16749
16767
  readonly created_at: string;
16750
16768
  readonly creative_id: string | null;
16769
+ /** @description Requested length in seconds (video productions); null when none was requested. */
16770
+ readonly duration_s?: number | null;
16751
16771
  readonly error: string | null;
16752
16772
  readonly first_render_id: string | null;
16753
16773
  /** Format: uuid */
16754
16774
  readonly id: string;
16775
+ /** @description Present only for non-video productions. */
16776
+ readonly kind?: components$1['schemas']['StudioProductionKind'];
16755
16777
  /** @enum {string} */
16756
16778
  readonly language: 'en' | 'ro';
16757
16779
  /** @enum {string} */
16758
16780
  readonly object: 'studio.production';
16781
+ /** @description The primary output (`outputs[0].asset_id`), `null` until `status` is `succeeded`. Present only for non-video productions. */
16782
+ readonly output_asset_id?: string | null;
16783
+ /** @description The built outputs (empty until `status` is `succeeded`). Present only for non-video productions. */
16784
+ readonly outputs?: readonly components$1['schemas']['StudioProductionOutput'][];
16759
16785
  /**
16760
16786
  * @description storyboard → assets → render → qa → repair (at most once) → ready | failed.
16761
16787
  * @enum {string}
@@ -16782,15 +16808,18 @@ type components$1 = {
16782
16808
  /** Studio production request */
16783
16809
  readonly StudioProductionCreate: {
16784
16810
  /**
16785
- * @description Output format.
16811
+ * @description Output format (`video` only; the other kinds pick their own format).
16786
16812
  * @default 16:9
16787
16813
  * @enum {string}
16788
16814
  */
16789
16815
  readonly aspect_ratio?: '16:9' | '9:16' | '1:1';
16790
- /** @description What the video should say: product, audience, tone, call to action (10–2,000 characters). */
16816
+ /** @description What the output should say: product, audience, tone, call to action (10–2,000 characters). */
16791
16817
  readonly brief: string;
16792
16818
  /** @description Spending cap for the whole production in micro-USD (default 3,000,000, max 20,000,000). */
16793
16819
  readonly budget_micro_usd?: number;
16820
+ /** @description Target length in seconds (`video` only). The storyboard and voice-over are planned for it and the scenes stretch to reach it; default: the starter's natural length (about 15–30 s). With another kind it is a 400. */
16821
+ readonly duration_s?: number;
16822
+ readonly kind?: components$1['schemas']['StudioProductionKind'];
16794
16823
  /**
16795
16824
  * @description Language of the copy and the voice-over (and of the starters the model chooses from).
16796
16825
  * @default ro
@@ -16798,17 +16827,35 @@ type components$1 = {
16798
16827
  */
16799
16828
  readonly language?: 'en' | 'ro';
16800
16829
  /**
16801
- * @description Add a voice-over (one line per scene).
16830
+ * @description Add a voice-over (one line per scene). `video` only.
16802
16831
  * @default true
16803
16832
  */
16804
16833
  readonly narration?: boolean;
16805
- /** @description Optional video starter to use (`starter:<slug>:<language>`); default: the model picks one. */
16834
+ /** @description Optional video starter to use (`starter:<slug>:<language>`); default: the model picks one. `video` only. */
16806
16835
  readonly starter?: string;
16807
16836
  /** @description Optional title (default: the storyboard title). */
16808
16837
  readonly title?: string;
16809
16838
  /** @description Optional narration voice (a Cloud TTS voice name or `custom:<uuid>`). */
16810
16839
  readonly voice?: string;
16811
16840
  };
16841
+ /**
16842
+ * Studio production kind
16843
+ * @description What the production builds: `video` (MP4), `image` (PNG), `deck` (PPTX), `doc` (DOCX), `sheet` (XLSX), `audio` (MP3 jingle or song), `carousel` (PNG slides in a ZIP + cover) or `print` (A4/A5 PDF poster or flyer).
16844
+ * @default video
16845
+ * @enum {string}
16846
+ */
16847
+ readonly StudioProductionKind: 'video' | 'image' | 'deck' | 'doc' | 'sheet' | 'audio' | 'carousel' | 'print';
16848
+ /**
16849
+ * Studio production output
16850
+ * @description A built output of a non-video production: the regular Studio asset plus its `role`. `url` is a 1 h signed GET, `null` while not ready.
16851
+ */
16852
+ readonly StudioProductionOutput: components$1['schemas']['AssetDto'] & {
16853
+ /**
16854
+ * @description What the asset is: `image` (PNG), `cover` (carousel cover PNG), `document` (PPTX, DOCX or XLSX), `pages` (ZIP of carousel PNGs), `pdf` or `audio` (MP3).
16855
+ * @enum {string}
16856
+ */
16857
+ readonly role: 'image' | 'cover' | 'document' | 'pages' | 'pdf' | 'audio';
16858
+ };
16812
16859
  /** Review decision */
16813
16860
  readonly StudioPublicDecisionRequest: {
16814
16861
  /** @enum {string} */
@@ -37879,6 +37926,8 @@ export declare class Templates {
37879
37926
  }
37880
37927
  export type StudioProductionCreate = Mutable<Body<'createStudioProduction'>>;
37881
37928
  export type StudioProduction = Schema<'StudioProduction'>;
37929
+ export type StudioProductionKind = Schema<'StudioProductionKind'>;
37930
+ export type StudioProductionOutput = Schema<'StudioProductionOutput'>;
37882
37931
  type CallOpts$27 = {
37883
37932
  ext?: CodaiRequestExtensions;
37884
37933
  signal?: AbortSignal;