codai-sdk 0.67.0 → 0.69.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
@@ -4611,7 +4611,7 @@ type paths$1 = {
4611
4611
  readonly get?: never;
4612
4612
  readonly put?: never;
4613
4613
  /**
4614
- * Build a deck, doc or sheet creative into a file
4614
+ * Build a deck, doc, sheet, carousel or print creative into a file
4615
4615
  * @description Converts the deck, doc or sheet creative at `seq` (default: the head) back into a documents spec and builds the
4616
4616
  * PPTX, DOCX or XLSX exactly like `POST /v1/studio/documents` (same validation, limits, themes and builders). Each
4617
4617
  * build is a new version of the same document: `based_on` is the newest document built from this creative, so
@@ -4622,6 +4622,19 @@ type paths$1 = {
4622
4622
  * The file is free (`cost_micro_usd: "0"` on `document`). `preview: true` also queues a LibreOffice preview, billed
4623
4623
  * like `POST /v1/studio/documents/{id}/previews` ($0.002 per page, min $0.01). Video and image creatives answer 400
4624
4624
  * `not_supported_for_kind`.
4625
+ *
4626
+ * **Carousel and print creatives** (body `CreativePagedBuildRequest`) answer **202** with an export job in `export`
4627
+ * (poll `GET /v1/studio/exports/{id}` until `succeeded`, then download `url`):
4628
+ * - carousel `format: png` (default): a zip of one PNG per slide (`slide-01.png` …) at the format size;
4629
+ * `format: pdf`: one PDF page per slide (LinkedIn document post), no bleed, no crop marks.
4630
+ * - print `format: pdf`: one sheet per page at the bleed box plus a crop-mark margin, crop marks outside the bleed,
4631
+ * TrimBox and BleedBox set on every page. The prepress check (bleed safety, minimum text size, image resolution,
4632
+ * colours outside a coated-CMYK gamut) runs first and its issues are returned in `lint`; they never block the build.
4633
+ * The PDF is RGB: PDF/X-4 conversion with the output intent is not done by the render worker, which `warnings` states.
4634
+ *
4635
+ * Price: $0.002 per page (min $0.01), held in the wallet before dispatch (402 when short) and billed once when the
4636
+ * job finishes. Files carry machine-readable AI marks (PDF Info `Keywords`, PNG XMP) and the `x-codai-ai-generated`
4637
+ * header. Supports `Idempotency-Key` (24 h).
4625
4638
  */
4626
4639
  readonly post: operations$1['buildCreative'];
4627
4640
  readonly delete?: never;
@@ -5090,6 +5103,32 @@ type paths$1 = {
5090
5103
  readonly patch?: never;
5091
5104
  readonly trace?: never;
5092
5105
  };
5106
+ readonly '/v1/studio/creatives/{id}/nodes/{nodeId}/regenerate': {
5107
+ readonly parameters: {
5108
+ readonly query?: never;
5109
+ readonly header?: never;
5110
+ readonly path?: never;
5111
+ readonly cookie?: never;
5112
+ };
5113
+ readonly get?: never;
5114
+ readonly put?: never;
5115
+ /**
5116
+ * Regenerate the picture of an image node
5117
+ * @description Generates a new image for an `image` node with `codai-image` (billed like `POST /v1/images/generations`: wallet
5118
+ * hold of the quote first, one usage row, the stored asset is AI-marked) and swaps it in through the edit path. When
5119
+ * the node has a `castId`, that cast entry's `refAssetIds` are sent as reference images automatically and its
5120
+ * `description` is appended to the prompt, so the character or product stays the same across shots. The aspect
5121
+ * ratio defaults to the closest supported ratio of the node box. Video nodes: generate a clip with
5122
+ * `POST /v1/videos` and `reference_asset_ids`, then `replaceAsset`.
5123
+ * Supports `Idempotency-Key` (24 h): a retry with the same key and body replays the first response; a different body is 422 `idempotency_key_mismatch`; the first request still running is 409 `idempotency_in_progress`.
5124
+ */
5125
+ readonly post: operations$1['regenerateCreativeNode'];
5126
+ readonly delete?: never;
5127
+ readonly options?: never;
5128
+ readonly head?: never;
5129
+ readonly patch?: never;
5130
+ readonly trace?: never;
5131
+ };
5093
5132
  readonly '/v1/studio/creatives/{id}/ops': {
5094
5133
  readonly parameters: {
5095
5134
  readonly query?: never;
@@ -5142,6 +5181,34 @@ type paths$1 = {
5142
5181
  readonly patch?: never;
5143
5182
  readonly trace?: never;
5144
5183
  };
5184
+ readonly '/v1/studio/creatives/{id}/post-copy': {
5185
+ readonly parameters: {
5186
+ readonly query?: never;
5187
+ readonly header?: never;
5188
+ readonly path?: never;
5189
+ readonly cookie?: never;
5190
+ };
5191
+ readonly get?: never;
5192
+ readonly put?: never;
5193
+ /**
5194
+ * Write social post copy for a creative
5195
+ * @description Writes a caption and hashtags per platform (Instagram, LinkedIn, TikTok, X, Facebook) and one alt text per slide
5196
+ * for a carousel, image or video creative, in Romanian or English: one bounded `codai` turn with a forced tool over
5197
+ * the creative's outline, then every answer is repaired to the platform's hard limits (caption characters including
5198
+ * hashtags, hashtag count, alt text length): hashtags normalised, deduplicated and capped, captions trimmed on a word
5199
+ * end. What was changed is listed in `fixes`. Nothing is written to the creative.
5200
+ *
5201
+ * Billing: token-metered (usage model `codai::post-copy`, prompt caching on) under a small wallet hold
5202
+ * (15 000 µUSD, settled with the real cost; 402 `insufficient_funds` when short). Copy and outlines are never
5203
+ * logged. Supports `Idempotency-Key` (24 h).
5204
+ */
5205
+ readonly post: operations$1['writeCreativePostCopy'];
5206
+ readonly delete?: never;
5207
+ readonly options?: never;
5208
+ readonly head?: never;
5209
+ readonly patch?: never;
5210
+ readonly trace?: never;
5211
+ };
5145
5212
  readonly '/v1/studio/creatives/{id}/render': {
5146
5213
  readonly parameters: {
5147
5214
  readonly query?: never;
@@ -5157,7 +5224,7 @@ type paths$1 = {
5157
5224
  * `GET /v1/studio/renders/{id}` with the returned `render_id`; the render reports `creative_id`. Billed like
5158
5225
  * `POST /v1/studio/renders`, once, when it has succeeded. The format must be 1920×1080, 1080×1920 or 1080×1080
5159
5226
  * (400 `unsupported_format`); every referenced asset must be yours and ready (400 `asset_not_found`). Video
5160
- * creatives only for now.
5227
+ * creatives; an `audio` creative renders a mixdown instead (see below).
5161
5228
  *
5162
5229
  * Renders are composed from per-scene segments: scenes unchanged since an earlier render are reused (the charge
5163
5230
  * is still per second of output). When the same render already exists for this exact version, format, quality and
@@ -5168,6 +5235,13 @@ type paths$1 = {
5168
5235
  * When omitted it is `corner` if the render uses TTS narration (synthetic voice) or AI-generated images, else
5169
5236
  * `none`; an explicit `none` with TTS narration is rejected (400 `ai_label_required`). The response returns the
5170
5237
  * resolved `ai_label`. As the deployer you remain responsible for labelling deepfakes you publish.
5238
+ *
5239
+ * **Audio creatives** (`kind: audio`) take `CreativeAudioRenderRequest`: `formats` (`wav` / `mp3` / `flac`,
5240
+ * default WAV + MP3), `stems` (one WAV per audible track), `lrc` and `loudness` (preset or LUFS). The document is
5241
+ * mixed with ffmpeg, mastered to the loudness target (two-pass loudnorm + true-peak limiter) and every output is
5242
+ * AI-marked in the file (RIFF ICMT / ID3v2.4 / Vorbis comment). The 202 is a `CreativeAudioRenderAccepted`; poll
5243
+ * `GET /v1/studio/renders/{id}`, whose `data[]` holds one signed asset per output. Price: 1 000 µUSD per output
5244
+ * second (minimum 10 000 µUSD), `stems: true` adds 50 %; at most 20 minutes per render.
5171
5245
  * Places a wallet hold of the quote before dispatch (402 `insufficient_funds` when short); the hold is settled with the billed amount when the job finishes and released on failure.
5172
5246
  * Supports `Idempotency-Key` (24 h): a retry with the same key and body replays the first response; a different body is 422 `idempotency_key_mismatch`; the first request still running is 409 `idempotency_in_progress`.
5173
5247
  */
@@ -5464,6 +5538,31 @@ type paths$1 = {
5464
5538
  readonly patch?: never;
5465
5539
  readonly trace?: never;
5466
5540
  };
5541
+ readonly '/v1/studio/creatives/{id}/transcript-cut': {
5542
+ readonly parameters: {
5543
+ readonly query?: never;
5544
+ readonly header?: never;
5545
+ readonly path?: never;
5546
+ readonly cookie?: never;
5547
+ };
5548
+ readonly get?: never;
5549
+ readonly put?: never;
5550
+ /**
5551
+ * Edit a video clip by its transcript
5552
+ * @description Deletes word ranges from a video node: the words are the clip asset's cached transcript (written by
5553
+ * `POST /v1/studio/creatives/{id}/captions`, word timings in source time). The removed spans are cut out with
5554
+ * `splitVideo` / `trimVideo` / `setTiming` ops and the pieces are placed back to back from the clip's start, as one
5555
+ * new version through the same edit path as `POST /v1/studio/creatives/{id}/ops` (rebase on a slightly stale
5556
+ * `base_seq`, locks honoured). Free: no transcription, no usage row. No cached transcript -> 409
5557
+ * `captions_required` (run captions on that clip first). Video creatives only.
5558
+ */
5559
+ readonly post: operations$1['transcriptCutCreative'];
5560
+ readonly delete?: never;
5561
+ readonly options?: never;
5562
+ readonly head?: never;
5563
+ readonly patch?: never;
5564
+ readonly trace?: never;
5565
+ };
5467
5566
  readonly '/v1/studio/creatives/{id}/variants': {
5468
5567
  readonly parameters: {
5469
5568
  readonly query?: never;
@@ -5706,6 +5805,150 @@ type paths$1 = {
5706
5805
  readonly patch?: never;
5707
5806
  readonly trace?: never;
5708
5807
  };
5808
+ readonly '/v1/studio/lyrics': {
5809
+ readonly parameters: {
5810
+ readonly query?: never;
5811
+ readonly header?: never;
5812
+ readonly path?: never;
5813
+ readonly cookie?: never;
5814
+ };
5815
+ readonly get?: never;
5816
+ readonly put?: never;
5817
+ /**
5818
+ * Write song lyrics
5819
+ * @description Writes original song lyrics for a brief in Romanian or English: one bounded `codai` turn with a forced tool,
5820
+ * checked line by line for syllables (`syllables_per_line`, tolerance ±1) and the rhyme scheme (`AABB`, `ABAB` or
5821
+ * `free`). When more than 30 % of the lines miss, ONE repair turn names the problems and the better of the two answers
5822
+ * is returned (`repaired`). Billing: token-metered (usage model `codai::lyrics`, prompt caching on) under a small
5823
+ * wallet hold (20 000 µUSD, settled with the real cost; 402 `insufficient_funds` when short). Briefs and lyrics are
5824
+ * never logged. Supports `Idempotency-Key` (24 h).
5825
+ */
5826
+ readonly post: operations$1['writeStudioLyrics'];
5827
+ readonly delete?: never;
5828
+ readonly options?: never;
5829
+ readonly head?: never;
5830
+ readonly patch?: never;
5831
+ readonly trace?: never;
5832
+ };
5833
+ readonly '/v1/studio/lyrics/align': {
5834
+ readonly parameters: {
5835
+ readonly query?: never;
5836
+ readonly header?: never;
5837
+ readonly path?: never;
5838
+ readonly cookie?: never;
5839
+ };
5840
+ readonly get?: never;
5841
+ readonly put?: never;
5842
+ /**
5843
+ * Align lyrics to an audio clip
5844
+ * @description Karaoke alignment: matches written lyrics to the word timestamps of one clip of an audio (or video) creative and
5845
+ * writes the timed lines with one `setLyrics` edit (`apply: false` only returns them), plus an LRC file. The clip's
5846
+ * words come from the transcription cached on its asset (free, `cached: true`); otherwise the clip is transcribed
5847
+ * (Whisper, at most 25 MB) and billed `codai::lyrics-align` at the speech-to-text rate (6 000 µUSD per started minute)
5848
+ * under a wallet hold. Not available for EU data-residency accounts (403 `residency_unavailable`). Supports
5849
+ * `Idempotency-Key` (24 h).
5850
+ */
5851
+ readonly post: operations$1['alignStudioLyrics'];
5852
+ readonly delete?: never;
5853
+ readonly options?: never;
5854
+ readonly head?: never;
5855
+ readonly patch?: never;
5856
+ readonly trace?: never;
5857
+ };
5858
+ readonly '/v1/studio/media-ops': {
5859
+ readonly parameters: {
5860
+ readonly query?: never;
5861
+ readonly header?: never;
5862
+ readonly path?: never;
5863
+ readonly cookie?: never;
5864
+ };
5865
+ /**
5866
+ * List media operations
5867
+ * @description The media-op catalogue: one entry per op (`image.remove_background`, `audio.separate_stems`,
5868
+ * `music.generate_ace`…) with its engine, lane, sync/async mode, accepted inputs, output kind, whether the lane is
5869
+ * configured on this gateway (`available`) and a list quote for a reference input (default params, 60 s of input
5870
+ * audio or a 1024×1024 image; `quote_basis`). Free. Ask `POST /v1/studio/media-ops/{op}/quote` for the exact price
5871
+ * of a real request.
5872
+ */
5873
+ readonly get: operations$1['listStudioMediaOps'];
5874
+ readonly put?: never;
5875
+ readonly post?: never;
5876
+ readonly delete?: never;
5877
+ readonly options?: never;
5878
+ readonly head?: never;
5879
+ readonly patch?: never;
5880
+ readonly trace?: never;
5881
+ };
5882
+ readonly '/v1/studio/media-ops/{op}': {
5883
+ readonly parameters: {
5884
+ readonly query?: never;
5885
+ readonly header?: never;
5886
+ readonly path?: never;
5887
+ readonly cookie?: never;
5888
+ };
5889
+ readonly get?: never;
5890
+ readonly put?: never;
5891
+ /**
5892
+ * Run a media operation
5893
+ * @description Runs one op on your Studio assets: `asset_ids` (0–4 owned, ready assets, in the order the op expects) and
5894
+ * `params` (validated strictly per op, see `MediaOpRequest`). Sync ops (`mode: sync`: background removal,
5895
+ * upscale, inpaint / outpaint / erase, analyze) answer **200** with the stored outputs; async ops (stems, denoise,
5896
+ * MIDI, mastering, music and sound-effect generation) answer **202** with a job — poll
5897
+ * `GET /v1/studio/media-ops/jobs/{id}`; the sweeper settles it even when nobody polls. At most 3 async jobs run per
5898
+ * user (429 beyond). Money gate: the quote is held on the wallet first (402 `insufficient_funds` when it does not
5899
+ * fit), the measured cost is billed once and the rest of the hold released. Every output is marked as
5900
+ * AI-generated (C2PA / XMP on images, RIFF INFO / ID3 on audio, GCS metadata) and carries lineage:
5901
+ * `parent_asset_id` = the first input, `op` and `op_inputs`. Supports `Idempotency-Key`.
5902
+ */
5903
+ readonly post: operations$1['runStudioMediaOp'];
5904
+ readonly delete?: never;
5905
+ readonly options?: never;
5906
+ readonly head?: never;
5907
+ readonly patch?: never;
5908
+ readonly trace?: never;
5909
+ };
5910
+ readonly '/v1/studio/media-ops/{op}/quote': {
5911
+ readonly parameters: {
5912
+ readonly query?: never;
5913
+ readonly header?: never;
5914
+ readonly path?: never;
5915
+ readonly cookie?: never;
5916
+ };
5917
+ readonly get?: never;
5918
+ readonly put?: never;
5919
+ /**
5920
+ * Quote a media operation
5921
+ * @description The exact price of `{ asset_ids, params }` for one op, after the same validation as the run (op id, params,
5922
+ * asset ownership, kinds and mimes, lane configured). Nothing is held or billed. `quote_micro_eur` is what the
5923
+ * wallet hold would be; the run bills the measured cost, never more than the quote.
5924
+ */
5925
+ readonly post: operations$1['quoteStudioMediaOp'];
5926
+ readonly delete?: never;
5927
+ readonly options?: never;
5928
+ readonly head?: never;
5929
+ readonly patch?: never;
5930
+ readonly trace?: never;
5931
+ };
5932
+ readonly '/v1/studio/media-ops/jobs/{id}': {
5933
+ readonly parameters: {
5934
+ readonly query?: never;
5935
+ readonly header?: never;
5936
+ readonly path?: never;
5937
+ readonly cookie?: never;
5938
+ };
5939
+ /**
5940
+ * Retrieve a media job
5941
+ * @description The state of an async media job; a pending job whose result is ready is settled on the spot (outputs stored, billed once). Unknown or foreign ids are 404.
5942
+ */
5943
+ readonly get: operations$1['getStudioMediaOpJob'];
5944
+ readonly put?: never;
5945
+ readonly post?: never;
5946
+ readonly delete?: never;
5947
+ readonly options?: never;
5948
+ readonly head?: never;
5949
+ readonly patch?: never;
5950
+ readonly trace?: never;
5951
+ };
5709
5952
  readonly '/v1/studio/previews/{id}': {
5710
5953
  readonly parameters: {
5711
5954
  readonly query?: never;
@@ -5862,6 +6105,9 @@ type paths$1 = {
5862
6105
  * Timeline renders (`POST /v1/studio/timelines`) also return `timeline` (scenes with their assets),
5863
6106
  * `parent_render_id` and `root_render_id`; while a regenerated video scene is still being generated the render
5864
6107
  * stays `queued` with `stage: generating_scene`.
6108
+ *
6109
+ * Audio creative renders (`target: audio`) answer `StudioAudioRender`: `data` holds one asset per output
6110
+ * (`output`: `mix` / `stem` / `lrc`, `format`, `track_id`), `qa` the measured loudness and true peak.
5865
6111
  */
5866
6112
  readonly get: operations$1['getRender'];
5867
6113
  readonly put?: never;
@@ -9456,6 +9702,8 @@ type components$1 = {
9456
9702
  * @example flat minimalist logo of a paper plane, two colours, white background
9457
9703
  */
9458
9704
  readonly prompt: string;
9705
+ /** @description Your ready studio image assets used as references (e.g. a creative's cast), sent after `reference_images`; together they count against the per-model limit. A missing or foreign asset is 404. */
9706
+ readonly reference_asset_ids?: readonly string[];
9459
9707
  /** @description Images the model must stay consistent with (logo, palette, product, character), sent before the prompt. Per-model limit — `codai-image-fast` accepts 4, the others 14. */
9460
9708
  readonly reference_images?: readonly components$1['schemas']['CoreImageInput'][];
9461
9709
  readonly response_format?: components$1['schemas']['MediaResponseFormat'];
@@ -9806,6 +10054,223 @@ type components$1 = {
9806
10054
  readonly seq: number;
9807
10055
  readonly warnings: readonly string[];
9808
10056
  };
10057
+ /**
10058
+ * Creative audio part
10059
+ * @description `doc.audio`: the audio timeline of every creative (voice / music / sfx tracks of a video) and the whole document
10060
+ * of an `audio` creative (song or podcast). Milliseconds are the source of truth; bars and beats are derived from
10061
+ * `meta.bpm` / `meta.timeSignature`. Every field but `tracks` is optional.
10062
+ */
10063
+ readonly CreativeAudio: {
10064
+ /** @description Human-contribution log of an `audio` creative, appended by the server for each edit (who: `human` or `ai`). */
10065
+ readonly humanLog?: readonly {
10066
+ /** @enum {string} */
10067
+ readonly actor: 'human' | 'ai';
10068
+ readonly detail?: string;
10069
+ readonly op: string;
10070
+ /** Format: date-time */
10071
+ readonly ts: string;
10072
+ }[];
10073
+ /** @description Timed lyric lines (exported as LRC). */
10074
+ readonly lyrics?: readonly {
10075
+ readonly endMs: number;
10076
+ readonly sectionId?: string;
10077
+ readonly startMs: number;
10078
+ readonly text: string;
10079
+ }[];
10080
+ /** @description Master bus. Unset fields resolve to `meta.loudnessTarget` (or -14 LUFS) and a -1 dBTP true peak. */
10081
+ readonly master?: {
10082
+ readonly fx?: readonly components$1['schemas']['CreativeAudioFx'][];
10083
+ readonly limiter?: boolean;
10084
+ readonly targetLufs?: number;
10085
+ readonly truePeakDb?: number;
10086
+ };
10087
+ /** @description Song / episode metadata. */
10088
+ readonly meta?: {
10089
+ readonly bpm?: number;
10090
+ readonly key?: {
10091
+ /** @enum {string} */
10092
+ readonly mode: 'major' | 'minor';
10093
+ /** @enum {string} */
10094
+ readonly tonic: 'C' | 'C#' | 'Db' | 'D' | 'D#' | 'Eb' | 'E' | 'F' | 'F#' | 'Gb' | 'G' | 'G#' | 'Ab' | 'A' | 'A#' | 'Bb' | 'B';
10095
+ };
10096
+ readonly language?: string;
10097
+ /** @description `streaming` (-14 LUFS), `podcast` (-16), `broadcast` (-23) or an integrated LUFS number (-40…-5). */
10098
+ readonly loudnessTarget?: ('streaming' | 'podcast' | 'broadcast') | number;
10099
+ /** @enum {integer} */
10100
+ readonly sampleRate?: 44100 | 48000;
10101
+ /** @description `[beats per bar, beat unit]`, e.g. `[4, 4]`. */
10102
+ readonly timeSignature?: readonly number[];
10103
+ };
10104
+ readonly sections?: readonly components$1['schemas']['CreativeAudioSection'][];
10105
+ readonly tracks: readonly components$1['schemas']['CreativeAudioTrack'][];
10106
+ };
10107
+ /**
10108
+ * Creative audio clip
10109
+ * @description One clip of an audio asset on a track. `inMs` / `outMs` are SOURCE offsets: the clip ends on the timeline at `startMs + (outMs - inMs) × stretch`.
10110
+ */
10111
+ readonly CreativeAudioClip: {
10112
+ /** @description Studio asset id (uuid). */
10113
+ readonly assetId: string;
10114
+ readonly color?: string;
10115
+ /** @description Duck under voice / vocal tracks (default on for music tracks of an `audio` creative). */
10116
+ readonly duck?: boolean;
10117
+ /** @enum {string} */
10118
+ readonly fadeCurve?: 'linear' | 'exp' | 's';
10119
+ readonly fadeInMs?: number;
10120
+ readonly fadeOutMs?: number;
10121
+ readonly gainDb?: number;
10122
+ /** @description How the clip was generated (public codai provider / model ids, never an upstream name). */
10123
+ readonly generation?: {
10124
+ readonly model: string;
10125
+ readonly op?: string;
10126
+ readonly parentClipId?: string;
10127
+ readonly prompt?: string;
10128
+ readonly provider: string;
10129
+ readonly seed?: number;
10130
+ };
10131
+ readonly id: string;
10132
+ readonly inMs?: number;
10133
+ readonly locked?: boolean;
10134
+ readonly loop?: boolean;
10135
+ readonly outMs?: number;
10136
+ readonly pan?: number;
10137
+ readonly pitchSemitones?: number;
10138
+ readonly startMs: number;
10139
+ /** @description Timeline length / source length (pitch kept). */
10140
+ readonly stretch?: number;
10141
+ };
10142
+ /** Creative audio effect */
10143
+ readonly CreativeAudioFx: {
10144
+ readonly bypass?: boolean;
10145
+ readonly id: string;
10146
+ /** @description Numeric effect parameters by name (`threshold`, `ratio`, `mix`…). */
10147
+ readonly params: {
10148
+ readonly [key: string]: number;
10149
+ };
10150
+ /** @enum {string} */
10151
+ readonly type: 'eq' | 'compressor' | 'reverb' | 'delay' | 'limiter' | 'gate' | 'deesser' | 'pitch' | 'chorus' | 'saturation';
10152
+ };
10153
+ /** Queued audio render */
10154
+ readonly CreativeAudioRenderAccepted: {
10155
+ /** @enum {boolean} */
10156
+ readonly cached: false;
10157
+ /** Format: uuid */
10158
+ readonly creative_id: string;
10159
+ readonly duration_seconds: number;
10160
+ readonly formats: readonly ('wav' | 'mp3' | 'flac')[];
10161
+ /** Format: uuid */
10162
+ readonly id: string;
10163
+ readonly lrc: boolean;
10164
+ readonly minimum_micro_usd: string;
10165
+ readonly model: string;
10166
+ /** @enum {string} */
10167
+ readonly object: 'studio.render';
10168
+ /** @description The files this render will produce, in result order: mixes, stems, LRC. */
10169
+ readonly outputs: readonly components$1['schemas']['CreativeAudioRenderOutput'][];
10170
+ readonly price_micro_usd_per_second: string;
10171
+ /** @description The amount held on the wallet (micro-USD); the bill uses the measured length. */
10172
+ readonly quote_micro_usd: string;
10173
+ /**
10174
+ * Format: uuid
10175
+ * @description Poll it with `GET /v1/studio/renders/{id}`.
10176
+ */
10177
+ readonly render_id: string;
10178
+ readonly seq: number;
10179
+ /** @enum {string} */
10180
+ readonly status: 'queued';
10181
+ readonly stems: boolean;
10182
+ readonly stems_surcharge_pct: number;
10183
+ /** @enum {string} */
10184
+ readonly target: 'audio';
10185
+ readonly target_lufs: number;
10186
+ readonly true_peak_db: number;
10187
+ };
10188
+ readonly CreativeAudioRenderOutput: {
10189
+ /** @enum {string} */
10190
+ readonly format: 'wav' | 'mp3' | 'flac' | 'lrc';
10191
+ /** @enum {string} */
10192
+ readonly kind: 'mix' | 'stem' | 'lrc';
10193
+ readonly mime_type: string;
10194
+ /** @description The track of a stem; null for the mix and the LRC. */
10195
+ readonly track_id: string | null;
10196
+ };
10197
+ /**
10198
+ * Audio creative render request
10199
+ * @description Body of `POST /v1/studio/creatives/{id}/render` for a creative of `kind: audio` (mixdown + mastering + exports).
10200
+ * Any other kind uses `CreativeRenderRequest`.
10201
+ */
10202
+ readonly CreativeAudioRenderRequest: {
10203
+ /**
10204
+ * @default [
10205
+ * "wav",
10206
+ * "mp3"
10207
+ * ]
10208
+ */
10209
+ readonly formats?: readonly ('wav' | 'mp3' | 'flac')[];
10210
+ /** @description Mastering target: a preset (streaming -14, podcast -16, broadcast -23 LUFS) or integrated LUFS (-40...-5). Default the document master or meta.loudnessTarget, else -14. */
10211
+ readonly loudness?: ('streaming' | 'podcast' | 'broadcast') | number;
10212
+ /** @description Export an LRC file (default on when the document has timed lyrics; true without lyrics is 400 `no_lyrics`). */
10213
+ readonly lrc?: boolean;
10214
+ /**
10215
+ * @description Also export one WAV stem per audible track (+50 % price).
10216
+ * @default false
10217
+ */
10218
+ readonly stems?: boolean;
10219
+ readonly title?: string;
10220
+ };
10221
+ /** Creative audio section */
10222
+ readonly CreativeAudioSection: {
10223
+ readonly durationMs: number;
10224
+ readonly id: string;
10225
+ /** @enum {string} */
10226
+ readonly kind: 'intro' | 'verse' | 'pre_chorus' | 'chorus' | 'bridge' | 'outro' | 'instrumental' | 'custom';
10227
+ readonly label?: string;
10228
+ readonly locked?: boolean;
10229
+ readonly lyrics?: string;
10230
+ readonly startMs: number;
10231
+ readonly styleHint?: string;
10232
+ };
10233
+ /** Creative audio track */
10234
+ readonly CreativeAudioTrack: {
10235
+ /** @description Breakpoint envelopes; `target` is `gainDb`, `pan` or `fx.<fxId>.<param>`. */
10236
+ readonly automation?: readonly {
10237
+ readonly points: readonly {
10238
+ readonly tMs: number;
10239
+ readonly value: number;
10240
+ }[];
10241
+ readonly target: string;
10242
+ }[];
10243
+ readonly clips: readonly components$1['schemas']['CreativeAudioClip'][];
10244
+ readonly fx?: readonly components$1['schemas']['CreativeAudioFx'][];
10245
+ readonly gainDb?: number;
10246
+ readonly id: string;
10247
+ /**
10248
+ * @description Absent = `audio`. MIDI tracks hold `midiClips` only; buses hold no clips.
10249
+ * @enum {string}
10250
+ */
10251
+ readonly kind?: 'audio' | 'midi' | 'bus';
10252
+ readonly locked?: boolean;
10253
+ readonly midiClips?: readonly ({
10254
+ readonly durationMs: number;
10255
+ readonly id: string;
10256
+ readonly notes: readonly {
10257
+ readonly [key: string]: unknown;
10258
+ }[];
10259
+ readonly startMs: number;
10260
+ } & {
10261
+ readonly [key: string]: unknown;
10262
+ })[];
10263
+ readonly mute?: boolean;
10264
+ readonly name?: string;
10265
+ readonly pan?: number;
10266
+ /** @enum {string} */
10267
+ readonly role: 'voice' | 'music' | 'sfx' | 'drums' | 'bass' | 'keys' | 'guitar' | 'vocal' | 'lead' | 'pad' | 'fx' | 'bus' | 'podcast_host' | 'podcast_guest';
10268
+ readonly sends?: readonly {
10269
+ readonly busId: string;
10270
+ readonly gainDb: number;
10271
+ }[];
10272
+ readonly solo?: boolean;
10273
+ };
9809
10274
  /**
9810
10275
  * Creative build request
9811
10276
  * @example {
@@ -9889,6 +10354,18 @@ type components$1 = {
9889
10354
  /** @description Number of caption words. */
9890
10355
  readonly words: number;
9891
10356
  };
10357
+ /** Cast entry */
10358
+ readonly CreativeCast: {
10359
+ /** @description Appended to the prompt when the node is regenerated. */
10360
+ readonly description?: string;
10361
+ /** @description Shares the document id namespace with scenes and nodes. */
10362
+ readonly id: string;
10363
+ /** @enum {string} */
10364
+ readonly kind: 'character' | 'product';
10365
+ readonly name: string;
10366
+ /** @description Image assets of the subject. */
10367
+ readonly refAssetIds: readonly string[];
10368
+ };
9892
10369
  /**
9893
10370
  * Frame comment
9894
10371
  * @example {
@@ -10054,14 +10531,14 @@ type components$1 = {
10054
10531
  readonly assets: {
10055
10532
  readonly [key: string]: unknown;
10056
10533
  };
10057
- /** @description `{ tracks: [{ id, role: voice | music | sfx, clips[] }] }`. */
10058
- readonly audio: {
10059
- readonly [key: string]: unknown;
10060
- };
10534
+ /** @description Audio timeline: `{ tracks[], meta?, sections?, master?, lyrics?, humanLog? }` (see `CreativeAudio`). */
10535
+ readonly audio: components$1['schemas']['CreativeAudio'];
10061
10536
  /** @description `{ kitId?, tokens }`; nodes reference tokens as `{ "$token": "primary" }`. */
10062
10537
  readonly brand: {
10063
10538
  readonly [key: string]: unknown;
10064
10539
  };
10540
+ /** @description Recurring characters / products (CX-05). An `image` / `video` node binds one with `props.castId`; regenerating that node sends the entry's `refAssetIds` as reference images so the subject looks the same in every shot. */
10541
+ readonly cast?: readonly components$1['schemas']['CreativeCast'][];
10065
10542
  /** @description One of `formats[].id`. */
10066
10543
  readonly defaultFormat: string;
10067
10544
  /** @description Output formats (`{ id, width, height }`); nodes may override their layout per format. */
@@ -10114,7 +10591,7 @@ type components$1 = {
10114
10591
  readonly CreativeError: {
10115
10592
  readonly error: {
10116
10593
  /** @enum {string} */
10117
- readonly code: 'invalid_request' | 'stale' | 'invalid' | 'not_found' | 'locked' | 'duplicate_id' | 'too_large' | 'not_supported_for_kind' | 'unsupported_format' | 'asset_not_found' | 'not_implemented' | 'frame_failed' | 'too_many_frame_jobs' | 'no_edit' | 'timeout' | 'fetch_failed' | 'extract_failed' | 'kind_mismatch' | 'node_not_found' | 'invalid_pick' | 'duplicate_key' | 'unknown_var' | 'invalid_var_value' | 'unsupported_kind' | 'too_long' | 'ai_label_required';
10594
+ readonly code: 'invalid_request' | 'stale' | 'invalid' | 'not_found' | 'locked' | 'duplicate_id' | 'too_large' | 'not_supported_for_kind' | 'unsupported_format' | 'asset_not_found' | 'not_implemented' | 'frame_failed' | 'too_many_frame_jobs' | 'no_edit' | 'timeout' | 'fetch_failed' | 'extract_failed' | 'kind_mismatch' | 'node_not_found' | 'invalid_pick' | 'duplicate_key' | 'unknown_var' | 'invalid_var_value' | 'unsupported_kind' | 'too_long' | 'ai_label_required' | 'no_lyrics' | 'unsupported_media';
10118
10595
  readonly conflicts?: readonly {
10119
10596
  readonly head_prop?: string;
10120
10597
  readonly prop?: string;
@@ -10239,7 +10716,7 @@ type components$1 = {
10239
10716
  * Creative kind
10240
10717
  * @enum {string}
10241
10718
  */
10242
- readonly CreativeKind: 'video' | 'image' | 'deck' | 'doc' | 'sheet';
10719
+ readonly CreativeKind: 'video' | 'image' | 'deck' | 'doc' | 'sheet' | 'audio';
10243
10720
  /**
10244
10721
  * Lint code
10245
10722
  * @description `off_brand_color`, `outside_platform_safe_zone`, `text_too_small`, `flashing` (keyframes) and `text_overflow_locale` (the text shrinks to fit) can be fixed with `POST /v1/studio/creatives/{id}/lint/fix`. `missing_translation` and `stale_translation` are fixed with `POST /v1/studio/creatives/{id}/localize`.
@@ -10556,6 +11033,19 @@ type components$1 = {
10556
11033
  * (`control: null` clears it), `setMeta { title?, locale?, formats?, defaultFormat?, fps? }`,
10557
11034
  * `setLocaleText { locale, texts, by? }` (`texts`: unit key → translation, `null` removes it),
10558
11035
  * `setLocale { locale, tone?, audio?, captions?, remove? }`, `setLocalization { source?, glossary?, forkOf?, reset? }`.
11036
+ * Video clips (CX-06, video nodes; source in / out points in media ms, `rate` 0.25–4, J / L cuts via the node's
11037
+ * `audioLeadMs` / `audioTailMs` props): `trimVideo { target, inMs?, outMs?, fitTiming? }` (`null` clears a point),
11038
+ * `splitVideo { target, atMs, newId }` (cut at `atMs` after the node start into two nodes),
11039
+ * `setVideoRate { target, rate, fitTiming? }` (`rate: null` = 1x). Cast (CX-05): `addCast { cast }`,
11040
+ * `updateCast { target, patch }`, `removeCast { target }` (drops the `castId` of nodes that used it).
11041
+ * Audio ops (any creative's `doc.audio`; songs and podcasts): `addSection { section }`, `updateSection { target, patch }`,
11042
+ * `removeSection { target }`, `moveSection { target, startMs }`, `addTrack { track, index? }`,
11043
+ * `updateTrack { target, patch }`, `removeTrack { target }`, `splitClip { clipId, atMs, newId }`,
11044
+ * `trimClip { clipId, startMs?, endMs? }`, `moveClip { clipId, startMs?, trackId? }`,
11045
+ * `setFades { clipId, fadeInMs?, fadeOutMs?, fadeCurve? }`, `addMidiClip { trackId, clip }`, `removeMidiClip { clipId }`,
11046
+ * `updateMidiNotes { clipId, update?, remove?, add?, replace? }`, `setMaster { master }`, `setLyrics { lines }`;
11047
+ * `setMeta` also takes `audio` (bpm, key, timeSignature, language, loudnessTarget, sampleRate) and `setAudioClip` a
11048
+ * `trackId`. `null` in a patch removes an optional field.
10559
11049
  * @example {
10560
11050
  * "op": "setProps",
10561
11051
  * "target": "title",
@@ -10566,7 +11056,7 @@ type components$1 = {
10566
11056
  */
10567
11057
  readonly CreativeOp: {
10568
11058
  /** @enum {string} */
10569
- readonly op: 'setProps' | 'setLayout' | 'setTiming' | 'setAnim' | 'insertNode' | 'removeNode' | 'moveNode' | 'addScene' | 'removeScene' | 'updateScene' | 'moveScene' | 'setVar' | 'removeVar' | 'setAsset' | 'replaceAsset' | 'setAudioClip' | 'removeAudioClip' | 'setBrand' | 'restyle' | 'adaptFormat' | 'setControl' | 'setMeta' | 'setLocaleText' | 'setLocale' | 'setLocalization';
11059
+ readonly op: 'setProps' | 'setLayout' | 'setTiming' | 'setAnim' | 'insertNode' | 'removeNode' | 'moveNode' | 'addScene' | 'removeScene' | 'updateScene' | 'moveScene' | 'setVar' | 'removeVar' | 'setAsset' | 'replaceAsset' | 'setAudioClip' | 'removeAudioClip' | 'setBrand' | 'restyle' | 'adaptFormat' | 'setControl' | 'setMeta' | 'setLocaleText' | 'setLocale' | 'setLocalization' | 'trimVideo' | 'splitVideo' | 'setVideoRate' | 'addCast' | 'updateCast' | 'removeCast' | 'addSection' | 'updateSection' | 'removeSection' | 'moveSection' | 'addTrack' | 'updateTrack' | 'removeTrack' | 'splitClip' | 'trimClip' | 'moveClip' | 'setFades' | 'addMidiClip' | 'removeMidiClip' | 'updateMidiNotes' | 'setMaster' | 'setLyrics';
10570
11060
  } & {
10571
11061
  readonly [key: string]: unknown;
10572
11062
  };
@@ -10626,6 +11116,79 @@ type components$1 = {
10626
11116
  readonly [key: string]: unknown;
10627
11117
  };
10628
11118
  };
11119
+ /**
11120
+ * Carousel / print build request
11121
+ * @example {
11122
+ * "format": "pdf",
11123
+ * "format_id": "1x1"
11124
+ * }
11125
+ */
11126
+ readonly CreativePagedBuildRequest: {
11127
+ /**
11128
+ * @description Print only — crop marks outside the bleed.
11129
+ * @default true
11130
+ */
11131
+ readonly crop_marks?: boolean;
11132
+ /** @description File name without extension (default `<slug of the title>-<format_id>`). */
11133
+ readonly filename?: string;
11134
+ /**
11135
+ * @description Output: carousel `png` (zip of slides, default) or `pdf`; print creatives build `pdf` only.
11136
+ * @enum {string}
11137
+ */
11138
+ readonly format?: 'png' | 'pdf';
11139
+ /** @description Layout format of the creative (default its `defaultFormat`), e.g. `4x5`, `1x1`, `a4`, `card`. */
11140
+ readonly format_id?: string;
11141
+ /** @description Accepted for parity with deck builds; ignored. */
11142
+ readonly preview?: boolean;
11143
+ /** @description Creative version to build (default the head). */
11144
+ readonly seq?: number;
11145
+ };
11146
+ /** Prepress issue */
11147
+ readonly CreativePrintLintIssue: {
11148
+ /** @description `print_in_bleed`, `print_outside_safe`, `print_bleed_short`, `print_low_res`, `print_rgb_color`, `print_text_too_small`, `missing_alt`, `svg_empty`. */
11149
+ readonly code: string;
11150
+ readonly fixable?: boolean;
11151
+ readonly format?: string;
11152
+ readonly message: string;
11153
+ /** @enum {string} */
11154
+ readonly severity: 'error' | 'warning';
11155
+ /** @description Node or scene id. */
11156
+ readonly target: string;
11157
+ /** @description Measured value (pt, dpi, mm) where meaningful. */
11158
+ readonly value?: number;
11159
+ };
11160
+ /** Regenerate node request */
11161
+ readonly CreativeRegenerateNodeRequest: {
11162
+ /**
11163
+ * @description Default the closest ratio to the node box.
11164
+ * @enum {string}
11165
+ */
11166
+ readonly aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9' | '9:21';
11167
+ readonly base_seq?: number;
11168
+ /** @default false */
11169
+ readonly force?: boolean;
11170
+ /** @example codai-image */
11171
+ readonly model?: string;
11172
+ readonly prompt: string;
11173
+ };
11174
+ /** Regenerate node result */
11175
+ readonly CreativeRegenerateNodeResult: {
11176
+ /**
11177
+ * Format: uuid
11178
+ * @description The new image asset.
11179
+ */
11180
+ readonly asset_id: string;
11181
+ readonly cast_id: string | null;
11182
+ readonly changed: readonly string[];
11183
+ readonly cost_micro_usd: string;
11184
+ readonly doc_hash: string;
11185
+ readonly node_id: string;
11186
+ readonly rebased: boolean;
11187
+ /** @description The cast references that were sent. */
11188
+ readonly reference_asset_ids: readonly string[];
11189
+ readonly seq: number;
11190
+ readonly warnings: readonly string[];
11191
+ };
10629
11192
  /** Queued creative render */
10630
11193
  readonly CreativeRenderAccepted: {
10631
11194
  readonly ai_label?: components$1['schemas']['StudioRenderAiLabel'];
@@ -10888,6 +11451,55 @@ type components$1 = {
10888
11451
  */
10889
11452
  readonly type: 'text' | 'image';
10890
11453
  };
11454
+ /**
11455
+ * Transcript cut request
11456
+ * @example {
11457
+ * "node_id": "clip",
11458
+ * "remove": [
11459
+ * {
11460
+ * "from_word": 3,
11461
+ * "to_word": 4
11462
+ * }
11463
+ * ]
11464
+ * }
11465
+ */
11466
+ readonly CreativeTranscriptCutRequest: {
11467
+ /** @description The version to edit (default the head). */
11468
+ readonly base_seq?: number;
11469
+ /**
11470
+ * @description Edit locked nodes too.
11471
+ * @default false
11472
+ */
11473
+ readonly force?: boolean;
11474
+ /** @description The video node to edit. */
11475
+ readonly node_id: string;
11476
+ /** @description Word index ranges (inclusive) of the clip transcript to delete; overlapping ranges are merged. */
11477
+ readonly remove: readonly {
11478
+ readonly from_word: number;
11479
+ readonly to_word: number;
11480
+ }[];
11481
+ };
11482
+ /** Transcript cut result */
11483
+ readonly CreativeTranscriptCutResult: {
11484
+ readonly changed: readonly string[];
11485
+ readonly doc_hash: string;
11486
+ readonly node_id: string;
11487
+ /** @description Ids of the clip pieces in playback order (the first is the original node; empty when everything was cut and the node removed). */
11488
+ readonly pieces: readonly string[];
11489
+ readonly rebased: boolean;
11490
+ /** @description Source spans removed (media ms). */
11491
+ readonly removed: readonly {
11492
+ readonly in_ms: number;
11493
+ readonly out_ms: number;
11494
+ }[];
11495
+ /** @description Playback time removed from the clip (ms at its rate). */
11496
+ readonly removed_ms: number;
11497
+ /** @description The new head version. */
11498
+ readonly seq: number;
11499
+ readonly warnings: readonly string[];
11500
+ /** @description Words in the cached transcript. */
11501
+ readonly words: number;
11502
+ };
10891
11503
  /** Variant */
10892
11504
  readonly CreativeVariant: {
10893
11505
  /** @description Ops applied on top of the original. */
@@ -12577,6 +13189,159 @@ type components$1 = {
12577
13189
  readonly price_watch?: boolean;
12578
13190
  readonly show_in_share?: boolean;
12579
13191
  };
13192
+ /**
13193
+ * Media op
13194
+ * @description One catalogue entry of `GET /v1/studio/media-ops`.
13195
+ */
13196
+ readonly MediaOp: {
13197
+ /** @description False when the lane is not configured on this gateway (a run then answers 503 `media_ops_unavailable`). */
13198
+ readonly available: boolean;
13199
+ /** @description Engine that runs the op (`birefnet`, `real-esrgan-x4plus`, `gemini-image-edit`, `htdemucs`, `deepfilternet3`, `basic-pitch`, `ffmpeg-loudnorm`, `librosa`, `ace-step-1.5`). */
13200
+ readonly engine: string;
13201
+ readonly id: components$1['schemas']['MediaOpId'];
13202
+ /** @description Asset kinds accepted as input (`image`, `upload`, `frame` for image ops; `music`, `speech`, `sfx`, `upload` for audio ops). */
13203
+ readonly input_kinds: readonly string[];
13204
+ /**
13205
+ * @description `gpu` / `cpu` = the codai Studio media service, `vertex` = Gemini image edit.
13206
+ * @enum {string}
13207
+ */
13208
+ readonly lane: 'gpu' | 'vertex' | 'cpu';
13209
+ readonly max_inputs: number;
13210
+ readonly min_inputs: number;
13211
+ /**
13212
+ * @description `sync` answers 200 with the outputs; `async` answers 202 with a job.
13213
+ * @enum {string}
13214
+ */
13215
+ readonly mode: 'sync' | 'async';
13216
+ /** @description Caveat for the op, when there is one (mask ops: the mask is followed closely, not pixel-exactly). */
13217
+ readonly note?: string;
13218
+ /** @description Kind of the stored outputs (`image`, `music`, `sfx`, `midi`), `same` (the kind of the first input) or `analysis` (JSON only, no asset). */
13219
+ readonly output_kind: string;
13220
+ /** @description The same as a wallet amount, EUR micros. */
13221
+ readonly quote_micro_eur: number;
13222
+ /** @description List price for the reference input (`quote_basis`), USD micros. */
13223
+ readonly quote_micro_usd: number;
13224
+ /** @description Human-readable name. */
13225
+ readonly title: string;
13226
+ };
13227
+ /**
13228
+ * Media op id
13229
+ * @enum {string}
13230
+ */
13231
+ readonly MediaOpId: 'image.remove_background' | 'image.upscale' | 'image.inpaint' | 'image.outpaint' | 'image.erase' | 'audio.separate_stems' | 'audio.denoise' | 'audio.to_midi' | 'audio.master' | 'audio.analyze' | 'music.generate_ace' | 'music.repaint' | 'music.extend' | 'music.cover' | 'sfx.generate';
13232
+ /** Media op job */
13233
+ readonly MediaOpJob: {
13234
+ readonly analysis: {
13235
+ readonly [key: string]: unknown;
13236
+ } | null;
13237
+ /** @description Billed cost, USD micros (0 until settled). */
13238
+ readonly cost_micro_usd: number;
13239
+ /** Format: date-time */
13240
+ readonly created_at: string;
13241
+ /** @description Failure reason (`timeout`, `input_refused`, `dispatch_failed`, `store_failed` or an engine message). */
13242
+ readonly error: string | null;
13243
+ /** Format: uuid */
13244
+ readonly id: string;
13245
+ /** @enum {string} */
13246
+ readonly object: 'media_op.job';
13247
+ readonly op: components$1['schemas']['MediaOpId'];
13248
+ /** @description Stored outputs once `ready` (stems: one asset per stem). */
13249
+ readonly outputs: readonly components$1['schemas']['AssetDto'][];
13250
+ /**
13251
+ * Format: uuid
13252
+ * @description The first input asset (lineage).
13253
+ */
13254
+ readonly parent_asset_id: string | null;
13255
+ /**
13256
+ * @description `pending` while the engine runs; `ready` with outputs; `failed` with `error` (the hold is released, nothing billed).
13257
+ * @enum {string}
13258
+ */
13259
+ readonly status: 'pending' | 'ready' | 'failed';
13260
+ /** Format: date-time */
13261
+ readonly updated_at: string;
13262
+ };
13263
+ /** Media op catalogue */
13264
+ readonly MediaOpList: {
13265
+ readonly data: readonly components$1['schemas']['MediaOp'][];
13266
+ /** @enum {string} */
13267
+ readonly object: 'list';
13268
+ /** @description Reference input of the list quotes. */
13269
+ readonly quote_basis: string;
13270
+ };
13271
+ /** Media op quote */
13272
+ readonly MediaOpQuote: {
13273
+ /** @enum {string} */
13274
+ readonly mode: 'sync' | 'async';
13275
+ /** @enum {string} */
13276
+ readonly object: 'media_op.quote';
13277
+ readonly op: components$1['schemas']['MediaOpId'];
13278
+ /** @description Wallet hold for this request, EUR micros. */
13279
+ readonly quote_micro_eur: number;
13280
+ /** @description Upstream cost ceiling, USD micros. */
13281
+ readonly quote_micro_usd: number;
13282
+ };
13283
+ /**
13284
+ * Media op request
13285
+ * @description `asset_ids` are the inputs, in order; `params` are validated strictly per op (unknown keys are rejected):
13286
+ *
13287
+ * | Op | Assets | Params (defaults) |
13288
+ * | --- | --- | --- |
13289
+ * | `image.remove_background` | 1 image | `format`: `png` \| `webp` (`png`) |
13290
+ * | `image.upscale` | 1 image | `scale`: 2 \| 4 (4); output at most 64 MP |
13291
+ * | `image.inpaint` | image + PNG mask | `prompt` (required, ≤ 2000), `model`, `image_size`: `1K` \| `2K` \| `4K` |
13292
+ * | `image.erase` | image + PNG mask | `prompt` (optional), `model`, `image_size` |
13293
+ * | `image.outpaint` | 1 image | `aspect_ratio` (required: `1:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`, `9:21`), `prompt`, `model`, `image_size` |
13294
+ * | `audio.separate_stems` | 1 audio | `stems`: 2 \| 4 (4: vocals, drums, bass, other; 2: vocals, accompaniment) |
13295
+ * | `audio.denoise` | 1 audio | `strength`: 0–1 (1) |
13296
+ * | `audio.to_midi` | 1 audio | `onset_threshold`: 0.05–0.95 (0.5), `min_note_ms`: 10–1000 (58) |
13297
+ * | `audio.master` | 1 audio | `target_lufs`: -14 \| -16 \| -23 (-14), `true_peak_db`: -3…-0.1 (-1), `format`: `wav` \| `mp3` (`wav`) |
13298
+ * | `audio.analyze` | 1 audio | none |
13299
+ * | `music.generate_ace` | 0–1 audio | `prompt` (required, ≤ 1000), `lyrics` (≤ 4000), `duration_seconds`: 10–240 (60), `bpm`: 40–220, `key`, `language`, `seed` |
13300
+ * | `music.repaint` | 1 audio | `prompt`, `lyrics`, `start_seconds`, `end_seconds` (after start), `seed` |
13301
+ * | `music.extend` | 1 audio | `prompt`, `lyrics`, `extend_seconds`: 5–120, `seed` |
13302
+ * | `music.cover` | 1 audio | `prompt`, `lyrics`, `strength`: 0–1 (0.8), `seed` |
13303
+ * | `sfx.generate` | none | `prompt` (required), `duration_seconds`: 1–30 (5), `seed` |
13304
+ * @example {
13305
+ * "asset_ids": [
13306
+ * "3f2b8c1e-0000-4000-8000-000000000001"
13307
+ * ],
13308
+ * "params": {
13309
+ * "stems": 4
13310
+ * }
13311
+ * }
13312
+ */
13313
+ readonly MediaOpRequest: {
13314
+ /**
13315
+ * @description Owned, ready Studio asset ids, distinct, in the order the op expects (mask second).
13316
+ * @default []
13317
+ */
13318
+ readonly asset_ids?: readonly string[];
13319
+ /** @description image.inpaint / image.erase only: a mask painted in an editor, base64 PNG (white = edit, black = keep, at most 8 MB). Send ONE asset id (the image); the gateway stores the mask as a free private asset and passes it as the second input. A quote validates it without storing anything. */
13320
+ readonly mask_png_b64?: string;
13321
+ /**
13322
+ * @description Per-op parameters (table above).
13323
+ * @default {}
13324
+ */
13325
+ readonly params?: {
13326
+ readonly [key: string]: unknown;
13327
+ };
13328
+ };
13329
+ /** Media op result */
13330
+ readonly MediaOpResult: {
13331
+ /** @description `audio.analyze`: `{ duration_seconds, bpm, key, key_confidence, integrated_lufs, sample_peak_dbfs }`; otherwise `null`. */
13332
+ readonly analysis: {
13333
+ readonly [key: string]: unknown;
13334
+ } | null;
13335
+ /** @description Billed cost, USD micros. */
13336
+ readonly cost_micro_usd: number;
13337
+ /** @enum {string} */
13338
+ readonly object: 'media_op.result';
13339
+ readonly op: components$1['schemas']['MediaOpId'];
13340
+ /** @description Stored outputs, AI-marked, each with lineage to the first input (empty for `audio.analyze`). */
13341
+ readonly outputs: readonly components$1['schemas']['AssetDto'][];
13342
+ /** @enum {string} */
13343
+ readonly status: 'ready';
13344
+ };
12580
13345
  /**
12581
13346
  * Media response format
12582
13347
  * @description `b64_json` (default) returns the bytes inline, base64-encoded — the original shape. `url` stores the result as an asset (kept 90 days) and returns `AssetDto` items with a 1-hour signed `url`; 503 `assets_unavailable` when storage is not configured.
@@ -14804,6 +15569,41 @@ type components$1 = {
14804
15569
  */
14805
15570
  readonly surface: 'share' | 'review';
14806
15571
  };
15572
+ /**
15573
+ * Audio render
15574
+ * @description An audio creative render as returned by `GET /v1/studio/renders/{id}` (`target: audio`).
15575
+ */
15576
+ readonly StudioAudioRender: {
15577
+ readonly cost_micro_usd?: string;
15578
+ /** Format: uuid */
15579
+ readonly creative_id: string;
15580
+ /** @description One stored, AI-marked asset per output (1-hour signed `url`), only when `succeeded`. */
15581
+ readonly data?: readonly (components$1['schemas']['AssetDto'] & {
15582
+ /** @enum {string} */
15583
+ readonly format: 'wav' | 'mp3' | 'flac' | 'lrc';
15584
+ /** @enum {string} */
15585
+ readonly output: 'mix' | 'stem' | 'lrc';
15586
+ readonly track_id: string | null;
15587
+ })[];
15588
+ readonly duration_seconds?: number | null;
15589
+ readonly error: string | null;
15590
+ readonly formats: readonly ('wav' | 'mp3' | 'flac')[];
15591
+ /** Format: uuid */
15592
+ readonly id: string;
15593
+ readonly lrc: boolean;
15594
+ readonly model: string;
15595
+ /** @enum {string} */
15596
+ readonly object: 'studio.render';
15597
+ readonly progress?: number | null;
15598
+ /** @description Measured `lufs`, `true_peak_db`, `clipping`, `warnings` of the master. */
15599
+ readonly qa?: Record<string, never> | null;
15600
+ readonly stage?: string | null;
15601
+ readonly status: components$1['schemas']['StudioRenderStatus'];
15602
+ readonly stems: boolean;
15603
+ /** @enum {string} */
15604
+ readonly target: 'audio';
15605
+ readonly target_lufs: number;
15606
+ };
14807
15607
  /** Studio batch */
14808
15608
  readonly StudioBatch: {
14809
15609
  /** @description The CSV header and the column mapping. */
@@ -15111,6 +15911,80 @@ type components$1 = {
15111
15911
  readonly seq: number;
15112
15912
  };
15113
15913
  };
15914
+ /**
15915
+ * Carousel / print build
15916
+ * @description A carousel or print creative queued for its paged export; download it from `export.url` once the export succeeds.
15917
+ * @example {
15918
+ * "object": "studio.creative_build",
15919
+ * "creative_id": "7a1b2c3d-0000-4000-8000-000000000051",
15920
+ * "seq": 3,
15921
+ * "kind": "carousel",
15922
+ * "format": "png",
15923
+ * "format_id": "4x5",
15924
+ * "pages": 6,
15925
+ * "quote_micro_usd": "12000",
15926
+ * "warnings": [],
15927
+ * "lint": [],
15928
+ * "print": null,
15929
+ * "document": null,
15930
+ * "export": {
15931
+ * "id": "3f0c9a7e-1b2d-4c5e-8f90-a1b2c3d4e5f7",
15932
+ * "object": "studio.export",
15933
+ * "kind": "carousel_png",
15934
+ * "status": "queued",
15935
+ * "creative_id": "7a1b2c3d-0000-4000-8000-000000000051",
15936
+ * "seq": 3,
15937
+ * "format": "4x5",
15938
+ * "fps": 0,
15939
+ * "filename": "spring-sale-4x5.zip",
15940
+ * "url": null,
15941
+ * "expires_at": null,
15942
+ * "bytes": null,
15943
+ * "rendered_seconds": null,
15944
+ * "cost_micro_usd": null,
15945
+ * "pages": null,
15946
+ * "boxes": null,
15947
+ * "lint": [],
15948
+ * "warnings": [],
15949
+ * "error": null,
15950
+ * "created_at": "2026-10-20T10:00:00Z"
15951
+ * }
15952
+ * }
15953
+ */
15954
+ readonly StudioCreativePagedBuild: {
15955
+ /** Format: uuid */
15956
+ readonly creative_id: string;
15957
+ readonly document: null;
15958
+ readonly export: components$1['schemas']['StudioExport'];
15959
+ /** @enum {string} */
15960
+ readonly format: 'png' | 'pdf';
15961
+ readonly format_id: string;
15962
+ /** @enum {string} */
15963
+ readonly kind: 'carousel' | 'print';
15964
+ readonly lint: readonly components$1['schemas']['CreativePrintLintIssue'][];
15965
+ /** @enum {string} */
15966
+ readonly object: 'studio.creative_build';
15967
+ readonly pages: number;
15968
+ /** @description Print PDFs only — physical sheet and PDF boxes. */
15969
+ readonly print: {
15970
+ /** @description BleedBox offsets from the TrimBox in points [left, right, top, bottom]. */
15971
+ readonly bleed_offsets_pt?: readonly number[] | null;
15972
+ /** @description Intended press output intent (e.g. `FOGRA39`); the file itself is RGB. */
15973
+ readonly color_profile?: string;
15974
+ readonly crop_marks?: boolean;
15975
+ /** @description Always `false` today (no PDF/X-4 conversion in the worker). */
15976
+ readonly pdf_x4?: boolean;
15977
+ /** @description Sheet (MediaBox) width and height in mm, bleed and crop-mark margin included. */
15978
+ readonly sheet_mm?: readonly number[];
15979
+ /** @description TrimBox offsets from the MediaBox in points [left, right, top, bottom]. */
15980
+ readonly trim_offsets_pt?: readonly number[] | null;
15981
+ } | null;
15982
+ /** @description Price held for the job in µUSD ($0.002 per page, min $0.01). */
15983
+ readonly quote_micro_usd: string;
15984
+ readonly seq: number;
15985
+ /** @description E.g. the PDF/X-4 limitation of print PDFs, or a note that the prepress check found errors. */
15986
+ readonly warnings: readonly string[];
15987
+ };
15114
15988
  /**
15115
15989
  * Studio export
15116
15990
  * @description An export of a video creative, downloadable once `status` is `succeeded`: an FCPXML zip with `project.fcpxml` and its media (`kind: fcpxml`), or a Lottie JSON / dotLottie file (`kind: lottie`, ready at once).
@@ -15135,6 +16009,8 @@ type components$1 = {
15135
16009
  * }
15136
16010
  */
15137
16011
  readonly StudioExport: {
16012
+ /** @description Print PDF only: TrimBox and BleedBox were written on every page; `null` until `succeeded`. */
16013
+ readonly boxes?: boolean | null;
15138
16014
  /** @description Size of the zip in bytes; `null` until `succeeded`. */
15139
16015
  readonly bytes: number | null;
15140
16016
  /**
@@ -15170,12 +16046,16 @@ type components$1 = {
15170
16046
  /** Format: uuid */
15171
16047
  readonly id: string;
15172
16048
  /**
15173
- * @description What was exported: an FCPXML project zip (`export.fcpxml`) or a Lottie file (`export.lottie`).
16049
+ * @description What was exported: an FCPXML project zip (`export.fcpxml`), a Lottie file (`export.lottie`), or a paged build of `POST /v1/studio/creatives/{id}/build`: a carousel PNG zip, a carousel PDF or a print PDF.
15174
16050
  * @enum {string}
15175
16051
  */
15176
- readonly kind?: 'fcpxml' | 'lottie';
16052
+ readonly kind?: 'fcpxml' | 'lottie' | 'carousel_png' | 'carousel_pdf' | 'print_pdf';
16053
+ /** @description Paged builds only: prepress issues found at dispatch. */
16054
+ readonly lint?: readonly components$1['schemas']['CreativePrintLintIssue'][];
15177
16055
  /** @enum {string} */
15178
16056
  readonly object: 'studio.export';
16057
+ /** @description Paged builds only: pages in the file; `null` until `succeeded`. */
16058
+ readonly pages?: number | null;
15179
16059
  /** @description Seconds of video newly rendered for this export (cached segments excluded); `null` until done. */
15180
16060
  readonly rendered_seconds: number | null;
15181
16061
  /** @description The exported creative version. */
@@ -15190,6 +16070,119 @@ type components$1 = {
15190
16070
  /** @description Non-fatal problems, e.g. audio assets that were skipped because they are missing or not ready. */
15191
16071
  readonly warnings: readonly string[];
15192
16072
  };
16073
+ /** Written lyrics */
16074
+ readonly StudioLyrics: {
16075
+ /** @description Charge in micro-USD (string, bigint-safe): the token cost of the turns. */
16076
+ readonly cost_micro_usd: string;
16077
+ /** @enum {string} */
16078
+ readonly language: 'ro' | 'en';
16079
+ /** @enum {string} */
16080
+ readonly object: 'studio.lyrics';
16081
+ /** @description True when the second (repair) turn produced the returned lyrics. */
16082
+ readonly repaired: boolean;
16083
+ /** @description Syllable and rhyme check of the returned lyrics. */
16084
+ readonly report: {
16085
+ readonly lines: number;
16086
+ readonly off_lines: number;
16087
+ readonly off_ratio: number;
16088
+ readonly pairs: number;
16089
+ readonly repair_ratio: number;
16090
+ readonly rhymed: number;
16091
+ };
16092
+ /** @enum {string} */
16093
+ readonly rhyme_scheme: 'AABB' | 'ABAB' | 'free';
16094
+ readonly sections: readonly {
16095
+ readonly kind: components$1['schemas']['StudioLyricsSectionKind'];
16096
+ readonly lines: readonly components$1['schemas']['StudioLyricsLine'][];
16097
+ }[];
16098
+ readonly syllables_per_line: number | null;
16099
+ /** @description The whole song as text, one `[kind]` header per section (ready for `lyrics_text` of the align call). */
16100
+ readonly text: string;
16101
+ readonly title: string | null;
16102
+ };
16103
+ /** Lyrics alignment */
16104
+ readonly StudioLyricsAlignment: {
16105
+ readonly applied: boolean;
16106
+ /** @description True when the cached words of the clip were used (no transcription charge). */
16107
+ readonly cached: boolean;
16108
+ readonly clip_id: string;
16109
+ readonly cost_micro_usd: string;
16110
+ /** Format: uuid */
16111
+ readonly creative_id: string;
16112
+ readonly doc_hash?: string;
16113
+ /** @description Timed lines on the document timeline (the `setLyrics` payload). */
16114
+ readonly lines: readonly {
16115
+ readonly endMs: number;
16116
+ readonly sectionId?: string;
16117
+ readonly startMs: number;
16118
+ readonly text: string;
16119
+ }[];
16120
+ /** @description The lines as an LRC file. */
16121
+ readonly lrc: string;
16122
+ /** @description Share of lyric words matched to a transcribed word. */
16123
+ readonly match_ratio: number;
16124
+ /** @enum {string} */
16125
+ readonly object: 'studio.lyrics_alignment';
16126
+ /** @description The new version, when applied. */
16127
+ readonly seq?: number;
16128
+ };
16129
+ /** Lyrics alignment request */
16130
+ readonly StudioLyricsAlignRequest: {
16131
+ /**
16132
+ * @description false returns the timed lines and LRC without editing the creative.
16133
+ * @default true
16134
+ */
16135
+ readonly apply?: boolean;
16136
+ /** @description Version the setLyrics edit is based on (default the head). */
16137
+ readonly base_seq?: number;
16138
+ /** @description The audio clip of the creative to align to (its asset must be a ready speech, music, video or upload asset). */
16139
+ readonly clip_id: string;
16140
+ readonly creative_id: string;
16141
+ /**
16142
+ * @description Transcription language hint (default the document `meta.language`).
16143
+ * @enum {string}
16144
+ */
16145
+ readonly language?: 'ro' | 'en';
16146
+ /** @description The lyrics as text; `[verse]` / `[chorus]` header lines start sections. */
16147
+ readonly lyrics_text: string;
16148
+ /** @description Ignore the cached words of the clip asset and transcribe again (billed). */
16149
+ readonly retranscribe?: boolean;
16150
+ };
16151
+ /** Checked lyric line */
16152
+ readonly StudioLyricsLine: {
16153
+ /** @description Rhyme letter of the line inside its section (A, B, ...). */
16154
+ readonly letter: string;
16155
+ /** @description True when the syllable count is outside the target ±1. */
16156
+ readonly off: boolean;
16157
+ /** @description The rhyme ending used for the scheme check. */
16158
+ readonly rhyme: string;
16159
+ /** @description Counted syllables (Romanian or English rules). */
16160
+ readonly syllables: number;
16161
+ readonly text: string;
16162
+ };
16163
+ /** Lyrics request */
16164
+ readonly StudioLyricsRequest: {
16165
+ /** @description What the song is about (3-4000 chars). Never logged. */
16166
+ readonly brief: string;
16167
+ readonly genre?: string;
16168
+ /** @enum {string} */
16169
+ readonly language: 'ro' | 'en';
16170
+ /** @default 4 */
16171
+ readonly lines_per_section?: number;
16172
+ readonly mood?: string;
16173
+ /**
16174
+ * @default free
16175
+ * @enum {string}
16176
+ */
16177
+ readonly rhyme_scheme?: 'AABB' | 'ABAB' | 'free';
16178
+ /** @description Section order (default verse, chorus, verse, chorus, bridge, chorus). */
16179
+ readonly structure?: readonly components$1['schemas']['StudioLyricsSectionKind'][];
16180
+ /** @description Target syllables per line (checked with a tolerance of 1). */
16181
+ readonly syllables_per_line?: number;
16182
+ readonly title?: string;
16183
+ };
16184
+ /** @enum {string} */
16185
+ readonly StudioLyricsSectionKind: 'intro' | 'verse' | 'pre_chorus' | 'chorus' | 'bridge' | 'outro' | 'instrumental' | 'custom';
15193
16186
  /** Narration defaults */
15194
16187
  readonly StudioNarrationDefaults: {
15195
16188
  /** @description Delivery instructions for expressive voices. */
@@ -15205,6 +16198,113 @@ type components$1 = {
15205
16198
  /** @description Default voice. */
15206
16199
  readonly voice?: string;
15207
16200
  };
16201
+ /**
16202
+ * Post copy
16203
+ * @example {
16204
+ * "object": "studio.post_copy",
16205
+ * "creative_id": "7a1b2c3d-0000-4000-8000-000000000051",
16206
+ * "seq": 3,
16207
+ * "kind": "carousel",
16208
+ * "language": "ro",
16209
+ * "platforms": [
16210
+ * {
16211
+ * "platform": "linkedin",
16212
+ * "caption": "Primăvara vine cu reduceri de 20% la toată colecția.",
16213
+ * "hashtags": [
16214
+ * "#primăvară",
16215
+ * "#reduceri"
16216
+ * ],
16217
+ * "text": "Primăvara vine cu reduceri de 20% la toată colecția.\n\n#primăvară #reduceri",
16218
+ * "chars": 74,
16219
+ * "limits": {
16220
+ * "caption": 3000,
16221
+ * "hashtags": 10,
16222
+ * "alt": 300
16223
+ * }
16224
+ * }
16225
+ * ],
16226
+ * "alt": [
16227
+ * {
16228
+ * "scene_id": "s1",
16229
+ * "text": "Un buchet de lalele galbene pe o masă albă."
16230
+ * }
16231
+ * ],
16232
+ * "fixes": [],
16233
+ * "cost_micro_usd": "2140"
16234
+ * }
16235
+ */
16236
+ readonly StudioPostCopy: {
16237
+ /** @description One alt text per slide in slide order (the first scene of an image), trimmed to the strictest platform's cap. */
16238
+ readonly alt: readonly {
16239
+ readonly scene_id: string;
16240
+ readonly text: string;
16241
+ }[];
16242
+ /** @description Token cost of the turn in µUSD. */
16243
+ readonly cost_micro_usd: string;
16244
+ /** Format: uuid */
16245
+ readonly creative_id: string;
16246
+ /** @description What the limit repair changed (trimmed captions, dropped or capped hashtags, missing alt texts). */
16247
+ readonly fixes: readonly {
16248
+ /** @enum {string} */
16249
+ readonly field?: 'caption' | 'hashtags' | 'alt';
16250
+ readonly message?: string;
16251
+ readonly platform?: string;
16252
+ }[];
16253
+ /** @enum {string} */
16254
+ readonly kind: 'carousel' | 'image' | 'video';
16255
+ /** @enum {string} */
16256
+ readonly language: 'ro' | 'en';
16257
+ /** @enum {string} */
16258
+ readonly object: 'studio.post_copy';
16259
+ /** @description One entry per requested platform, in request order. */
16260
+ readonly platforms: readonly {
16261
+ readonly caption: string;
16262
+ /** @description Length of `text` in Unicode code points. */
16263
+ readonly chars: number;
16264
+ /** @description Normalised `#tags` (letters, digits, underscore; diacritics kept), deduplicated. */
16265
+ readonly hashtags: readonly string[];
16266
+ readonly limits: {
16267
+ readonly alt?: number;
16268
+ readonly caption?: number;
16269
+ readonly hashtags?: number;
16270
+ };
16271
+ /** @enum {string} */
16272
+ readonly platform: 'instagram' | 'linkedin' | 'tiktok' | 'x' | 'facebook';
16273
+ /** @description The post as published — caption, a blank line, then the hashtags not already in the caption. */
16274
+ readonly text: string;
16275
+ }[];
16276
+ readonly seq: number;
16277
+ };
16278
+ /**
16279
+ * Post copy request
16280
+ * @example {
16281
+ * "platforms": [
16282
+ * "instagram",
16283
+ * "linkedin"
16284
+ * ],
16285
+ * "language": "ro",
16286
+ * "brief": "Reducere 20% până duminică"
16287
+ * }
16288
+ */
16289
+ readonly StudioPostCopyRequest: {
16290
+ /** @description Optional steer — audience, call to action, facts to include. */
16291
+ readonly brief?: string;
16292
+ /**
16293
+ * @default ro
16294
+ * @enum {string}
16295
+ */
16296
+ readonly language?: 'ro' | 'en';
16297
+ /**
16298
+ * @default [
16299
+ * "instagram",
16300
+ * "linkedin"
16301
+ * ]
16302
+ */
16303
+ readonly platforms?: readonly ('instagram' | 'linkedin' | 'tiktok' | 'x' | 'facebook')[];
16304
+ /** @description Creative version to describe (default the head). */
16305
+ readonly seq?: number;
16306
+ readonly tone?: string;
16307
+ };
15208
16308
  /** Studio production */
15209
16309
  readonly StudioProduction: {
15210
16310
  /** @enum {string} */
@@ -17351,6 +18451,8 @@ type components$1 = {
17351
18451
  readonly EnvironmentId: string;
17352
18452
  /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
17353
18453
  readonly IdempotencyKey: string;
18454
+ /** @description Dotted media-op id, e.g. `image.remove_background` or `audio.separate_stems`. */
18455
+ readonly MediaOpIdPath: components$1['schemas']['MediaOpId'];
17354
18456
  /** @description Project UUID. A malformed value is 400; an unknown or foreign project is 404. */
17355
18457
  readonly ProjectId: string;
17356
18458
  /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
@@ -27286,6 +28388,8 @@ interface operations$1 {
27286
28388
  readonly parameters: {
27287
28389
  readonly query?: never;
27288
28390
  readonly header?: {
28391
+ /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
28392
+ readonly 'Idempotency-Key'?: components$1['parameters']['IdempotencyKey'];
27289
28393
  /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
27290
28394
  readonly 'x-request-id'?: components$1['parameters']['RequestId'];
27291
28395
  };
@@ -27297,7 +28401,7 @@ interface operations$1 {
27297
28401
  };
27298
28402
  readonly requestBody?: {
27299
28403
  readonly content: {
27300
- readonly 'application/json': components$1['schemas']['CreativeBuildRequest'];
28404
+ readonly 'application/json': components$1['schemas']['CreativeBuildRequest'] | components$1['schemas']['CreativePagedBuildRequest'];
27301
28405
  };
27302
28406
  };
27303
28407
  readonly responses: {
@@ -27310,7 +28414,16 @@ interface operations$1 {
27310
28414
  readonly 'application/json': components$1['schemas']['StudioCreativeBuild'];
27311
28415
  };
27312
28416
  };
27313
- /** @description Invalid body (`invalid_request`), a video or image creative (`not_supported_for_kind`), a converted spec that fails the documents schema (`invalid_spec`, first issues in the message), or any build error of `POST /v1/studio/documents` (`asset_not_found`, `unsupported_image`, `too_many_charts`, `chart_render_failed`). */
28417
+ /** @description Carousel or print creative — export job queued (poll `GET /v1/studio/exports/{id}`). */
28418
+ readonly 202: {
28419
+ headers: {
28420
+ readonly [name: string]: unknown;
28421
+ };
28422
+ content: {
28423
+ readonly 'application/json': components$1['schemas']['StudioCreativePagedBuild'];
28424
+ };
28425
+ };
28426
+ /** @description Invalid body (`invalid_request`, e.g. `format: png` on a print creative or an unknown `format_id`), a video or image creative (`not_supported_for_kind`), a converted spec that fails the documents schema (`invalid_spec`, first issues in the message), a PNG slide larger than 3840 px (`unsupported_format`), or any build error of `POST /v1/studio/documents` (`asset_not_found`, `unsupported_image`, `too_many_charts`, `chart_render_failed`). */
27314
28427
  readonly 400: {
27315
28428
  headers: {
27316
28429
  readonly [name: string]: unknown;
@@ -27331,7 +28444,7 @@ interface operations$1 {
27331
28444
  readonly 'application/json': components$1['schemas']['Error'];
27332
28445
  };
27333
28446
  };
27334
- /** @description The generated file is larger than 50 MB (code `document_too_large`). */
28447
+ /** @description The generated file is larger than 50 MB (code `document_too_large`), or a paged build has more than 60 pages (`too_large`). */
27335
28448
  readonly 413: {
27336
28449
  headers: {
27337
28450
  readonly [name: string]: unknown;
@@ -27340,7 +28453,7 @@ interface operations$1 {
27340
28453
  readonly 'application/json': components$1['schemas']['Error'];
27341
28454
  };
27342
28455
  };
27343
- /** @description Spend cap reached (`rate_limit_exceeded`), or with `preview: true` 3 previews already queued or rendering (`too_many_previews`). */
28456
+ /** @description Spend cap reached (`rate_limit_exceeded`), with `preview: true` 3 previews already queued or rendering (`too_many_previews`), or for carousel / print 3 renders and exports already running (`too_many_renders`). */
27344
28457
  readonly 429: {
27345
28458
  headers: {
27346
28459
  readonly [name: string]: unknown;
@@ -27349,7 +28462,7 @@ interface operations$1 {
27349
28462
  readonly 'application/json': components$1['schemas']['Error'];
27350
28463
  };
27351
28464
  };
27352
- /** @description Studio documents are not configured on this gateway (code `documents_unavailable`). */
28465
+ /** @description Studio documents are not configured on this gateway (code `documents_unavailable`), or for carousel / print the render worker is not (`renders_unavailable`). */
27353
28466
  readonly 503: {
27354
28467
  headers: {
27355
28468
  readonly [name: string]: unknown;
@@ -28194,6 +29307,60 @@ interface operations$1 {
28194
29307
  };
28195
29308
  };
28196
29309
  };
29310
+ readonly regenerateCreativeNode: {
29311
+ readonly parameters: {
29312
+ readonly query?: never;
29313
+ readonly header?: {
29314
+ /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
29315
+ readonly 'Idempotency-Key'?: components$1['parameters']['IdempotencyKey'];
29316
+ /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
29317
+ readonly 'x-request-id'?: components$1['parameters']['RequestId'];
29318
+ };
29319
+ readonly path: {
29320
+ /** @description Creative UUID. A malformed, unknown, deleted or foreign id is 404. */
29321
+ readonly id: components$1['parameters']['CreativeId'];
29322
+ readonly nodeId: string;
29323
+ };
29324
+ readonly cookie?: never;
29325
+ };
29326
+ readonly requestBody: {
29327
+ readonly content: {
29328
+ readonly 'application/json': components$1['schemas']['CreativeRegenerateNodeRequest'];
29329
+ };
29330
+ };
29331
+ readonly responses: {
29332
+ /** @description New version appended. */
29333
+ readonly 200: {
29334
+ headers: {
29335
+ readonly [name: string]: unknown;
29336
+ };
29337
+ content: {
29338
+ readonly 'application/json': components$1['schemas']['CreativeRegenerateNodeResult'];
29339
+ };
29340
+ };
29341
+ /** @description Malformed body, not an image node (`invalid_request`), audio creative (`unsupported_kind`), filtered output (`content_filtered`, nothing charged). */
29342
+ readonly 400: {
29343
+ headers: {
29344
+ readonly [name: string]: unknown;
29345
+ };
29346
+ content: {
29347
+ readonly 'application/json': components$1['schemas']['CreativeError'];
29348
+ };
29349
+ };
29350
+ readonly 401: components$1['responses']['Unauthorized'];
29351
+ readonly 402: components$1['responses']['InsufficientFunds'];
29352
+ readonly 404: components$1['responses']['NotFound'];
29353
+ /** @description The creative changed since `base_seq` and the change overlaps (code `stale`). */
29354
+ readonly 409: {
29355
+ headers: {
29356
+ readonly [name: string]: unknown;
29357
+ };
29358
+ content: {
29359
+ readonly 'application/json': components$1['schemas']['CreativeError'];
29360
+ };
29361
+ };
29362
+ };
29363
+ };
28197
29364
  readonly applyCreativeOps: {
28198
29365
  readonly parameters: {
28199
29366
  readonly query?: never;
@@ -28278,6 +29445,79 @@ interface operations$1 {
28278
29445
  readonly 404: components$1['responses']['NotFound'];
28279
29446
  };
28280
29447
  };
29448
+ readonly writeCreativePostCopy: {
29449
+ readonly parameters: {
29450
+ readonly query?: never;
29451
+ readonly header?: {
29452
+ /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
29453
+ readonly 'Idempotency-Key'?: components$1['parameters']['IdempotencyKey'];
29454
+ /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
29455
+ readonly 'x-request-id'?: components$1['parameters']['RequestId'];
29456
+ };
29457
+ readonly path: {
29458
+ /** @description Creative UUID. A malformed, unknown, deleted or foreign id is 404. */
29459
+ readonly id: components$1['parameters']['CreativeId'];
29460
+ };
29461
+ readonly cookie?: never;
29462
+ };
29463
+ readonly requestBody?: {
29464
+ readonly content: {
29465
+ readonly 'application/json': components$1['schemas']['StudioPostCopyRequest'];
29466
+ };
29467
+ };
29468
+ readonly responses: {
29469
+ /** @description Post copy per platform, within each platform's limits. */
29470
+ readonly 200: {
29471
+ headers: {
29472
+ readonly [name: string]: unknown;
29473
+ };
29474
+ content: {
29475
+ readonly 'application/json': components$1['schemas']['StudioPostCopy'];
29476
+ };
29477
+ };
29478
+ /** @description Invalid body (`invalid_request`), or a deck, doc, sheet, print or audio creative (`not_supported_for_kind`). */
29479
+ readonly 400: {
29480
+ headers: {
29481
+ readonly [name: string]: unknown;
29482
+ };
29483
+ content: {
29484
+ readonly 'application/json': components$1['schemas']['CreativeError'];
29485
+ };
29486
+ };
29487
+ readonly 401: components$1['responses']['Unauthorized'];
29488
+ readonly 402: components$1['responses']['InsufficientFunds'];
29489
+ readonly 403: components$1['responses']['Forbidden'];
29490
+ /** @description Unknown creative or `seq` (`not_found`). */
29491
+ readonly 404: {
29492
+ headers: {
29493
+ readonly [name: string]: unknown;
29494
+ };
29495
+ content: {
29496
+ readonly 'application/json': components$1['schemas']['CreativeError'];
29497
+ };
29498
+ };
29499
+ /** @description The model answer could not be used (`no_post_copy`); only the turn that ran is billed. */
29500
+ readonly 422: {
29501
+ headers: {
29502
+ readonly [name: string]: unknown;
29503
+ };
29504
+ content: {
29505
+ readonly 'application/json': components$1['schemas']['CreativeError'];
29506
+ };
29507
+ };
29508
+ readonly 429: components$1['responses']['RateLimited'];
29509
+ readonly 502: components$1['responses']['UpstreamError'];
29510
+ /** @description The turn did not finish within 60 s (`timeout`). */
29511
+ readonly 504: {
29512
+ headers: {
29513
+ readonly [name: string]: unknown;
29514
+ };
29515
+ content: {
29516
+ readonly 'application/json': components$1['schemas']['CreativeError'];
29517
+ };
29518
+ };
29519
+ };
29520
+ };
28281
29521
  readonly renderCreative: {
28282
29522
  readonly parameters: {
28283
29523
  readonly query?: never;
@@ -28295,7 +29535,7 @@ interface operations$1 {
28295
29535
  };
28296
29536
  readonly requestBody?: {
28297
29537
  readonly content: {
28298
- readonly 'application/json': components$1['schemas']['CreativeRenderRequest'];
29538
+ readonly 'application/json': components$1['schemas']['CreativeRenderRequest'] | components$1['schemas']['CreativeAudioRenderRequest'];
28299
29539
  };
28300
29540
  };
28301
29541
  readonly responses: {
@@ -28314,10 +29554,10 @@ interface operations$1 {
28314
29554
  readonly [name: string]: unknown;
28315
29555
  };
28316
29556
  content: {
28317
- readonly 'application/json': components$1['schemas']['CreativeRenderAccepted'];
29557
+ readonly 'application/json': components$1['schemas']['CreativeRenderAccepted'] | components$1['schemas']['CreativeAudioRenderAccepted'];
28318
29558
  };
28319
29559
  };
28320
- /** @description Invalid body, an unsupported format (`unsupported_format`), a missing asset (`asset_not_found`), a non-video creative (`not_supported_for_kind`) or `ai_label: none` on a creative with TTS narration (`ai_label_required`). */
29560
+ /** @description Invalid body, an unsupported format (`unsupported_format`), a missing asset (`asset_not_found`), a kind that cannot render (`not_supported_for_kind`), an audio creative with nothing to render (`empty_audio`) or over 20 minutes (`too_long`), `lrc: true` without timed lyrics (`no_lyrics`) or `ai_label: none` on a creative with TTS narration (`ai_label_required`). */
28321
29561
  readonly 400: {
28322
29562
  headers: {
28323
29563
  readonly [name: string]: unknown;
@@ -28884,6 +30124,56 @@ interface operations$1 {
28884
30124
  };
28885
30125
  };
28886
30126
  };
30127
+ readonly transcriptCutCreative: {
30128
+ readonly parameters: {
30129
+ readonly query?: never;
30130
+ readonly header?: {
30131
+ /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
30132
+ readonly 'x-request-id'?: components$1['parameters']['RequestId'];
30133
+ };
30134
+ readonly path: {
30135
+ /** @description Creative UUID. A malformed, unknown, deleted or foreign id is 404. */
30136
+ readonly id: components$1['parameters']['CreativeId'];
30137
+ };
30138
+ readonly cookie?: never;
30139
+ };
30140
+ readonly requestBody: {
30141
+ readonly content: {
30142
+ readonly 'application/json': components$1['schemas']['CreativeTranscriptCutRequest'];
30143
+ };
30144
+ };
30145
+ readonly responses: {
30146
+ /** @description New version appended. */
30147
+ readonly 200: {
30148
+ headers: {
30149
+ readonly [name: string]: unknown;
30150
+ };
30151
+ content: {
30152
+ readonly 'application/json': components$1['schemas']['CreativeTranscriptCutResult'];
30153
+ };
30154
+ };
30155
+ /** @description Malformed body or word range (`invalid_request`), not a video node / creative (`unsupported_kind`), or the edit rejected by the engine (`invalid`, `locked`). */
30156
+ readonly 400: {
30157
+ headers: {
30158
+ readonly [name: string]: unknown;
30159
+ };
30160
+ content: {
30161
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30162
+ };
30163
+ };
30164
+ readonly 401: components$1['responses']['Unauthorized'];
30165
+ readonly 404: components$1['responses']['NotFound'];
30166
+ /** @description No cached transcript for the clip (`captions_required`, with `node_id`), or the creative changed since `base_seq` (`stale`). */
30167
+ readonly 409: {
30168
+ headers: {
30169
+ readonly [name: string]: unknown;
30170
+ };
30171
+ content: {
30172
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30173
+ };
30174
+ };
30175
+ };
30176
+ };
28887
30177
  readonly listCreativeVariants: {
28888
30178
  readonly parameters: {
28889
30179
  readonly query?: never;
@@ -29408,6 +30698,281 @@ interface operations$1 {
29408
30698
  readonly 404: components$1['responses']['NotFound'];
29409
30699
  };
29410
30700
  };
30701
+ readonly writeStudioLyrics: {
30702
+ readonly parameters: {
30703
+ readonly query?: never;
30704
+ readonly header?: {
30705
+ /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
30706
+ readonly 'Idempotency-Key'?: components$1['parameters']['IdempotencyKey'];
30707
+ /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
30708
+ readonly 'x-request-id'?: components$1['parameters']['RequestId'];
30709
+ };
30710
+ readonly path?: never;
30711
+ readonly cookie?: never;
30712
+ };
30713
+ readonly requestBody: {
30714
+ readonly content: {
30715
+ readonly 'application/json': components$1['schemas']['StudioLyricsRequest'];
30716
+ };
30717
+ };
30718
+ readonly responses: {
30719
+ /** @description The lyrics with a per-line syllable and rhyme report. */
30720
+ readonly 200: {
30721
+ headers: {
30722
+ readonly [name: string]: unknown;
30723
+ };
30724
+ content: {
30725
+ readonly 'application/json': components$1['schemas']['StudioLyrics'];
30726
+ };
30727
+ };
30728
+ /** @description Invalid body (`invalid_request`). */
30729
+ readonly 400: {
30730
+ headers: {
30731
+ readonly [name: string]: unknown;
30732
+ };
30733
+ content: {
30734
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30735
+ };
30736
+ };
30737
+ readonly 401: components$1['responses']['Unauthorized'];
30738
+ readonly 402: components$1['responses']['InsufficientFunds'];
30739
+ readonly 403: components$1['responses']['Forbidden'];
30740
+ /** @description The brief could not be turned into lyrics (`no_lyrics`); only the turns that ran are billed. */
30741
+ readonly 422: {
30742
+ headers: {
30743
+ readonly [name: string]: unknown;
30744
+ };
30745
+ content: {
30746
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30747
+ };
30748
+ };
30749
+ readonly 429: components$1['responses']['RateLimited'];
30750
+ readonly 502: components$1['responses']['UpstreamError'];
30751
+ };
30752
+ };
30753
+ readonly alignStudioLyrics: {
30754
+ readonly parameters: {
30755
+ readonly query?: never;
30756
+ readonly header?: {
30757
+ /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
30758
+ readonly 'Idempotency-Key'?: components$1['parameters']['IdempotencyKey'];
30759
+ /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
30760
+ readonly 'x-request-id'?: components$1['parameters']['RequestId'];
30761
+ };
30762
+ readonly path?: never;
30763
+ readonly cookie?: never;
30764
+ };
30765
+ readonly requestBody: {
30766
+ readonly content: {
30767
+ readonly 'application/json': components$1['schemas']['StudioLyricsAlignRequest'];
30768
+ };
30769
+ };
30770
+ readonly responses: {
30771
+ /** @description The timed lines, the LRC and the new version when applied. */
30772
+ readonly 200: {
30773
+ headers: {
30774
+ readonly [name: string]: unknown;
30775
+ };
30776
+ content: {
30777
+ readonly 'application/json': components$1['schemas']['StudioLyricsAlignment'];
30778
+ };
30779
+ };
30780
+ /** @description Invalid body, lyrics without lines, or clip audio over 25 MB (`unsupported_media`). */
30781
+ readonly 400: {
30782
+ headers: {
30783
+ readonly [name: string]: unknown;
30784
+ };
30785
+ content: {
30786
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30787
+ };
30788
+ };
30789
+ readonly 401: components$1['responses']['Unauthorized'];
30790
+ readonly 402: components$1['responses']['InsufficientFunds'];
30791
+ /** @description EU data-residency account (`residency_unavailable`). */
30792
+ readonly 403: {
30793
+ headers: {
30794
+ readonly [name: string]: unknown;
30795
+ };
30796
+ content: {
30797
+ readonly 'application/json': components$1['schemas']['Error'];
30798
+ };
30799
+ };
30800
+ readonly 404: components$1['responses']['NotFound'];
30801
+ /** @description The creative moved past `base_seq` and the edit could not be rebased (`stale`). */
30802
+ readonly 409: {
30803
+ headers: {
30804
+ readonly [name: string]: unknown;
30805
+ };
30806
+ content: {
30807
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30808
+ };
30809
+ };
30810
+ /** @description Transcription is not configured or not available right now (`transcription_unavailable`). */
30811
+ readonly 503: {
30812
+ headers: {
30813
+ readonly [name: string]: unknown;
30814
+ };
30815
+ content: {
30816
+ readonly 'application/json': components$1['schemas']['Error'];
30817
+ };
30818
+ };
30819
+ };
30820
+ };
30821
+ readonly listStudioMediaOps: {
30822
+ readonly parameters: {
30823
+ readonly query?: never;
30824
+ readonly header?: never;
30825
+ readonly path?: never;
30826
+ readonly cookie?: never;
30827
+ };
30828
+ readonly requestBody?: never;
30829
+ readonly responses: {
30830
+ /** @description The op catalogue. */
30831
+ readonly 200: {
30832
+ headers: {
30833
+ readonly [name: string]: unknown;
30834
+ };
30835
+ content: {
30836
+ readonly 'application/json': components$1['schemas']['MediaOpList'];
30837
+ };
30838
+ };
30839
+ readonly 401: components$1['responses']['Unauthorized'];
30840
+ };
30841
+ };
30842
+ readonly runStudioMediaOp: {
30843
+ readonly parameters: {
30844
+ readonly query?: never;
30845
+ readonly header?: {
30846
+ /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
30847
+ readonly 'Idempotency-Key'?: components$1['parameters']['IdempotencyKey'];
30848
+ };
30849
+ readonly path: {
30850
+ /** @description Dotted media-op id, e.g. `image.remove_background` or `audio.separate_stems`. */
30851
+ readonly op: components$1['parameters']['MediaOpIdPath'];
30852
+ };
30853
+ readonly cookie?: never;
30854
+ };
30855
+ readonly requestBody: {
30856
+ readonly content: {
30857
+ readonly 'application/json': components$1['schemas']['MediaOpRequest'];
30858
+ };
30859
+ };
30860
+ readonly responses: {
30861
+ /** @description Sync op done: the stored, AI-marked outputs (or `analysis` for `audio.analyze`). */
30862
+ readonly 200: {
30863
+ headers: {
30864
+ readonly [name: string]: unknown;
30865
+ };
30866
+ content: {
30867
+ readonly 'application/json': components$1['schemas']['MediaOpResult'];
30868
+ };
30869
+ };
30870
+ /** @description Async op dispatched: the job (`status: pending`). */
30871
+ readonly 202: {
30872
+ headers: {
30873
+ readonly [name: string]: unknown;
30874
+ };
30875
+ content: {
30876
+ readonly 'application/json': components$1['schemas']['MediaOpJob'];
30877
+ };
30878
+ };
30879
+ readonly 400: components$1['responses']['BadRequest'];
30880
+ readonly 401: components$1['responses']['Unauthorized'];
30881
+ readonly 402: components$1['responses']['InsufficientFunds'];
30882
+ /** @description Unknown op id, or an asset that does not exist, is not ready or belongs to another account. */
30883
+ readonly 404: {
30884
+ headers: {
30885
+ readonly [name: string]: unknown;
30886
+ };
30887
+ content: {
30888
+ readonly 'application/json': components$1['schemas']['Error'];
30889
+ };
30890
+ };
30891
+ readonly 429: components$1['responses']['RateLimited'];
30892
+ readonly 502: components$1['responses']['UpstreamError'];
30893
+ /** @description The op lane is not configured on this gateway (code `media_ops_unavailable`) or asset storage is off (`assets_unavailable`). Nothing was held or billed. */
30894
+ readonly 503: {
30895
+ headers: {
30896
+ readonly [name: string]: unknown;
30897
+ };
30898
+ content: {
30899
+ readonly 'application/json': components$1['schemas']['Error'];
30900
+ };
30901
+ };
30902
+ };
30903
+ };
30904
+ readonly quoteStudioMediaOp: {
30905
+ readonly parameters: {
30906
+ readonly query?: never;
30907
+ readonly header?: never;
30908
+ readonly path: {
30909
+ /** @description Dotted media-op id, e.g. `image.remove_background` or `audio.separate_stems`. */
30910
+ readonly op: components$1['parameters']['MediaOpIdPath'];
30911
+ };
30912
+ readonly cookie?: never;
30913
+ };
30914
+ readonly requestBody: {
30915
+ readonly content: {
30916
+ readonly 'application/json': components$1['schemas']['MediaOpRequest'];
30917
+ };
30918
+ };
30919
+ readonly responses: {
30920
+ /** @description The quote. */
30921
+ readonly 200: {
30922
+ headers: {
30923
+ readonly [name: string]: unknown;
30924
+ };
30925
+ content: {
30926
+ readonly 'application/json': components$1['schemas']['MediaOpQuote'];
30927
+ };
30928
+ };
30929
+ readonly 400: components$1['responses']['BadRequest'];
30930
+ readonly 401: components$1['responses']['Unauthorized'];
30931
+ /** @description Unknown op id, or an asset that does not exist, is not ready or belongs to another account. */
30932
+ readonly 404: {
30933
+ headers: {
30934
+ readonly [name: string]: unknown;
30935
+ };
30936
+ content: {
30937
+ readonly 'application/json': components$1['schemas']['Error'];
30938
+ };
30939
+ };
30940
+ /** @description The op lane is not configured on this gateway (code `media_ops_unavailable`) or asset storage is off (`assets_unavailable`). */
30941
+ readonly 503: {
30942
+ headers: {
30943
+ readonly [name: string]: unknown;
30944
+ };
30945
+ content: {
30946
+ readonly 'application/json': components$1['schemas']['Error'];
30947
+ };
30948
+ };
30949
+ };
30950
+ };
30951
+ readonly getStudioMediaOpJob: {
30952
+ readonly parameters: {
30953
+ readonly query?: never;
30954
+ readonly header?: never;
30955
+ readonly path: {
30956
+ /** @description Job UUID (the `id` of the 202 answer). */
30957
+ readonly id: string;
30958
+ };
30959
+ readonly cookie?: never;
30960
+ };
30961
+ readonly requestBody?: never;
30962
+ readonly responses: {
30963
+ /** @description The job. */
30964
+ readonly 200: {
30965
+ headers: {
30966
+ readonly [name: string]: unknown;
30967
+ };
30968
+ content: {
30969
+ readonly 'application/json': components$1['schemas']['MediaOpJob'];
30970
+ };
30971
+ };
30972
+ readonly 401: components$1['responses']['Unauthorized'];
30973
+ readonly 404: components$1['responses']['NotFound'];
30974
+ };
30975
+ };
29411
30976
  readonly retrievePreview: {
29412
30977
  readonly parameters: {
29413
30978
  readonly query?: never;
@@ -29650,7 +31215,7 @@ interface operations$1 {
29650
31215
  readonly [name: string]: unknown;
29651
31216
  };
29652
31217
  content: {
29653
- readonly 'application/json': components$1['schemas']['StudioRender'];
31218
+ readonly 'application/json': components$1['schemas']['StudioRender'] | components$1['schemas']['StudioAudioRender'];
29654
31219
  };
29655
31220
  };
29656
31221
  readonly 401: components$1['responses']['Unauthorized'];
@@ -33260,6 +34825,8 @@ interface operations$1 {
33260
34825
  readonly model?: string;
33261
34826
  readonly negative_prompt?: string;
33262
34827
  readonly prompt: string;
34828
+ /** @description Up to 3 of your ready PNG / JPEG image assets showing ONE subject (character or product) that Veo keeps consistent (Vertex `referenceImages`, `referenceType: asset`). Not combinable with `image`; always 8 s. A missing or foreign asset is 404, another type 400 — checked before anything is held or charged. */
34829
+ readonly reference_asset_ids?: readonly string[];
33263
34830
  /** @enum {string} */
33264
34831
  readonly resolution?: '720p' | '1080p';
33265
34832
  /** @enum {integer} */
@@ -33616,7 +35183,7 @@ export type Receipt = Reply<'getReceipt'>;
33616
35183
  export type FeedbackRequest = Mutable<Body<'submitFeedback'>>;
33617
35184
  export type FeedbackResponse = Reply<'submitFeedback'>;
33618
35185
  export type PhoneModel = Schema<'AccountPhoneModel'>;
33619
- type CallOpts$37 = {
35186
+ type CallOpts$38 = {
33620
35187
  ext?: CodaiRequestExtensions;
33621
35188
  signal?: AbortSignal;
33622
35189
  };
@@ -33624,9 +35191,9 @@ export declare class Account {
33624
35191
  private readonly http;
33625
35192
  constructor(http: HttpClient);
33626
35193
  /** `GET /v1/account` — the full account card. */
33627
- get(opts?: CallOpts$37): Promise<AccountView>;
35194
+ get(opts?: CallOpts$38): Promise<AccountView>;
33628
35195
  /** `PATCH /v1/account` — consents, username, referral (at least one field). */
33629
- update(body: AccountPatchRequest, opts?: CallOpts$37): Promise<AccountPatchResponse>;
35196
+ update(body: AccountPatchRequest, opts?: CallOpts$38): Promise<AccountPatchResponse>;
33630
35197
  }
33631
35198
  export declare class Receipts {
33632
35199
  private readonly http;
@@ -33638,7 +35205,7 @@ export declare class Receipts {
33638
35205
  get(query?: {
33639
35206
  sessionId?: string;
33640
35207
  since?: string | Date;
33641
- }, opts?: CallOpts$37): Promise<Receipt>;
35208
+ }, opts?: CallOpts$38): Promise<Receipt>;
33642
35209
  }
33643
35210
  export declare class Feedback {
33644
35211
  private readonly http;
@@ -33647,13 +35214,13 @@ export declare class Feedback {
33647
35214
  * `POST /v1/feedback` — rate one turn. Exactly one of `event_id`,
33648
35215
  * `session_id`, `client_request_id` must be present.
33649
35216
  */
33650
- submit(body: FeedbackRequest, opts?: CallOpts$37): Promise<FeedbackResponse>;
35217
+ submit(body: FeedbackRequest, opts?: CallOpts$38): Promise<FeedbackResponse>;
33651
35218
  }
33652
35219
  export declare class PhoneModels {
33653
35220
  private readonly http;
33654
35221
  constructor(http: HttpClient);
33655
35222
  /** `GET /v1/phone/models` — on-device model catalog with signed URLs. */
33656
- list(opts?: CallOpts$37): Promise<PhoneModel[]>;
35223
+ list(opts?: CallOpts$38): Promise<PhoneModel[]>;
33657
35224
  }
33658
35225
  //#endregion
33659
35226
  //#region src/resources/agents.d.ts
@@ -33665,7 +35232,7 @@ export type AgentRun = Reply<'getAgentRun'>;
33665
35232
  export type AgentRunStep = Schema<'AgentRunStep'>;
33666
35233
  export type AgentRunStats = Reply<'getAgentRunStats'>;
33667
35234
  export type AgentRunStatus = Schema<'AgentRunStatus'>;
33668
- type CallOpts$36 = {
35235
+ type CallOpts$37 = {
33669
35236
  ext?: CodaiRequestExtensions;
33670
35237
  signal?: AbortSignal;
33671
35238
  };
@@ -33702,28 +35269,28 @@ export declare class AgentRuns {
33702
35269
  private readonly http;
33703
35270
  constructor(http: HttpClient);
33704
35271
  /** `POST /v1/agents/runs` — returns 202 with the run id. */
33705
- create(body: AgentRunCreateRequest, opts?: CallOpts$36): Promise<AgentRunAccepted>;
35272
+ create(body: AgentRunCreateRequest, opts?: CallOpts$37): Promise<AgentRunAccepted>;
33706
35273
  /** `GET /v1/agents/runs/{id}` */
33707
- get(id: string, opts?: CallOpts$36): Promise<AgentRun>;
35274
+ get(id: string, opts?: CallOpts$37): Promise<AgentRun>;
33708
35275
  /** `GET /v1/agents/runs/{id}/steps` — newest first. */
33709
- steps(id: string, opts?: CallOpts$36): Promise<AgentRunStep[]>;
35276
+ steps(id: string, opts?: CallOpts$37): Promise<AgentRunStep[]>;
33710
35277
  /** `GET /v1/agents/runs/stats?days=` */
33711
- stats(days?: number, opts?: CallOpts$36): Promise<AgentRunStats>;
35278
+ stats(days?: number, opts?: CallOpts$37): Promise<AgentRunStats>;
33712
35279
  /** `POST /v1/agents/runs/{id}/cancel` */
33713
- cancel(id: string, opts?: CallOpts$36): Promise<Reply<'cancelAgentRun'>>;
35280
+ cancel(id: string, opts?: CallOpts$37): Promise<Reply<'cancelAgentRun'>>;
33714
35281
  /**
33715
35282
  * `GET /v1/agents/runs/{id}/stream` — async iterator over `step` / `done` /
33716
35283
  * `timeout` events. The iterator ends after `done`; on `timeout` (30 min)
33717
35284
  * it also ends and you may reconnect (full replay from seq 0).
33718
35285
  */
33719
- stream(id: string, opts?: CallOpts$36): AsyncGenerator<AgentRunStreamEvent, void, undefined>;
35286
+ stream(id: string, opts?: CallOpts$37): AsyncGenerator<AgentRunStreamEvent, void, undefined>;
33720
35287
  }
33721
35288
  export declare class Agents {
33722
35289
  private readonly http;
33723
35290
  readonly runs: AgentRuns;
33724
35291
  constructor(http: HttpClient);
33725
35292
  /** `POST /v1/agents/run` — blocks until the agent loop finishes. */
33726
- run(body: AgentRunRequest, opts?: CallOpts$36): Promise<AgentRunResult>;
35293
+ run(body: AgentRunRequest, opts?: CallOpts$37): Promise<AgentRunResult>;
33727
35294
  }
33728
35295
  //#endregion
33729
35296
  //#region src/resources/audio.d.ts
@@ -33888,7 +35455,7 @@ export interface StudioQuoteQuery {
33888
35455
  model?: string;
33889
35456
  n?: number;
33890
35457
  }
33891
- type CallOpts$35 = {
35458
+ type CallOpts$36 = {
33892
35459
  ext?: CodaiRequestExtensions;
33893
35460
  signal?: AbortSignal;
33894
35461
  };
@@ -33912,16 +35479,16 @@ export declare class Billing {
33912
35479
  private readonly http;
33913
35480
  constructor(http: HttpClient);
33914
35481
  /** `GET /v1/billing` — plan, wallet, auto top-up, cards and pay links (read-only). */
33915
- get(opts?: CallOpts$35): Promise<BillingOverview>;
35482
+ get(opts?: CallOpts$36): Promise<BillingOverview>;
33916
35483
  /** `GET /v1/billing/invoices` — fiscal invoices and credit notes, newest first. */
33917
35484
  invoices(query?: {
33918
35485
  limit?: number;
33919
- }, opts?: CallOpts$35): Promise<BillingInvoice[]>;
35486
+ }, opts?: CallOpts$36): Promise<BillingInvoice[]>;
33920
35487
  /**
33921
35488
  * `GET /v1/studio/quote` — what a Studio action costs (USD and wallet EUR micros) and your spendable balance,
33922
35489
  * before you run it. Paid Studio calls answer 402 `insufficient_funds` when `sufficient` is false. Free.
33923
35490
  */
33924
- studioQuote(query: StudioQuoteQuery, opts?: CallOpts$35): Promise<StudioQuote>;
35491
+ studioQuote(query: StudioQuoteQuery, opts?: CallOpts$36): Promise<StudioQuote>;
33925
35492
  /**
33926
35493
  * Poll `get()` every `intervalMs` and call `onLow` once each time the wallet
33927
35494
  * balance crosses below `thresholdEur`. Read-only: never creates a checkout.
@@ -33966,7 +35533,7 @@ export interface CardsRendered {
33966
35533
  width: number | null;
33967
35534
  height: number | null;
33968
35535
  }
33969
- type CallOpts$34 = {
35536
+ type CallOpts$35 = {
33970
35537
  ext?: CodaiRequestExtensions;
33971
35538
  signal?: AbortSignal;
33972
35539
  };
@@ -33975,59 +35542,59 @@ export declare class Cards {
33975
35542
  constructor(http: HttpClient);
33976
35543
  private get;
33977
35544
  /** `GET /v1/cards/weather` — `weather` block from MET Norway (cached 30–60 min per 0.01°, free). */
33978
- weather(params: CardsWeatherParams, opts?: CallOpts$34): Promise<CardsWeatherResponse>;
35545
+ weather(params: CardsWeatherParams, opts?: CallOpts$35): Promise<CardsWeatherResponse>;
33979
35546
  /**
33980
35547
  * `GET /v1/cards/places` — `places` block from Google Places: Text Search with `q` (biased to `lat`/`lng`/`radius`),
33981
35548
  * Nearby Search without it. Billed per call; `block` is null when nothing matched.
33982
35549
  */
33983
- places(params: CardsPlacesParams, opts?: CallOpts$34): Promise<CardsPlacesResponse>;
35550
+ places(params: CardsPlacesParams, opts?: CallOpts$35): Promise<CardsPlacesResponse>;
33984
35551
  /** `GET /v1/cards/geocode` — `map` block (≤ 5 markers) plus raw `results` (Google Geocoding, billed). */
33985
- geocode(params: CardsGeocodeParams, opts?: CallOpts$34): Promise<CardsGeocodeResponse>;
35552
+ geocode(params: CardsGeocodeParams, opts?: CallOpts$35): Promise<CardsGeocodeResponse>;
33986
35553
  /**
33987
35554
  * `GET /v1/cards/static-map` — PNG from Google Maps Static proxied through the gateway (no maps key on the client).
33988
35555
  * Needs `center` or `markers` (`lat,lng[,L]` joined by `|`); ≤ 640×400 points. Billed per call.
33989
35556
  */
33990
- staticMap(params: CardsStaticMapParams, opts?: CallOpts$34): Promise<CardsStaticMap>;
35557
+ staticMap(params: CardsStaticMapParams, opts?: CallOpts$35): Promise<CardsStaticMap>;
33991
35558
  /**
33992
35559
  * `GET /v1/cards/fx` — BNR (default) or ECB reference rates: a `metric` block with `from`+`to`, otherwise a `table`
33993
35560
  * block against `quote`, optionally limited to `symbols` (comma-separated). Free.
33994
35561
  */
33995
- fx(params?: CardsFxParams, opts?: CallOpts$34): Promise<CardsFxResponse>;
35562
+ fx(params?: CardsFxParams, opts?: CallOpts$35): Promise<CardsFxResponse>;
33996
35563
  /**
33997
35564
  * `GET /v1/cards/route` — travel time from Google Routes: `route` { mode, durationS, staticDurationS, distanceM,
33998
35565
  * polyline } and a `map` block. `origin`/`destination` as "lat,lng" or `from`/`to` as addresses; `mode` drive
33999
35566
  * (traffic-aware, default), walk, bicycle, transit, two_wheeler. Billed per call; both null when no route exists.
34000
35567
  */
34001
- route(params: CardsRouteParams, opts?: CallOpts$34): Promise<CardsRouteResponse>;
35568
+ route(params: CardsRouteParams, opts?: CallOpts$35): Promise<CardsRouteResponse>;
34002
35569
  /**
34003
35570
  * `GET /v1/cards/track` — parcel history as a `timeline` block plus `result` (carrier, configured, found,
34004
35571
  * delivered, events, trackingUrl). `carrier` (sameday | fan | cargus | dpd) is guessed from the AWB when omitted;
34005
35572
  * carriers without gateway credentials answer `configured: false` with only the tracking link. Free.
34006
35573
  */
34007
- track(params: CardsTrackParams, opts?: CallOpts$34): Promise<CardsTrackResponse>;
35574
+ track(params: CardsTrackParams, opts?: CallOpts$35): Promise<CardsTrackResponse>;
34008
35575
  /**
34009
35576
  * `GET /v1/cards/efactura` — your fiscal documents issued through Brivio with their ANAF e-Factura status
34010
35577
  * (`documents[]` + a `table` block, null when there are none). Free.
34011
35578
  */
34012
- efactura(params?: CardsEfacturaParams, opts?: CallOpts$34): Promise<CardsEfacturaResponse>;
35579
+ efactura(params?: CardsEfacturaParams, opts?: CallOpts$35): Promise<CardsEfacturaResponse>;
34013
35580
  /**
34014
35581
  * `POST /v1/cards/unfurl` — `links` block (variant `preview`) for a public https page; SSRF-guarded, cached 24 h.
34015
35582
  * Private targets throw 400 `unfurl_blocked`, non-https pages 422 `unfurl_not_https`.
34016
35583
  */
34017
- unfurl(url: string, opts?: CallOpts$34): Promise<CardsUnfurlResponse>;
35584
+ unfurl(url: string, opts?: CallOpts$35): Promise<CardsUnfurlResponse>;
34018
35585
  /**
34019
35586
  * `POST /v1/cards/product` — `products` block with one item from a public https product page's schema.org
34020
35587
  * `Product` JSON-LD (or OpenGraph product tags): name, image, price + currency (lowest offer), old price, rating
34021
35588
  * (0–5), reviews, seller, availability badge in `lang` (en default). Only what the page states; never sponsored.
34022
35589
  * SSRF-guarded like `unfurl`, cached 6 h. No product data throws 422 `product_not_found`.
34023
35590
  */
34024
- product(url: string, lang?: 'en' | 'ro', opts?: CallOpts$34): Promise<CardsProductResponse>;
35591
+ product(url: string, lang?: 'en' | 'ro', opts?: CallOpts$35): Promise<CardsProductResponse>;
34025
35592
  /**
34026
35593
  * `POST /v1/cards/render` — renders a `chart` or `qr` block to `format` (`png` default, or `svg`) at
34027
35594
  * `width` x `height` CSS px (64–1200, defaults 480 x 300; QR is square) times `scale` (1–3, PNG only).
34028
35595
  * Other block types (Mermaid `diagram`, `math`, …) throw 422 `render_unsupported`. Free; 2000 renders per day.
34029
35596
  */
34030
- render(body: CardsRenderBody, opts?: CallOpts$34): Promise<CardsRendered>;
35597
+ render(body: CardsRenderBody, opts?: CallOpts$35): Promise<CardsRendered>;
34031
35598
  }
34032
35599
  //#endregion
34033
35600
  //#region src/resources/chat.d.ts
@@ -34143,7 +35710,7 @@ export type Device = Schema<'DeviceListItem'>;
34143
35710
  export type DevicePatch = Mutable<Body<'updateDevice'>>;
34144
35711
  export type DevicePatched = Reply<'updateDevice'>;
34145
35712
  export type DispatchInbox = Reply<'getMyDispatchInbox'>;
34146
- type CallOpts$33 = {
35713
+ type CallOpts$34 = {
34147
35714
  ext?: CodaiRequestExtensions;
34148
35715
  signal?: AbortSignal;
34149
35716
  };
@@ -34151,23 +35718,23 @@ export declare class Devices {
34151
35718
  private readonly http;
34152
35719
  constructor(http: HttpClient);
34153
35720
  /** `GET /v1/devices` — most recently seen first. */
34154
- list(opts?: CallOpts$33): Promise<Device[]>;
35721
+ list(opts?: CallOpts$34): Promise<Device[]>;
34155
35722
  /** `PATCH /v1/devices/{id}` — push token and/or capabilities. */
34156
- update(id: string, body: DevicePatch, opts?: CallOpts$33): Promise<DevicePatched>;
35723
+ update(id: string, body: DevicePatch, opts?: CallOpts$34): Promise<DevicePatched>;
34157
35724
  /** `DELETE /v1/devices/{id}` */
34158
- delete(id: string, opts?: CallOpts$33): Promise<Reply<'deleteDevice'>>;
35725
+ delete(id: string, opts?: CallOpts$34): Promise<Reply<'deleteDevice'>>;
34159
35726
  /**
34160
35727
  * `POST /v1/keys/self/revoke` — the API key this client uses revokes ITSELF (sign out).
34161
35728
  * Every later call with it fails with 401.
34162
35729
  */
34163
- revokeSelfKey(opts?: CallOpts$33): Promise<Reply<'revokeSelfKey'>>;
35730
+ revokeSelfKey(opts?: CallOpts$34): Promise<Reply<'revokeSelfKey'>>;
34164
35731
  /**
34165
35732
  * `GET /v1/devices/me/dispatch?limit=` — pending controls dispatched at the
34166
35733
  * calling device (`x-codai-device` required) across all owned sessions.
34167
35734
  */
34168
35735
  dispatchInbox(query?: {
34169
35736
  limit?: number;
34170
- }, opts?: CallOpts$33): Promise<DispatchInbox>;
35737
+ }, opts?: CallOpts$34): Promise<DispatchInbox>;
34171
35738
  }
34172
35739
  //#endregion
34173
35740
  //#region src/resources/embeddings.d.ts
@@ -34230,7 +35797,7 @@ export type EnvironmentJobStartBody = Mutable<Body<'startEnvironmentJob'>>;
34230
35797
  export type EnvironmentJobStarted = Schema<'EnvironmentJobStarted'>;
34231
35798
  export type EnvironmentJob = Schema<'EnvironmentJob'>;
34232
35799
  export type GetEnvironmentJobQuery = Mutable<QueryOf<'getEnvironmentJob'>>;
34233
- type CallOpts$32 = {
35800
+ type CallOpts$33 = {
34234
35801
  ext?: CodaiRequestExtensions;
34235
35802
  signal?: AbortSignal;
34236
35803
  };
@@ -34238,70 +35805,70 @@ export declare class EnvironmentMembers {
34238
35805
  private readonly http;
34239
35806
  constructor(http: HttpClient);
34240
35807
  /** `GET /v1/environments/{id}/members` — any role. */
34241
- list(envId: string, opts?: CallOpts$32): Promise<EnvironmentMember[]>;
35808
+ list(envId: string, opts?: CallOpts$33): Promise<EnvironmentMember[]>;
34242
35809
  /** `POST /v1/environments/{id}/members` — exactly one of `user_id` / `email`. */
34243
- add(envId: string, body: EnvironmentAddMemberBody, opts?: CallOpts$32): Promise<EnvironmentMemberCreated>;
35810
+ add(envId: string, body: EnvironmentAddMemberBody, opts?: CallOpts$33): Promise<EnvironmentMemberCreated>;
34244
35811
  /** `PUT /v1/environments/{id}/members/me/ssh-key` — one `authorized_keys` line. */
34245
- setSshKey(envId: string, publicKey: string, opts?: CallOpts$32): Promise<Reply<'setMyEnvironmentSshKey'>>;
35812
+ setSshKey(envId: string, publicKey: string, opts?: CallOpts$33): Promise<Reply<'setMyEnvironmentSshKey'>>;
34246
35813
  /** `PATCH /v1/environments/{id}/members/{userId}` — 409 `last_owner` on demoting the last owner. */
34247
- setRole(envId: string, userId: string, role: EnvironmentRole, opts?: CallOpts$32): Promise<Reply<'setEnvironmentMemberRole'>['member']>;
35814
+ setRole(envId: string, userId: string, role: EnvironmentRole, opts?: CallOpts$33): Promise<Reply<'setEnvironmentMemberRole'>['member']>;
34248
35815
  /** `DELETE /v1/environments/{id}/members/{userId}` — pass your own id to leave. */
34249
- remove(envId: string, userId: string, opts?: CallOpts$32): Promise<Reply<'removeEnvironmentMember'>>;
35816
+ remove(envId: string, userId: string, opts?: CallOpts$33): Promise<Reply<'removeEnvironmentMember'>>;
34250
35817
  /** `POST /v1/environments/{id}/members/me/ssh-cert` — 12 h OpenSSH user certificate for your key. */
34251
- sshCert(envId: string, body: EnvironmentSshCertBody, opts?: CallOpts$32): Promise<EnvironmentSshCert>;
35818
+ sshCert(envId: string, body: EnvironmentSshCertBody, opts?: CallOpts$33): Promise<EnvironmentSshCert>;
34252
35819
  }
34253
35820
  /** `/v1/environments/{id}/tasks` — fire-and-forget agent tasks run in the environment. */
34254
35821
  export declare class EnvironmentTasks {
34255
35822
  private readonly http;
34256
35823
  constructor(http: HttpClient);
34257
35824
  /** `GET /v1/environments/{id}/tasks` */
34258
- list(envId: string, opts?: CallOpts$32): Promise<EnvironmentTaskList>;
35825
+ list(envId: string, opts?: CallOpts$33): Promise<EnvironmentTaskList>;
34259
35826
  /** `POST /v1/environments/{id}/tasks` — queued; you get a notification when it finishes. */
34260
- create(envId: string, body: EnvironmentTaskCreateBody, opts?: CallOpts$32): Promise<EnvironmentTaskCreated>;
35827
+ create(envId: string, body: EnvironmentTaskCreateBody, opts?: CallOpts$33): Promise<EnvironmentTaskCreated>;
34261
35828
  /** `GET /v1/environments/{id}/tasks/{taskId}` */
34262
- get(envId: string, taskId: string, opts?: CallOpts$32): Promise<EnvironmentTaskDetail>;
35829
+ get(envId: string, taskId: string, opts?: CallOpts$33): Promise<EnvironmentTaskDetail>;
34263
35830
  }
34264
35831
  /** `/v1/environments/{id}/files` — read/write/list over the relay (developer role or higher). */
34265
35832
  export declare class EnvironmentFiles {
34266
35833
  private readonly http;
34267
35834
  constructor(http: HttpClient);
34268
35835
  /** `GET /v1/environments/{id}/files?path=` — directory entries; no path → your workspace. */
34269
- list(envId: string, path?: string, opts?: CallOpts$32): Promise<EnvironmentFileList>;
35836
+ list(envId: string, path?: string, opts?: CallOpts$33): Promise<EnvironmentFileList>;
34270
35837
  /** `GET /v1/environments/{id}/files/{path}` — UTF-8 text (64 KB default, `maxBytes` ≤ 512 KB). */
34271
35838
  get(envId: string, path: string, options?: {
34272
35839
  maxBytes?: number;
34273
- } & CallOpts$32): Promise<EnvironmentFile>;
35840
+ } & CallOpts$33): Promise<EnvironmentFile>;
34274
35841
  /** `PUT /v1/environments/{id}/files/{path}` — replace with UTF-8 text (≤ 2 MB). */
34275
- put(envId: string, path: string, content: string, opts?: CallOpts$32): Promise<EnvironmentFileWritten>;
35842
+ put(envId: string, path: string, content: string, opts?: CallOpts$33): Promise<EnvironmentFileWritten>;
34276
35843
  }
34277
35844
  /** `/v1/environments/{id}/jobs` — background jobs on the environment daemon. */
34278
35845
  export declare class EnvironmentJobs {
34279
35846
  private readonly http;
34280
35847
  constructor(http: HttpClient);
34281
35848
  /** `POST /v1/environments/{id}/jobs` — returns at once with `job_id`. */
34282
- start(envId: string, body: EnvironmentJobStartBody, opts?: CallOpts$32): Promise<EnvironmentJobStarted>;
35849
+ start(envId: string, body: EnvironmentJobStartBody, opts?: CallOpts$33): Promise<EnvironmentJobStarted>;
34283
35850
  /** `GET /v1/environments/{id}/jobs/{jobId}` — status + output (`since` = previous `next_offset`). */
34284
- get(envId: string, jobId: string | number, query?: GetEnvironmentJobQuery, opts?: CallOpts$32): Promise<EnvironmentJob>;
35851
+ get(envId: string, jobId: string | number, query?: GetEnvironmentJobQuery, opts?: CallOpts$33): Promise<EnvironmentJob>;
34285
35852
  }
34286
35853
  export declare class EnvironmentPorts {
34287
35854
  private readonly http;
34288
35855
  constructor(http: HttpClient);
34289
35856
  /** `GET /v1/environments/{id}/ports` — published (forwarded) ports. */
34290
- list(envId: string, opts?: CallOpts$32): Promise<EnvironmentPort[]>;
35857
+ list(envId: string, opts?: CallOpts$33): Promise<EnvironmentPort[]>;
34291
35858
  /** `PUT /v1/environments/{id}/ports/{port}` — publish or change visibility (upsert). */
34292
- set(envId: string, port: number, body: EnvironmentPortBody, opts?: CallOpts$32): Promise<EnvironmentPort>;
35859
+ set(envId: string, port: number, body: EnvironmentPortBody, opts?: CallOpts$33): Promise<EnvironmentPort>;
34293
35860
  /** `DELETE /v1/environments/{id}/ports/{port}` — unpublish. */
34294
- remove(envId: string, port: number, opts?: CallOpts$32): Promise<Reply<'removeEnvironmentPort'>>;
35861
+ remove(envId: string, port: number, opts?: CallOpts$33): Promise<Reply<'removeEnvironmentPort'>>;
34295
35862
  }
34296
35863
  export declare class EnvironmentSecrets {
34297
35864
  private readonly http;
34298
35865
  constructor(http: HttpClient);
34299
35866
  /** `GET /v1/environments/{id}/secrets` — names and timestamps only, never values. */
34300
- list(envId: string, opts?: CallOpts$32): Promise<EnvironmentSecret[]>;
35867
+ list(envId: string, opts?: CallOpts$33): Promise<EnvironmentSecret[]>;
34301
35868
  /** `PUT /v1/environments/{id}/secrets/{name}` — upsert; `name` is `ENV_STYLE`. */
34302
- set(envId: string, name: string, value: string, opts?: CallOpts$32): Promise<EnvironmentSecretSet>;
35869
+ set(envId: string, name: string, value: string, opts?: CallOpts$33): Promise<EnvironmentSecretSet>;
34303
35870
  /** `DELETE /v1/environments/{id}/secrets/{name}` */
34304
- remove(envId: string, name: string, opts?: CallOpts$32): Promise<Reply<'removeEnvironmentSecret'>>;
35871
+ remove(envId: string, name: string, opts?: CallOpts$33): Promise<Reply<'removeEnvironmentSecret'>>;
34305
35872
  }
34306
35873
  export declare class Environments {
34307
35874
  private readonly http;
@@ -34316,41 +35883,41 @@ export declare class Environments {
34316
35883
  * `POST /v1/environments/{id}/exec` — run one relay op and wait (developer+). `op` defaults to
34317
35884
  * `shell` with `command`; 409 `environment_offline`, 504 `host_timeout`.
34318
35885
  */
34319
- exec(envId: string, body: EnvironmentExecBody, opts?: CallOpts$32): Promise<EnvironmentExecResult>;
35886
+ exec(envId: string, body: EnvironmentExecBody, opts?: CallOpts$33): Promise<EnvironmentExecResult>;
34320
35887
  /** `GET /v1/environments/{id}/ssh-ca` — CA public keys to trust (`@cert-authority` lines). */
34321
- sshCa(envId: string, opts?: CallOpts$32): Promise<EnvironmentSshCa>;
35888
+ sshCa(envId: string, opts?: CallOpts$33): Promise<EnvironmentSshCa>;
34322
35889
  /** `GET /v1/environments?project_id=&for_user_id=me` — newest first, every state. */
34323
- list(query?: ListEnvironmentsQuery, opts?: CallOpts$32): Promise<Environment[]>;
35890
+ list(query?: ListEnvironmentsQuery, opts?: CallOpts$33): Promise<Environment[]>;
34324
35891
  /**
34325
35892
  * `POST /v1/environments` — `byo` starts `pending`; managed providers start
34326
35893
  * `creating`. 409 `already_has_env` in a `vm_per_dev` project (the error
34327
35894
  * body carries the `environment_id` to reuse).
34328
35895
  */
34329
- create(body: EnvironmentCreateBody, opts?: CallOpts$32): Promise<Environment>;
35896
+ create(body: EnvironmentCreateBody, opts?: CallOpts$33): Promise<Environment>;
34330
35897
  /**
34331
35898
  * `POST /v1/environments/enroll` — daemon side. The one-time `codai_env_…`
34332
35899
  * token in the body is the only credential; the client's API key header is
34333
35900
  * ignored by this route. Managed environments additionally receive a
34334
35901
  * freshly minted `api_key`, returned exactly once.
34335
35902
  */
34336
- enroll(body: EnvironmentEnrollBody, opts?: CallOpts$32): Promise<EnvironmentEnrolled>;
35903
+ enroll(body: EnvironmentEnrollBody, opts?: CallOpts$33): Promise<EnvironmentEnrolled>;
34337
35904
  /** `GET /v1/environments/{id}` — environment, your role, members, ports, recent events. */
34338
- get(envId: string, opts?: CallOpts$32): Promise<EnvironmentDetail>;
35905
+ get(envId: string, opts?: CallOpts$33): Promise<EnvironmentDetail>;
34339
35906
  /** `PATCH /v1/environments/{id}` — `name` and/or `idle_timeout_minutes` (5..1440). */
34340
- update(envId: string, body: EnvironmentPatchBody, opts?: CallOpts$32): Promise<Environment>;
35907
+ update(envId: string, body: EnvironmentPatchBody, opts?: CallOpts$33): Promise<Environment>;
34341
35908
  /** `POST /v1/environments/{id}/start` — managed providers only (`stopped` → `starting`). */
34342
- start(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
35909
+ start(envId: string, opts?: CallOpts$33): Promise<EnvironmentTransition>;
34343
35910
  /** `POST /v1/environments/{id}/stop` — managed providers only (`running` → `stopping`). */
34344
- stop(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
35911
+ stop(envId: string, opts?: CallOpts$33): Promise<EnvironmentTransition>;
34345
35912
  /** `POST /v1/environments/{id}/archive` — keeps history, releases the machine. */
34346
- archive(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
35913
+ archive(envId: string, opts?: CallOpts$33): Promise<EnvironmentTransition>;
34347
35914
  /** `POST /v1/environments/{id}/destroy` — owner only; terminal. */
34348
- destroy(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
35915
+ destroy(envId: string, opts?: CallOpts$33): Promise<EnvironmentTransition>;
34349
35916
  /**
34350
35917
  * `POST /v1/environments/{id}/enroll-token` — `byo` only; a 30-minute
34351
35918
  * one-time token for `enroll()`. Minting again replaces the previous one.
34352
35919
  */
34353
- enrollToken(envId: string, opts?: CallOpts$32): Promise<EnvironmentEnrollToken>;
35920
+ enrollToken(envId: string, opts?: CallOpts$33): Promise<EnvironmentEnrollToken>;
34354
35921
  private transition;
34355
35922
  }
34356
35923
  //#endregion
@@ -34387,7 +35954,7 @@ export type HostExecBody = Mutable<Body<'execOnHost'>>;
34387
35954
  export type HostExecResponse = Reply<'execOnHost'>;
34388
35955
  export type HostExecRequest = Schema<'HostExecRequest'>;
34389
35956
  export type HostExecResultBody = Mutable<Body<'postHostExecResult'>>;
34390
- type CallOpts$31 = {
35957
+ type CallOpts$32 = {
34391
35958
  ext?: CodaiRequestExtensions;
34392
35959
  signal?: AbortSignal;
34393
35960
  };
@@ -34414,7 +35981,7 @@ export declare class Hosts {
34414
35981
  private readonly http;
34415
35982
  constructor(http: HttpClient);
34416
35983
  /** `GET /v1/hosts` — your devices currently connected as hosts. */
34417
- list(opts?: CallOpts$31): Promise<HostPresence[]>;
35984
+ list(opts?: CallOpts$32): Promise<HostPresence[]>;
34418
35985
  /**
34419
35986
  * `POST /v1/hosts/{deviceId}/exec` — run one op on a connected host and
34420
35987
  * block until it answers (or `timeout_ms`, default 60 s).
@@ -34422,9 +35989,9 @@ export declare class Hosts {
34422
35989
  exec(deviceId: string, op: HostOp, args?: Record<string, unknown>, extra?: {
34423
35990
  timeoutMs?: number;
34424
35991
  label?: string;
34425
- } & CallOpts$31): Promise<HostExecResponse>;
35992
+ } & CallOpts$32): Promise<HostExecResponse>;
34426
35993
  /** `POST /v1/hosts/exec/{reqId}/result` — host side: deliver an exec result. */
34427
- postResult(reqId: string, body: HostExecResultBody, opts?: CallOpts$31): Promise<Reply<'postHostExecResult'>>;
35994
+ postResult(reqId: string, body: HostExecResultBody, opts?: CallOpts$32): Promise<Reply<'postHostExecResult'>>;
34428
35995
  /**
34429
35996
  * `GET /v1/hosts/stream?os=&hostname=&roots=` — host side: announce this
34430
35997
  * device and receive `hello` / `ping` / `exec` events. Closed by the server
@@ -34434,7 +36001,7 @@ export declare class Hosts {
34434
36001
  os?: string;
34435
36002
  hostname?: string;
34436
36003
  roots?: string[];
34437
- }, opts?: CallOpts$31): AsyncGenerator<HostStreamEvent, void, undefined>;
36004
+ }, opts?: CallOpts$32): AsyncGenerator<HostStreamEvent, void, undefined>;
34438
36005
  }
34439
36006
  //#endregion
34440
36007
  //#region src/resources/assets.d.ts
@@ -34446,7 +36013,7 @@ export type AssetDeleted = Reply<'deleteAsset'>;
34446
36013
  export type AssetListQuery = QueryOf<'listAssets'>;
34447
36014
  /** `b64_json` (default, inline bytes) or `url` (stored asset + 1 h signed URL; 503 `assets_unavailable` without storage). */
34448
36015
  export type MediaResponseFormat = Schema<'MediaResponseFormat'>;
34449
- type CallOpts$30 = {
36016
+ type CallOpts$31 = {
34450
36017
  ext?: CodaiRequestExtensions;
34451
36018
  signal?: AbortSignal;
34452
36019
  };
@@ -34456,25 +36023,25 @@ export declare class Assets {
34456
36023
  private readonly http;
34457
36024
  constructor(http: HttpClient);
34458
36025
  /** `GET /v1/assets` — newest first, `limit` ≤ 100 (default 30). Paginate by passing `next_before` as `before`. */
34459
- list(query?: AssetListQuery, opts?: CallOpts$30): Promise<AssetList>;
36026
+ list(query?: AssetListQuery, opts?: CallOpts$31): Promise<AssetList>;
34460
36027
  /** Iterate every asset across pages (`list` with `before` = previous `next_before`). */
34461
- iterate(query?: Omit<AssetListQuery, 'before'>, opts?: CallOpts$30): AsyncGenerator<AssetDto, void, undefined>;
36028
+ iterate(query?: Omit<AssetListQuery, 'before'>, opts?: CallOpts$31): AsyncGenerator<AssetDto, void, undefined>;
34462
36029
  /** `GET /v1/assets/{id}` — one asset with a fresh 1 h signed `url` (`null` while not `ready`). */
34463
- retrieve(id: string, opts?: CallOpts$30): Promise<AssetDto>;
36030
+ retrieve(id: string, opts?: CallOpts$31): Promise<AssetDto>;
34464
36031
  /**
34465
36032
  * A fresh signed URL of the asset's bytes (valid 1 h), from `GET /v1/assets/{id}`. Throws when the asset has no
34466
36033
  * content yet. Use it in `<audio>`/`<video>`/`fetch` — it needs no Authorization header.
34467
36034
  */
34468
- contentUrl(id: string, opts?: CallOpts$30): Promise<string>;
36035
+ contentUrl(id: string, opts?: CallOpts$31): Promise<string>;
34469
36036
  /**
34470
36037
  * The authenticated redirect endpoint `GET /v1/assets/{id}/content` (302 to the signed URL). Useful for tools that
34471
36038
  * follow redirects with the API key (`curl -L -H 'Authorization: Bearer …'`); browsers should use `contentUrl()`.
34472
36039
  */
34473
36040
  contentPath(id: string): string;
34474
36041
  /** Download the asset's bytes (fetches the signed URL, no API key sent to storage). */
34475
- content(id: string, opts?: CallOpts$30): Promise<Uint8Array>;
36042
+ content(id: string, opts?: CallOpts$31): Promise<Uint8Array>;
34476
36043
  /** `DELETE /v1/assets/{id}` — deletes the object; signed URLs already handed out stop working. */
34477
- delete(id: string, opts?: CallOpts$30): Promise<AssetDeleted>;
36044
+ delete(id: string, opts?: CallOpts$31): Promise<AssetDeleted>;
34478
36045
  }
34479
36046
  //#endregion
34480
36047
  //#region src/resources/images.d.ts
@@ -34604,6 +36171,12 @@ export interface VideoRequest {
34604
36171
  b64_json: string;
34605
36172
  mime_type?: 'image/png' | 'image/jpeg';
34606
36173
  };
36174
+ /**
36175
+ * Up to 3 of your ready PNG / JPEG Studio image assets showing ONE subject (character or product) that the model
36176
+ * keeps consistent (e.g. a creative's cast `refAssetIds`). Not combinable with `image`; always 8 s. A missing or
36177
+ * foreign asset is 404, another type 400 — checked before anything is held or charged.
36178
+ */
36179
+ reference_asset_ids?: string[];
34607
36180
  seed?: number;
34608
36181
  }
34609
36182
  export interface VideoJob {
@@ -34977,11 +36550,11 @@ export type DocumentPreview = Reply<'retrievePreview'>;
34977
36550
  export type DocumentPreviewStatus = DocumentPreview['status'];
34978
36551
  export type DocumentVideoRequest = Mutable<Body<'createDocumentVideo'>>;
34979
36552
  export type DocumentVideoAccepted = Reply<'createDocumentVideo', 202>;
34980
- type CallOpts$29 = {
36553
+ type CallOpts$30 = {
34981
36554
  ext?: CodaiRequestExtensions;
34982
36555
  signal?: AbortSignal;
34983
36556
  };
34984
- export interface DocumentPollOptions extends CallOpts$29 {
36557
+ export interface DocumentPollOptions extends CallOpts$30 {
34985
36558
  /** Delay between polls (default 3000 ms for previews, 5000 ms for videos). */
34986
36559
  pollIntervalMs?: number;
34987
36560
  /** Give up after this long (default 300 000 ms for previews, 900 000 ms for videos). */
@@ -34996,21 +36569,21 @@ export declare class Documents {
34996
36569
  * `sheet` -> `SheetSpec`); invalid specs are 400 `invalid_spec`. Files are free. `based_on` creates the next version
34997
36570
  * of one of your documents; `preview: true` also queues a (billed) preview, returned as `preview`.
34998
36571
  */
34999
- create(body: DocumentCreateRequest, opts?: CallOpts$29): Promise<StudioDocument>;
36572
+ create(body: DocumentCreateRequest, opts?: CallOpts$30): Promise<StudioDocument>;
35000
36573
  /** `GET /v1/studio/documents/{id}` — fresh 1 h signed `file.url`, the stored `spec` and `latest_preview_id`. */
35001
- retrieve(id: string, opts?: CallOpts$29): Promise<StudioDocument>;
36574
+ retrieve(id: string, opts?: CallOpts$30): Promise<StudioDocument>;
35002
36575
  /**
35003
36576
  * Queue a preview (`POST /v1/studio/documents/{id}/previews`, HTTP 202): tagged PDF, page PNGs (1280 px) and a
35004
36577
  * contact sheet. Billed once on the first poll that sees the result; at most 3 active previews per user (429).
35005
36578
  */
35006
- preview(id: string, body?: DocumentPreviewRequest, opts?: CallOpts$29): Promise<DocumentPreviewAccepted>;
36579
+ preview(id: string, body?: DocumentPreviewRequest, opts?: CallOpts$30): Promise<DocumentPreviewAccepted>;
35007
36580
  /** Poll a preview (`GET /v1/studio/previews/{id}`): `queued` | `rendering` | `succeeded` | `failed`. */
35008
- retrievePreview(previewId: string, opts?: CallOpts$29): Promise<DocumentPreview>;
36581
+ retrievePreview(previewId: string, opts?: CallOpts$30): Promise<DocumentPreview>;
35009
36582
  /**
35010
36583
  * Turn a deck into an MP4 (`POST /v1/studio/documents/{id}/video`, HTTP 202). Returns a render: poll it with
35011
36584
  * `renders.retrieve(id)` or use `videoAndWait`. Narration (`narrate`) is synthesized and billed now.
35012
36585
  */
35013
- video(id: string, body?: DocumentVideoRequest, opts?: CallOpts$29): Promise<DocumentVideoAccepted>;
36586
+ video(id: string, body?: DocumentVideoRequest, opts?: CallOpts$30): Promise<DocumentVideoAccepted>;
35014
36587
  /** Queue a preview and poll until it succeeds. Throws on `failed` or timeout. */
35015
36588
  createPreviewAndWait(id: string, opts?: DocumentPollOptions & {
35016
36589
  body?: DocumentPreviewRequest;
@@ -35032,11 +36605,11 @@ export interface LottieDownload {
35032
36605
  filename: string | null;
35033
36606
  contentType: string | null;
35034
36607
  }
35035
- type CallOpts$28 = {
36608
+ type CallOpts$29 = {
35036
36609
  ext?: CodaiRequestExtensions;
35037
36610
  signal?: AbortSignal;
35038
36611
  };
35039
- export interface ExportWaitOptions extends CallOpts$28 {
36612
+ export interface ExportWaitOptions extends CallOpts$29 {
35040
36613
  /** Delay between polls (default 3000 ms). */
35041
36614
  intervalMs?: number;
35042
36615
  /** Give up after this long (default 900 000 ms = 15 min). */
@@ -35046,7 +36619,7 @@ export declare class Exports {
35046
36619
  private readonly http;
35047
36620
  constructor(http: HttpClient);
35048
36621
  /** The export: `queued` / `running`, then `succeeded` (signed `url`, valid 1 h) or `failed` (`error`). Free. */
35049
- retrieve(id: string, opts?: CallOpts$28): Promise<StudioExport>;
36622
+ retrieve(id: string, opts?: CallOpts$29): Promise<StudioExport>;
35050
36623
  /**
35051
36624
  * Poll `retrieve` every `intervalMs` (default 3 s) until the export is `succeeded` or `failed` and resolve with it
35052
36625
  * (a `failed` export resolves too — check `status` / `error`). Throws when it is not done within `timeoutMs`
@@ -35076,11 +36649,18 @@ export type CreativeRevertResult = Reply<'revertCreative'>;
35076
36649
  export type CreativeForkRequest = Mutable<Body<'forkCreative'>>;
35077
36650
  export type CreativeLintResult = Reply<'lintCreative'>;
35078
36651
  export type CreativeCompiled = Reply<'getCreativeCompiled'>;
35079
- export type CreativeRenderRequest = Mutable<Body<'renderCreative'>>;
35080
- export type CreativeRenderAccepted = Reply<'renderCreative', 202>;
36652
+ export type CreativeRenderRequest = Mutable<Schema<'CreativeRenderRequest'>>;
36653
+ export type CreativeRenderAccepted = Schema<'CreativeRenderAccepted'>;
35081
36654
  export type CreativeRenderCached = Reply<'renderCreative', 200>;
35082
36655
  /** `render` answer: a new queued render (202, `cached: false`) or the identical existing one (200, `cached: true`). */
35083
36656
  export type CreativeRenderResult = CreativeRenderAccepted | CreativeRenderCached;
36657
+ /** `renderAudio` body (MU-05): `formats` (wav | mp3 | flac), `stems`, `lrc`, `loudness` (preset or LUFS), `title`. */
36658
+ export type CreativeAudioRenderRequest = Mutable<Schema<'CreativeAudioRenderRequest'>>;
36659
+ /** `renderAudio` answer (202): the queued mixdown with its planned `outputs` and `quote_micro_usd`. */
36660
+ export type CreativeAudioRenderAccepted = Schema<'CreativeAudioRenderAccepted'>;
36661
+ export type CreativeAudioRenderOutput = Schema<'CreativeAudioRenderOutput'>;
36662
+ /** `GET /v1/studio/renders/{id}` of an audio render (`target: 'audio'`): one `data[]` asset per output. */
36663
+ export type StudioAudioRender = Schema<'StudioAudioRender'>;
35084
36664
  export type CreativeFrameRequest = Mutable<Body<'createCreativeFrame'>>;
35085
36665
  export type CreativeFrame = Schema<'CreativeFrame'>;
35086
36666
  export type CreativeFrames = Reply<'createCreativeFrame', 200>;
@@ -35102,6 +36682,22 @@ export type CreativeTemplate = Schema<'CreativeTemplate'>;
35102
36682
  export type StudioCreativeFromDocument = Schema<'StudioCreativeFromDocument'>;
35103
36683
  export type CreativeBuildRequest = Mutable<Schema<'CreativeBuildRequest'>>;
35104
36684
  export type StudioCreativeBuild = Schema<'StudioCreativeBuild'>;
36685
+ /** Build request of a carousel (`format: 'png' | 'pdf'`) or print (`format: 'pdf'`) creative. */
36686
+ export type CreativePagedBuildRequest = Mutable<Schema<'CreativePagedBuildRequest'>>;
36687
+ /** HTTP 202 answer of `build` for a carousel / print creative: the queued export job is in `export`. */
36688
+ export type StudioCreativePagedBuild = Schema<'StudioCreativePagedBuild'>;
36689
+ export type CreativePrintLintIssue = Schema<'CreativePrintLintIssue'>;
36690
+ /** `build` answers a stored document version (200, deck / doc / sheet) or a queued export (202, carousel / print). */
36691
+ export type CreativeBuildResult = StudioCreativeBuild | StudioCreativePagedBuild;
36692
+ export type StudioPostCopyRequest = Mutable<Schema<'StudioPostCopyRequest'>>;
36693
+ export type StudioPostCopy = Schema<'StudioPostCopy'>;
36694
+ export type CreativeTranscriptCutRequest = Mutable<Schema<'CreativeTranscriptCutRequest'>>;
36695
+ export type CreativeTranscriptCutResult = Schema<'CreativeTranscriptCutResult'>;
36696
+ export type CreativeRegenerateNodeRequest = Mutable<Schema<'CreativeRegenerateNodeRequest'>>;
36697
+ export type CreativeRegenerateNodeResult = Schema<'CreativeRegenerateNodeResult'>;
36698
+ export type CreativeCast = Schema<'CreativeCast'>;
36699
+ /** True when a `build` answer is the 202 carousel / print export job (poll `exports.wait(r.export.id)`). */
36700
+ export declare const isPagedBuild: (r: CreativeBuildResult) => r is StudioCreativePagedBuild;
35105
36701
  /** `{ brand_kit_id }` or `{ tokens }` (exactly one) + optional `base_seq`, `snap`, `fonts`, `force`. */
35106
36702
  export type CreativeRestyleRequest = Mutable<Body<'restyleCreative'>>;
35107
36703
  /** Same shape as the `edit` answer (`seq`, `doc_hash`, `changed`, `warnings`, `rebased`). */
@@ -35179,7 +36775,7 @@ export interface CreativeEditRequest {
35179
36775
  /** Bypass locked nodes and variables. */
35180
36776
  force?: boolean;
35181
36777
  }
35182
- type CallOpts$27 = {
36778
+ type CallOpts$28 = {
35183
36779
  ext?: CodaiRequestExtensions;
35184
36780
  signal?: AbortSignal;
35185
36781
  };
@@ -35187,49 +36783,49 @@ export declare class Creatives {
35187
36783
  private readonly http;
35188
36784
  constructor(http: HttpClient);
35189
36785
  /** List your creatives, most recently updated first (`next_before` pages). */
35190
- list(query?: CreativeListQuery, opts?: CallOpts$27): Promise<CreativeList>;
36786
+ list(query?: CreativeListQuery, opts?: CallOpts$28): Promise<CreativeList>;
35191
36787
  /**
35192
36788
  * Create a creative (`kind` + optional `title` / `doc`); without `doc` you get an empty document for the kind.
35193
36789
  * `brand_kit_id` applies one of your brand kits (`brandKits`) to version 1: `brand = { kitId, tokens }` + its logo.
35194
36790
  * `template` (+ `vars`, values by var key) starts from one of your templates (`templates`) instead of `doc`.
35195
36791
  */
35196
- create(body: CreativeCreateRequest, opts?: CallOpts$27): Promise<Creative>;
36792
+ create(body: CreativeCreateRequest, opts?: CallOpts$28): Promise<Creative>;
35197
36793
  /** The document at the head (or `seq`) with signed `assets` (1 h URLs). */
35198
36794
  retrieve(id: string, query?: {
35199
36795
  seq?: number;
35200
- }, opts?: CallOpts$27): Promise<CreativeDetail>;
36796
+ }, opts?: CallOpts$28): Promise<CreativeDetail>;
35201
36797
  /** Compact text outline (+ formats and vars) — the cheapest structure for a prompt. */
35202
- outline(id: string, opts?: CallOpts$27): Promise<CreativeOutline>;
36798
+ outline(id: string, opts?: CallOpts$28): Promise<CreativeOutline>;
35203
36799
  /** Node ids matching `query` (a string = text/name/id substring, or `{ text, type, sceneId, assetId, locked }`). */
35204
- find(id: string, query: CreativeFindRequest['query'], opts?: CallOpts$27): Promise<CreativeFindResult>;
36800
+ find(id: string, query: CreativeFindRequest['query'], opts?: CallOpts$28): Promise<CreativeFindResult>;
35205
36801
  /** Full JSON of `ids` (scene ids return whole scenes) or of one `sceneId`. */
35206
- subtree(id: string, body: CreativeSubtreeRequest, opts?: CallOpts$27): Promise<CreativeSubtree>;
36802
+ subtree(id: string, body: CreativeSubtreeRequest, opts?: CallOpts$28): Promise<CreativeSubtree>;
35207
36803
  /**
35208
36804
  * Apply an op batch (all or nothing) authored against `baseSeq`. A stale base is rebased when the touched
35209
36805
  * targets did not change meanwhile; otherwise the call throws `CodaiError` 409 `stale` (reload and retry). Rejected
35210
36806
  * ops throw 400 with `code` (`invalid`, `not_found`, `locked`, `duplicate_id`).
35211
36807
  */
35212
- edit(id: string, body: CreativeEditRequest, opts?: CallOpts$27): Promise<CreativeOpsResult>;
36808
+ edit(id: string, body: CreativeEditRequest, opts?: CallOpts$28): Promise<CreativeOpsResult>;
35213
36809
  /** Version history, newest first (`beforeSeq` pages). */
35214
36810
  versions(id: string, query?: {
35215
36811
  beforeSeq?: number;
35216
36812
  limit?: number;
35217
- }, opts?: CallOpts$27): Promise<CreativeVersionList>;
36813
+ }, opts?: CallOpts$28): Promise<CreativeVersionList>;
35218
36814
  /** New head whose document is version `seq`'s (undo / redo). */
35219
- revert(id: string, seq: number, opts?: CallOpts$27): Promise<CreativeRevertResult>;
36815
+ revert(id: string, seq: number, opts?: CallOpts$28): Promise<CreativeRevertResult>;
35220
36816
  /** New creative from version `seq` (default the head). */
35221
- fork(id: string, body?: CreativeForkRequest, opts?: CallOpts$27): Promise<Creative>;
36817
+ fork(id: string, body?: CreativeForkRequest, opts?: CallOpts$28): Promise<Creative>;
35222
36818
  /** Soft-delete the creative. */
35223
- delete(id: string, opts?: CallOpts$27): Promise<CreativeDeleted>;
36819
+ delete(id: string, opts?: CallOpts$28): Promise<CreativeDeleted>;
35224
36820
  /**
35225
36821
  * Contrast, safe area, empty text, missing assets, brand colours, platform safe zones and text floors, alt text,
35226
36822
  * missing captions, reading speed, flashing, missing / stale translations. Issues carry `format` / `fixable` /
35227
36823
  * `locale`; `fixable` counts them (`lintFix`). `locale` lints the translated document (adds
35228
36824
  * `text_overflow_locale`); 404 `Locale not found.` for an unknown locale.
35229
36825
  */
35230
- lint(id: string, body?: CreativeLintRequest, opts?: CallOpts$27): Promise<CreativeLintResult>;
36826
+ lint(id: string, body?: CreativeLintRequest, opts?: CallOpts$28): Promise<CreativeLintResult>;
35231
36827
  /** Preview HTML (signed asset URLs) for `format` / one `scene` / a translation (`locale`). */
35232
- compiled(id: string, query?: CreativeCompiledQuery, opts?: CallOpts$27): Promise<CreativeCompiled>;
36828
+ compiled(id: string, query?: CreativeCompiledQuery, opts?: CallOpts$28): Promise<CreativeCompiled>;
35233
36829
  /**
35234
36830
  * Queue an MP4 render of the head (`codai-render`, HTTP 202, `cached: false`); poll `renders.retrieve(render_id)`.
35235
36831
  * When the same render already exists for this version / format / quality / fps you get it back at once
@@ -35238,48 +36834,59 @@ export declare class Creatives {
35238
36834
  * `ai_label` (`none` | `corner` | `end_card`, EU AI Act art. 50(4)) burns a visible AI label into the video; omitted =
35239
36835
  * `corner` when the creative uses TTS narration or AI images, else `none` (`none` with narration: 400 `ai_label_required`).
35240
36836
  */
35241
- render(id: string, body?: CreativeRenderRequest, opts?: CallOpts$27): Promise<CreativeRenderResult>;
36837
+ render(id: string, body?: CreativeRenderRequest, opts?: CallOpts$28): Promise<CreativeRenderResult>;
36838
+ /**
36839
+ * Mixdown + mastering + exports of an `audio` creative (MU-05; same `POST …/render` route, HTTP 202). `formats`
36840
+ * (default `['wav', 'mp3']`), `stems: true` adds one WAV per audible track (+50 %), `lrc` exports the timed lyrics
36841
+ * (default on when the document has them), `loudness` is `streaming` (−14) | `podcast` (−16) | `broadcast` (−23) or
36842
+ * LUFS (−40…−5). Poll `renders.retrieve(render_id)`: the finished render's `data[]` holds one signed asset per output
36843
+ * (`output: mix | stem | lrc`). $0.001 per output second, minimum $0.01; held up front, billed on the measured length.
36844
+ * 400 `empty_audio` / `too_long` (20 min) / `no_lyrics`; video creatives use `render`.
36845
+ */
36846
+ renderAudio(id: string, body?: CreativeAudioRenderRequest, opts?: CallOpts$28 & {
36847
+ idempotencyKey?: string;
36848
+ }): Promise<CreativeAudioRenderAccepted>;
35242
36849
  /**
35243
36850
  * PNG still frames at up to 6 times (`t_ms`). `exact: false` (default) screenshots the compiled HTML; `exact: true`
35244
36851
  * cuts them from a draft render of the covering scenes. Waits up to ~90 s: frames (`status: 'succeeded'`) or a
35245
36852
  * running job (`status: 'running'`) to poll with `frameJob(id, frame_job_id)`. Cached frames are free; 60 frame
35246
36853
  * jobs per UTC day are free, then billed (`billed_micro_usd`).
35247
36854
  */
35248
- frame(id: string, body: CreativeFrameRequest, opts?: CallOpts$27): Promise<CreativeFrameResult>;
36855
+ frame(id: string, body: CreativeFrameRequest, opts?: CallOpts$28): Promise<CreativeFrameResult>;
35249
36856
  /**
35250
36857
  * Turn a comment pinned on a frame (`t_ms`, optional `node_id` / `scene_id`) into an edit: one bounded `codai`
35251
36858
  * model turn proposes ops, applied like `edit` against `base_seq` (rebased when possible, 409 `stale` else).
35252
36859
  * 422 `no_edit` when the model made no edit (its answer in `error.text`); `apply: false` only proposes the ops.
35253
36860
  * Token-metered like any `codai` text call.
35254
36861
  */
35255
- comment(id: string, body: CreativeCommentRequest, opts?: CallOpts$27): Promise<CreativeCommentResult>;
36862
+ comment(id: string, body: CreativeCommentRequest, opts?: CallOpts$28): Promise<CreativeCommentResult>;
35256
36863
  /**
35257
36864
  * Generate A/B variants: one bounded `codai` model turn proposes `count` (default 3) variants changing only
35258
36865
  * `focus` (default hook / title / cta); each becomes a fork of the creative at `base_seq` with the ops applied, plus
35259
36866
  * a queued draft render (`render: false` to skip; poll `renders.retrieve(render_id)`). The original is unchanged
35260
36867
  * until `pickVariant`. 422 `no_edit` when no valid variant came back, 504 `timeout` after 90 s. Token-metered.
35261
36868
  */
35262
- variants(id: string, body: CreativeVariantsRequest, opts?: CallOpts$27): Promise<CreativeVariantsResult>;
36869
+ variants(id: string, body: CreativeVariantsRequest, opts?: CallOpts$28): Promise<CreativeVariantsResult>;
35263
36870
  /** The latest variant group of a creative (`group_id: null` when none) with statuses and stored render state. */
35264
- listVariants(id: string, opts?: CallOpts$27): Promise<CreativeVariantList>;
36871
+ listVariants(id: string, opts?: CallOpts$28): Promise<CreativeVariantList>;
35265
36872
  /**
35266
36873
  * Pick the winner: its ops are applied to the original against `base_seq` (rebased when possible, 409 `stale`
35267
36874
  * else); the winner is marked `winner`, the rest of its group `rejected`.
35268
36875
  */
35269
- pickVariant(id: string, variantId: string, body: CreativeVariantPickRequest, opts?: CallOpts$27): Promise<CreativeVariantPickResult>;
36876
+ pickVariant(id: string, variantId: string, body: CreativeVariantPickRequest, opts?: CallOpts$28): Promise<CreativeVariantPickResult>;
35270
36877
  /**
35271
36878
  * Save the creative (at `seq`, default the head) as a private template: each `vars` entry turns a text node's text
35272
36879
  * (`prop: 'text'`) or an image node's asset (`prop: 'image'`) into a variable whose default is the current value.
35273
36880
  * 400 `node_not_found` / `invalid_pick` / `duplicate_key`. Free.
35274
36881
  */
35275
- saveTemplate(id: string, body: SaveTemplateRequest, opts?: CallOpts$27): Promise<CreativeTemplate>;
36882
+ saveTemplate(id: string, body: SaveTemplateRequest, opts?: CallOpts$28): Promise<CreativeTemplate>;
35276
36883
  /**
35277
36884
  * Queue an FCPXML export of a video creative (`seq`, default the head; `format`, default the first 1920×1080 /
35278
36885
  * 1080×1920 / 1080×1080 format): a zip with `project.fcpxml` + per-scene MP4 segments + audio, for Final Cut Pro,
35279
36886
  * DaVinci Resolve or Premiere. Resolves to the queued export; poll it with `exports.wait(e.id)`. Only newly
35280
36887
  * rendered seconds are billed (final render price). 400 `unsupported_kind` / `unsupported_format` / `too_long`.
35281
36888
  */
35282
- exportFcpxml(id: string, query?: ExportFcpxmlQuery, opts?: CallOpts$27): Promise<StudioExport>;
36889
+ exportFcpxml(id: string, query?: ExportFcpxmlQuery, opts?: CallOpts$28): Promise<StudioExport>;
35283
36890
  /**
35284
36891
  * Export a video creative as a Lottie animation (`seq`, default the head; `format`, default the document's default
35285
36892
  * format, or `formats: 'all'`; `container: 'json'` (default, Bodymovin JSON with embedded images) or `'dotlottie'`).
@@ -35287,33 +36894,70 @@ export declare class Creatives {
35287
36894
  * fidelity report in `warnings` (video, chart, HTML block, table, cell grid and audio nodes are not exported).
35288
36895
  * 400 `unsupported_kind` / `invalid_request`, 413 `too_large` (over 20 MB).
35289
36896
  */
35290
- exportLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$27): Promise<StudioExport>;
36897
+ exportLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$28): Promise<StudioExport>;
35291
36898
  /**
35292
36899
  * The Lottie file itself (`download=1`, nothing stored): `application/json` for one Bodymovin JSON, `application/zip`
35293
36900
  * for a dotLottie archive or a zip of JSON files (`formats: 'all'`). Same options and errors as `exportLottie`. Free.
35294
36901
  */
35295
- downloadLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$27): Promise<LottieDownload>;
36902
+ downloadLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$28): Promise<LottieDownload>;
35296
36903
  /**
35297
36904
  * Turn one of your Studio documents (deck, doc, sheet) into an editable creative — slides become scenes with a
35298
36905
  * `layout` and speaker `notes`, doc pages a `flow` group, sheets a `cell_grid`; nodes carry semantic `role`s.
35299
36906
  * Idempotent: a document that already has a creative resolves to it (`existing: true`). Free. 404 unknown document,
35300
36907
  * 409 `document_spec_missing`, 400 `invalid_spec`, 413 `too_large`.
35301
36908
  */
35302
- fromDocument(documentId: string, opts?: CallOpts$27): Promise<StudioCreativeFromDocument>;
36909
+ fromDocument(documentId: string, opts?: CallOpts$28): Promise<StudioCreativeFromDocument>;
35303
36910
  /**
35304
36911
  * Build a deck / doc / sheet creative (at `seq`, default the head) into a PPTX / DOCX / XLSX — a new version of its
35305
36912
  * Studio document (`document`, exactly the `POST /v1/studio/documents` body). Converter notes come back in
35306
36913
  * `warnings`. The file is free; `preview: true` also queues a billed preview (poll it with
35307
36914
  * `documents.waitForPreview`). 400 `not_supported_for_kind` (video / image) or `invalid_spec`.
36915
+ *
36916
+ * A carousel (`format: 'png'` zip of slides or `'pdf'`) or print (`'pdf'`, PDF/X-4 with bleed and optional
36917
+ * `crop_marks`) creative answers HTTP 202 with a queued export job in `export` (`format_id` picks the format,
36918
+ * `quote_micro_usd` is held). Tell the two apart with `isPagedBuild`, poll with `exports.wait(r.export.id)` or use
36919
+ * `buildAndWait`.
35308
36920
  */
35309
- build(id: string, body?: CreativeBuildRequest, opts?: CallOpts$27): Promise<StudioCreativeBuild>;
36921
+ build(id: string, body?: CreativeBuildRequest | CreativePagedBuildRequest, opts?: CallOpts$28): Promise<CreativeBuildResult>;
36922
+ /**
36923
+ * `build`, then — for a carousel / print creative — poll the export job until it has `succeeded` or `failed`
36924
+ * (`exports.wait`). Resolves to the 200 build for deck / doc / sheet, or to the finished `StudioExport`.
36925
+ */
36926
+ buildAndWait(id: string, body?: CreativeBuildRequest | CreativePagedBuildRequest, opts?: ExportWaitOptions): Promise<StudioCreativeBuild | StudioExport>;
36927
+ /**
36928
+ * Social post copy for a carousel, image or video creative: a caption + hashtags per platform (`platforms`,
36929
+ * default Instagram + LinkedIn; `language` `ro` (default) | `en`; optional `brief`, `tone`, `seq`) and one alt text
36930
+ * per slide, every answer repaired to the platform's hard limits (changes listed in `fixes`). Nothing is written to
36931
+ * the creative. Token-metered (`cost_micro_usd`) under a small wallet hold (402 `insufficient_funds`); 400
36932
+ * `not_supported_for_kind`, 422 `no_post_copy`, 504 `timeout`. `idempotencyKey` replays a retry (24 h).
36933
+ */
36934
+ postCopy(id: string, body?: StudioPostCopyRequest, opts?: CallOpts$28 & {
36935
+ idempotencyKey?: string;
36936
+ }): Promise<StudioPostCopy>;
36937
+ /**
36938
+ * Edit a video clip by its transcript: delete word ranges (`remove: [{ from_word, to_word }]`, indexes into the
36939
+ * clip asset's cached transcript from `captions`) from video node `node_id`; the pieces are placed back to back as
36940
+ * one new version (`base_seq` rebased like `edit`, locks honoured unless `force`). Free. 409 `captions_required`
36941
+ * (run `captions` on that clip first) or `stale`; video creatives only.
36942
+ */
36943
+ transcriptCut(id: string, body: CreativeTranscriptCutRequest, opts?: CallOpts$28): Promise<CreativeTranscriptCutResult>;
36944
+ /**
36945
+ * Generate a new picture for an `image` node (`prompt`, optional `model`, `aspect_ratio` — default the closest
36946
+ * ratio of the node box — `base_seq`, `force`) and swap it in as one new version. A node with a `castId` sends that
36947
+ * cast entry's `refAssetIds` as references and appends its `description`, so the subject stays consistent. Billed
36948
+ * like `images.generate` (402 `insufficient_funds`); 400 `content_filtered` charges nothing. `idempotencyKey`
36949
+ * replays a retry (24 h).
36950
+ */
36951
+ regenerateNode(id: string, nodeId: string, body: CreativeRegenerateNodeRequest, opts?: CallOpts$28 & {
36952
+ idempotencyKey?: string;
36953
+ }): Promise<CreativeRegenerateNodeResult>;
35310
36954
  /**
35311
36955
  * Re-apply a brand kit (`brand_kit_id`) or a flat token map (`tokens`) to the creative as one new version: literal
35312
36956
  * colours equal to the old brand become token refs, `snap: true` maps every other colour to the nearest kit colour,
35313
36957
  * `fonts` (default true) sets heading / body font refs by role, locked nodes are skipped unless `force`. The kit
35314
36958
  * logo is registered too. `base_seq` defaults to the head (rebased like `edit`, 409 `stale` else). Free.
35315
36959
  */
35316
- restyle(id: string, body: CreativeRestyleRequest, opts?: CallOpts$27): Promise<CreativeRestyleResult>;
36960
+ restyle(id: string, body: CreativeRestyleRequest, opts?: CallOpts$28): Promise<CreativeRestyleResult>;
35317
36961
  /**
35318
36962
  * Auto-captions: transcribe a voice clip (`clip_id`, default the first voice clip) word by word and add or update a
35319
36963
  * captions node (`preset`, default `bold-pill`) as one new version. Words are cached on the asset (free next time
@@ -35321,83 +36965,83 @@ export declare class Creatives {
35321
36965
  * transcription is billed at the speech-to-text rate (`cost_micro_usd`). Video creatives only (400
35322
36966
  * `unsupported_kind`); 403 `residency_unavailable`, 503 `transcription_unavailable`.
35323
36967
  */
35324
- captions(id: string, body?: CreativeCaptionsRequest, opts?: CallOpts$27): Promise<CreativeCaptionsResult>;
36968
+ captions(id: string, body?: CreativeCaptionsRequest, opts?: CallOpts$28): Promise<CreativeCaptionsResult>;
35325
36969
  /** The captions as SubRip text on the document timeline (`node_id`, `seq` optional); 404 without captions. Free. */
35326
- captionsSrt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$27): Promise<string>;
36970
+ captionsSrt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$28): Promise<string>;
35327
36971
  /** The captions as WebVTT text on the document timeline (`node_id`, `seq` optional); 404 without captions. Free. */
35328
- captionsVtt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$27): Promise<string>;
36972
+ captionsVtt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$28): Promise<string>;
35329
36973
  /**
35330
36974
  * Adapt to platforms (`tiktok`, `reels`, `shorts`, `feed-square`, `feed-portrait`, `youtube`): one format per
35331
36975
  * platform in one new version, text kept inside each platform's safe zone and above its legible size.
35332
36976
  * `focal: 'vision'` (token-metered) finds the focal point of full-bleed images; it fails open. Free otherwise.
35333
36977
  */
35334
- adapt(id: string, body: CreativeAdaptRequest, opts?: CallOpts$27): Promise<CreativeAdaptResult>;
36978
+ adapt(id: string, body: CreativeAdaptRequest, opts?: CallOpts$28): Promise<CreativeAdaptResult>;
35335
36979
  /**
35336
36980
  * Fix lint issues as one new version: deterministic fixes (free) for `off_brand_color`, `text_too_small`,
35337
36981
  * `outside_platform_safe_zone` and `flashing` (`codes` limits them); `agent: true` (token-metered) gives the rest
35338
36982
  * to one `codai` turn. Nothing to fix: the current `seq`, empty `fixed`, no new version.
35339
36983
  */
35340
- lintFix(id: string, body?: CreativeLintFixRequest, opts?: CallOpts$27): Promise<CreativeLintFixResult>;
36984
+ lintFix(id: string, body?: CreativeLintFixRequest, opts?: CallOpts$28): Promise<CreativeLintFixResult>;
35341
36985
  /**
35342
36986
  * The tweak panel model: one control per variable (stored `meta.controls` entry or derived from the type). Change
35343
36987
  * values with a `setVar` op and controls with a `setControl` op (`edit`). Free.
35344
36988
  */
35345
- controls(id: string, opts?: CallOpts$27): Promise<CreativeControls>;
36989
+ controls(id: string, opts?: CallOpts$28): Promise<CreativeControls>;
35346
36990
  /**
35347
36991
  * Localisation state: source locale, glossary, unit count and per locale translated / missing / stale / voice.
35348
36992
  * With `locale` (+ `units`, default 1) also the units of that locale (paged with `offset` / `limit` ≤ 500). Free.
35349
36993
  */
35350
- locales(id: string, query?: CreativeLocalesQuery, opts?: CallOpts$27): Promise<CreativeLocaleStatus>;
36994
+ locales(id: string, query?: CreativeLocalesQuery, opts?: CallOpts$28): Promise<CreativeLocaleStatus>;
35351
36995
  /**
35352
36996
  * Translate every text into up to 10 BCP-47 `locales` as per-locale overrides (one new version, author `agent`).
35353
36997
  * Token-metered `codai` turns; `glossary` terms and the brand kit name stay verbatim, `tone` picks the address,
35354
36998
  * `only_missing` (default true) skips fresh translations, `voice: true` (video, billed) narrates voice clips again.
35355
36999
  * 400 `nothing_to_translate`; 503 `localize_unavailable` when every locale failed.
35356
37000
  */
35357
- localize(id: string, body: CreativeLocalizeRequest, opts?: CallOpts$27): Promise<CreativeLocalizeResult>;
37001
+ localize(id: string, body: CreativeLocalizeRequest, opts?: CallOpts$28): Promise<CreativeLocalizeResult>;
35358
37002
  /**
35359
37003
  * Save `locale` as a new standalone creative (translations applied, overrides dropped, `fork_of` recorded; default
35360
37004
  * title `<title> (<locale>)`). 404 `Locale not found.`. Free (HTTP 201).
35361
37005
  */
35362
- forkLocale(id: string, locale: string, body?: CreativeLocaleForkRequest, opts?: CallOpts$27): Promise<CreativeLocaleForkResult>;
37006
+ forkLocale(id: string, locale: string, body?: CreativeLocaleForkRequest, opts?: CallOpts$28): Promise<CreativeLocaleForkResult>;
35363
37007
  /**
35364
37008
  * Create a public link: `view` (read-only preview of version `seq` or the head; `allow_remix` default false) or
35365
37009
  * `review` (comments by name, no account; `can_approve` lets the holder approve). The `token` and `url` are shown
35366
37010
  * only in this answer (HTTP 201). 400 `unknown_seq`; 409 `too_many_shares` (20 active links). Free.
35367
37011
  */
35368
- createShare(id: string, body: StudioShareCreateRequest, opts?: CallOpts$27): Promise<StudioShareCreated>;
37012
+ createShare(id: string, body: StudioShareCreateRequest, opts?: CallOpts$28): Promise<StudioShareCreated>;
35369
37013
  /** The active links (not revoked, not expired), newest first; `url` is always null. Free. */
35370
- listShares(id: string, opts?: CallOpts$27): Promise<StudioShareList>;
37014
+ listShares(id: string, opts?: CallOpts$28): Promise<StudioShareList>;
35371
37015
  /** Revoke a link: it answers 404 from now on. 404 when unknown or already revoked. Free. */
35372
- revokeShare(id: string, shareId: string, opts?: CallOpts$27): Promise<void>;
37016
+ revokeShare(id: string, shareId: string, opts?: CallOpts$28): Promise<void>;
35373
37017
  /**
35374
37018
  * The review state: `status` (`draft` → `in_review` → `approved` | `changes_requested`), requested / approved
35375
37019
  * version (`approved_is_head` false once the creative changed), decider and thread counts. Free.
35376
37020
  */
35377
- review(id: string, opts?: CallOpts$27): Promise<StudioReview>;
37021
+ review(id: string, opts?: CallOpts$28): Promise<StudioReview>;
35378
37022
  /** Send the head to review (`in_review`, earlier decision cleared) so approver links can decide. Free. */
35379
- requestReview(id: string, opts?: CallOpts$27): Promise<StudioReview>;
37023
+ requestReview(id: string, opts?: CallOpts$28): Promise<StudioReview>;
35380
37024
  /** Back to `draft` (decision cleared, comments kept). Free. */
35381
- resetReview(id: string, opts?: CallOpts$27): Promise<StudioReview>;
37025
+ resetReview(id: string, opts?: CallOpts$28): Promise<StudioReview>;
35382
37026
  /** Comment threads, newest first (≤ 200), replies oldest first; `status` `open` | `resolved` | `all`. Free. */
35383
- reviewThreads(id: string, query?: StudioReviewThreadsQuery, opts?: CallOpts$27): Promise<StudioReviewThreadList>;
37027
+ reviewThreads(id: string, query?: StudioReviewThreadsQuery, opts?: CallOpts$28): Promise<StudioReviewThreadList>;
35384
37028
  /**
35385
37029
  * Start a thread as the owner, optionally anchored to `node_id` / `scene_id` / `t_ms` (checked against the head:
35386
37030
  * 400 `unknown_node` / `unknown_scene`; HTTP 201). 409 `too_many_comments`. Free.
35387
37031
  */
35388
- createReviewThread(id: string, body: StudioReviewThreadCreateRequest, opts?: CallOpts$27): Promise<StudioReviewThread>;
37032
+ createReviewThread(id: string, body: StudioReviewThreadCreateRequest, opts?: CallOpts$28): Promise<StudioReviewThread>;
35389
37033
  /** Reply in a thread as the owner (HTTP 201) — returns the whole thread. Free. */
35390
37034
  replyReviewThread(id: string, threadId: string, body: {
35391
37035
  body: string;
35392
- }, opts?: CallOpts$27): Promise<StudioReviewThread>;
37036
+ }, opts?: CallOpts$28): Promise<StudioReviewThread>;
35393
37037
  /** Resolve a thread. Free. */
35394
- resolveReviewThread(id: string, threadId: string, opts?: CallOpts$27): Promise<StudioReviewThread>;
37038
+ resolveReviewThread(id: string, threadId: string, opts?: CallOpts$28): Promise<StudioReviewThread>;
35395
37039
  /** Reopen a resolved thread. Free. */
35396
- reopenReviewThread(id: string, threadId: string, opts?: CallOpts$27): Promise<StudioReviewThread>;
37040
+ reopenReviewThread(id: string, threadId: string, opts?: CallOpts$28): Promise<StudioReviewThread>;
35397
37041
  /** Delete any comment (owner moderation; deleting a root hides the thread). 404 when unknown. Free. */
35398
- deleteReviewComment(id: string, commentId: string, opts?: CallOpts$27): Promise<void>;
37042
+ deleteReviewComment(id: string, commentId: string, opts?: CallOpts$28): Promise<void>;
35399
37043
  /** Poll a frame job: frames when done (`status: 'succeeded'`), `status: 'running'` meanwhile; 404 unknown job. */
35400
- frameJob(id: string, jobId: string, opts?: CallOpts$27): Promise<CreativeFrameResult>;
37044
+ frameJob(id: string, jobId: string, opts?: CallOpts$28): Promise<CreativeFrameResult>;
35401
37045
  }
35402
37046
  //#endregion
35403
37047
  //#region src/resources/brand-kits.d.ts
@@ -35413,7 +37057,7 @@ export type BrandKitCreateRequest = Mutable<Body<'createBrandKit'>>;
35413
37057
  export type BrandKitUpdateRequest = Mutable<Body<'updateBrandKit'>>;
35414
37058
  export type BrandKitList = Reply<'listBrandKits'>;
35415
37059
  export type BrandKitDeleted = Reply<'deleteBrandKit'>;
35416
- type CallOpts$26 = {
37060
+ type CallOpts$27 = {
35417
37061
  ext?: CodaiRequestExtensions;
35418
37062
  signal?: AbortSignal;
35419
37063
  };
@@ -35425,29 +37069,29 @@ export declare class BrandKits {
35425
37069
  * (import) — exactly one. 400 `invalid_tokens` (with `details.issues`) for an invalid DTCG document, 404 when
35426
37070
  * `logo_asset_id` is not one of your ready image assets. Free.
35427
37071
  */
35428
- create(body: BrandKitCreateRequest, opts?: CallOpts$26): Promise<BrandKit>;
37072
+ create(body: BrandKitCreateRequest, opts?: CallOpts$27): Promise<BrandKit>;
35429
37073
  /**
35430
37074
  * Edit a kit: `tokens` is merged onto the current kit, `dtcg` replaces the whole document (not both),
35431
37075
  * `logo_asset_id: null` removes the logo. Creatives keep their tokens until `creatives.restyle`. Free.
35432
37076
  */
35433
- update(id: string, body: BrandKitUpdateRequest, opts?: CallOpts$26): Promise<BrandKit>;
37077
+ update(id: string, body: BrandKitUpdateRequest, opts?: CallOpts$27): Promise<BrandKit>;
35434
37078
  /** The kit as a DTCG 2025.10 JSON document (`$extensions['ro.codai']` = kit id, name, logo asset id). Free. */
35435
- exportDtcg(id: string, opts?: CallOpts$26): Promise<BrandKitDtcg>;
37079
+ exportDtcg(id: string, opts?: CallOpts$27): Promise<BrandKitDtcg>;
35436
37080
  /**
35437
37081
  * Extract a brand kit from a public `https` page (`{ url }`) or from one of your logo images
35438
37082
  * (`{ logo_asset_id }`, PNG / JPEG / WebP up to 5 MB; it becomes the kit logo): palette (primary, secondary, accent,
35439
37083
  * background, text) and heading / body fonts. One bounded `codai` model call (token-metered); 400 `url_blocked` for
35440
37084
  * private hosts, 400 `unsupported_media` for a bad logo, 422 `fetch_failed` / `extract_failed`, 504 `timeout`.
35441
37085
  */
35442
- extract(body: BrandKitExtractRequest, opts?: CallOpts$26): Promise<BrandKit>;
37086
+ extract(body: BrandKitExtractRequest, opts?: CallOpts$27): Promise<BrandKit>;
35443
37087
  /** Your brand kits, newest first (`limit` 1–100, default 50). Free. */
35444
37088
  list(query?: {
35445
37089
  limit?: number;
35446
- }, opts?: CallOpts$26): Promise<BrandKitList>;
37090
+ }, opts?: CallOpts$27): Promise<BrandKitList>;
35447
37091
  /** One kit with a signed logo URL (1 h), its `dtcg` and the WCAG `contrast` pairs. Free. */
35448
- retrieve(id: string, opts?: CallOpts$26): Promise<BrandKit>;
37092
+ retrieve(id: string, opts?: CallOpts$27): Promise<BrandKit>;
35449
37093
  /** Delete a kit (creatives keep their tokens; the logo asset stays). Free. */
35450
- delete(id: string, opts?: CallOpts$26): Promise<BrandKitDeleted>;
37094
+ delete(id: string, opts?: CallOpts$27): Promise<BrandKitDeleted>;
35451
37095
  }
35452
37096
  //#endregion
35453
37097
  //#region src/resources/templates.d.ts
@@ -35455,7 +37099,7 @@ export type CreativeTemplateVar = Schema<'CreativeTemplateVar'>;
35455
37099
  export type CreativeTemplateList = Reply<'listCreativeTemplates'>;
35456
37100
  export type CreativeTemplateListQuery = QueryOf<'listCreativeTemplates'>;
35457
37101
  export type CreativeTemplateDeleted = Reply<'deleteCreativeTemplate'>;
35458
- type CallOpts$25 = {
37102
+ type CallOpts$26 = {
35459
37103
  ext?: CodaiRequestExtensions;
35460
37104
  signal?: AbortSignal;
35461
37105
  };
@@ -35468,25 +37112,25 @@ export declare class Templates {
35468
37112
  * (default). `kind` filters both. Without `doc`. Free. A starter id works anywhere a template id does
35469
37113
  * (`retrieve`, `creatives.create({ template })`, batches); starters cannot be deleted.
35470
37114
  */
35471
- list(query?: CreativeTemplateListQuery, opts?: CallOpts$25): Promise<CreativeTemplateList>;
37115
+ list(query?: CreativeTemplateListQuery, opts?: CallOpts$26): Promise<CreativeTemplateList>;
35472
37116
  /** One template with its variables and `doc`. Free. */
35473
- retrieve(id: string, opts?: CallOpts$25): Promise<Schema<'CreativeTemplate'>>;
37117
+ retrieve(id: string, opts?: CallOpts$26): Promise<Schema<'CreativeTemplate'>>;
35474
37118
  /** Delete a template (creatives made from it are not affected). Free. */
35475
- delete(id: string, opts?: CallOpts$25): Promise<CreativeTemplateDeleted>;
37119
+ delete(id: string, opts?: CallOpts$26): Promise<CreativeTemplateDeleted>;
35476
37120
  }
35477
37121
  //#endregion
35478
37122
  //#region src/resources/productions.d.ts
35479
37123
  export type StudioProductionCreate = Mutable<Body<'createStudioProduction'>>;
35480
37124
  export type StudioProduction = Schema<'StudioProduction'>;
35481
- type CallOpts$24 = {
37125
+ type CallOpts$25 = {
35482
37126
  ext?: CodaiRequestExtensions;
35483
37127
  signal?: AbortSignal;
35484
37128
  };
35485
- export interface ProductionCreateOptions extends CallOpts$24 {
37129
+ export interface ProductionCreateOptions extends CallOpts$25 {
35486
37130
  /** `Idempotency-Key`: a retry with the same key replays the first production instead of starting another one. */
35487
37131
  idempotencyKey?: string;
35488
37132
  }
35489
- export interface ProductionWaitOptions extends CallOpts$24 {
37133
+ export interface ProductionWaitOptions extends CallOpts$25 {
35490
37134
  /** Delay between polls (default 5000 ms). */
35491
37135
  intervalMs?: number;
35492
37136
  /** Give up after this long (default 600 000 ms = 10 min). */
@@ -35499,7 +37143,7 @@ export declare class Productions {
35499
37143
  /** `POST /v1/studio/productions` — brief → storyboard → assets → creative → queued draft render (202). */
35500
37144
  create(body: StudioProductionCreate, opts?: ProductionCreateOptions): Promise<StudioProduction>;
35501
37145
  /** `GET /v1/studio/productions/{id}` — advances the production and returns it (another account's id is a 404). */
35502
- retrieve(id: string, opts?: CallOpts$24): Promise<StudioProduction>;
37146
+ retrieve(id: string, opts?: CallOpts$25): Promise<StudioProduction>;
35503
37147
  /**
35504
37148
  * Poll `retrieve` every `intervalMs` (default 5 s) until the production `succeeded` or `failed` (a failed one
35505
37149
  * resolves too — check `status` / `error`). Throws after `timeoutMs` (default 10 min) or when `signal` aborts.
@@ -35509,6 +37153,350 @@ export declare class Productions {
35509
37153
  run(body: StudioProductionCreate, opts?: ProductionCreateOptions & ProductionWaitOptions): Promise<StudioProduction>;
35510
37154
  }
35511
37155
  //#endregion
37156
+ //#region src/resources/media-ops.d.ts
37157
+ export type MediaOpId = Schema<'MediaOpId'>;
37158
+ export type MediaOp = Schema<'MediaOp'>;
37159
+ export type MediaOpList = Reply<'listStudioMediaOps'>;
37160
+ export type MediaOpRequest = Mutable<Schema<'MediaOpRequest'>>;
37161
+ export type MediaOpQuote = Schema<'MediaOpQuote'>;
37162
+ export type MediaOpResult = Schema<'MediaOpResult'>;
37163
+ export type MediaOpJob = Schema<'MediaOpJob'>;
37164
+ type CallOpts$24 = {
37165
+ ext?: CodaiRequestExtensions;
37166
+ signal?: AbortSignal;
37167
+ };
37168
+ export interface MediaOpInput {
37169
+ /** Owned, ready Studio asset ids in the order the op expects (mask second for inpaint / erase). */
37170
+ assetIds?: string[];
37171
+ /** Per-op parameters (validated strictly by the gateway; see the docs table). */
37172
+ params?: Record<string, unknown>;
37173
+ /**
37174
+ * `image.inpaint` / `image.erase` only: a mask painted in an editor, base64 PNG (white = edit, black = keep, at most
37175
+ * 8 MB). Send ONE asset id (the image); the gateway stores the mask as a free private asset and passes it as the
37176
+ * second input. A quote validates it without storing anything.
37177
+ */
37178
+ maskPngB64?: string;
37179
+ }
37180
+ export interface MediaOpRunOptions extends CallOpts$24 {
37181
+ /** `Idempotency-Key`: a retry with the same key replays the first answer instead of running (and billing) again. */
37182
+ idempotencyKey?: string;
37183
+ }
37184
+ export interface MediaOpWaitOptions extends CallOpts$24 {
37185
+ /** Delay between polls (default 3000 ms). */
37186
+ intervalMs?: number;
37187
+ /** Give up after this long (default 1 200 000 ms = 20 min, the server-side job timeout). */
37188
+ timeoutMs?: number;
37189
+ }
37190
+ /** A run answer is a job (async op, HTTP 202) when `object` is `media_op.job`. */
37191
+ export declare const isMediaOpJob: (r: MediaOpResult | MediaOpJob) => r is MediaOpJob;
37192
+ export declare const isMediaOpJobFinished: (j: Pick<MediaOpJob, "status">) => boolean;
37193
+ export declare class MediaOps {
37194
+ private readonly http;
37195
+ constructor(http: HttpClient);
37196
+ /** `GET /v1/studio/media-ops` — every op with engine, mode, inputs, `available` and a list quote (free). */
37197
+ list(opts?: CallOpts$24): Promise<MediaOpList>;
37198
+ /** `POST /v1/studio/media-ops/{op}/quote` — exact price of this request; nothing is held or billed. */
37199
+ quote(op: MediaOpId | string, input?: MediaOpInput, opts?: CallOpts$24): Promise<MediaOpQuote>;
37200
+ /**
37201
+ * `POST /v1/studio/media-ops/{op}` — sync ops resolve to a `media_op.result` with the outputs, async ops to a
37202
+ * `media_op.job` (`status: pending`; poll with `job` / `wait`). Use `isMediaOpJob` to tell them apart.
37203
+ */
37204
+ run(op: MediaOpId | string, input?: MediaOpInput, opts?: MediaOpRunOptions): Promise<MediaOpResult | MediaOpJob>;
37205
+ /** `GET /v1/studio/media-ops/jobs/{id}` — the job; reading a finished one stores its outputs and bills it once. */
37206
+ job(id: string, opts?: CallOpts$24): Promise<MediaOpJob>;
37207
+ /**
37208
+ * Poll `job` every `intervalMs` (default 3 s) until it is `ready` or `failed` (a failed job resolves too — check
37209
+ * `status` / `error`). Throws after `timeoutMs` (default 20 min) or when `signal` aborts.
37210
+ */
37211
+ wait(id: string, opts?: MediaOpWaitOptions): Promise<MediaOpJob>;
37212
+ /** `run`, then `wait` when the op is async. */
37213
+ runAndWait(op: MediaOpId | string, input?: MediaOpInput, opts?: MediaOpRunOptions & MediaOpWaitOptions): Promise<MediaOpResult | MediaOpJob>;
37214
+ }
37215
+ //#endregion
37216
+ //#region src/resources/lyrics.d.ts
37217
+ export type LyricsRequest = Mutable<Schema<'StudioLyricsRequest'>>;
37218
+ export type LyricsSectionKind = Schema<'StudioLyricsSectionKind'>;
37219
+ export type LyricsLine = Schema<'StudioLyricsLine'>;
37220
+ export type Lyrics = Schema<'StudioLyrics'>;
37221
+ export type LyricsAlignRequest = Mutable<Schema<'StudioLyricsAlignRequest'>>;
37222
+ export type LyricsAlignment = Schema<'StudioLyricsAlignment'>;
37223
+ export interface LyricsCallOptions {
37224
+ ext?: CodaiRequestExtensions;
37225
+ signal?: AbortSignal;
37226
+ /** `Idempotency-Key`: a retry with the same key replays the first answer instead of running (and billing) again. */
37227
+ idempotencyKey?: string;
37228
+ }
37229
+ export declare class LyricsResource {
37230
+ private readonly http;
37231
+ constructor(http: HttpClient);
37232
+ private post;
37233
+ /**
37234
+ * `POST /v1/studio/lyrics` — `{ brief, language: 'ro' | 'en', genre?, mood?, structure?, syllables_per_line?,
37235
+ * rhyme_scheme?, lines_per_section?, title? }` → `studio.lyrics` with every line's syllables and rhyme letter, the
37236
+ * whole song as `text` (`[kind]` headers) and a `report`. `repaired: true` when the repair turn won.
37237
+ */
37238
+ write(body: LyricsRequest, opts?: LyricsCallOptions): Promise<Lyrics>;
37239
+ /**
37240
+ * `POST /v1/studio/lyrics/align` — `{ creative_id, clip_id, lyrics_text, language?, apply?, base_seq?,
37241
+ * retranscribe? }` → `studio.lyrics_alignment`: timed `lines`, `lrc`, `match_ratio`, `cached`, and `seq` /
37242
+ * `doc_hash` of the new version when applied.
37243
+ */
37244
+ align(body: LyricsAlignRequest, opts?: LyricsCallOptions): Promise<LyricsAlignment>;
37245
+ }
37246
+ //#endregion
37247
+ //#region src/resources/realtime.d.ts
37248
+ /**
37249
+ * `wss://…/v1/realtime` — dependency-free realtime client (live transcription and the OpenAI
37250
+ * Realtime protocol lanes). Not an OpenAPI operation (OpenAPI cannot describe WebSockets), so it is
37251
+ * outside the `OPERATION_METHODS` parity table.
37252
+ *
37253
+ * const live = codai.realtime.connect({ model: 'codai-transcribe-live', language: 'ro', token });
37254
+ * live.appendAudio(pcm16At24kHz); // Int16Array | ArrayBuffer | Uint8Array
37255
+ * for await (const ev of live) {
37256
+ * if (ev.type === 'conversation.item.input_audio_transcription.delta') draw(ev.delta);
37257
+ * }
37258
+ *
37259
+ * Uses the global `WebSocket` (browsers, Node ≥ 22, Deno, Bun) or an injected constructor.
37260
+ * - Browser path: pass an ephemeral `token` (scope `realtime` or `live`); it travels as `?key=`.
37261
+ * Raw `codai_` keys in the query string are refused by the gateway (close 4401).
37262
+ * - Server path: pass `apiKey` (or a token) with a WebSocket constructor that accepts headers
37263
+ * (e.g. `ws`); it is sent as `Authorization: Bearer` on the upgrade.
37264
+ */
37265
+ /** Minimal WebSocket surface (browser `WebSocket`, Node 22 global, or the `ws` package). */
37266
+ export interface RealtimeSocket {
37267
+ readonly readyState: number;
37268
+ binaryType?: string;
37269
+ send(data: string | ArrayBuffer | ArrayBufferView): void;
37270
+ close(code?: number, reason?: string): void;
37271
+ onopen: ((ev: unknown) => void) | null;
37272
+ onmessage: ((ev: {
37273
+ data: unknown;
37274
+ }) => void) | null;
37275
+ onclose: ((ev: {
37276
+ code: number;
37277
+ reason: string;
37278
+ }) => void) | null;
37279
+ onerror: ((ev: unknown) => void) | null;
37280
+ }
37281
+ /** `new (url, protocols?, options?)` — the third argument is used for headers by `ws`. */
37282
+ export type RealtimeSocketCtor = new (url: string, protocols?: string | string[], options?: {
37283
+ headers?: Record<string, string>;
37284
+ }) => RealtimeSocket;
37285
+ export type RealtimeModel = 'codai-transcribe-live' | 'codai-realtime' | 'codai-voice' | (string & Record<never, never>);
37286
+ export interface RealtimeConnectOptions {
37287
+ /** Default `codai-transcribe-live`. */
37288
+ model?: RealtimeModel;
37289
+ /** Language hint (`ro`, `en`, …). `ro` uses the Deepgram Nova-3 lane when the gateway has it. */
37290
+ language?: string;
37291
+ /** Ephemeral token (scope `realtime` or `live`) — sent as `?key=`. Required in browsers. */
37292
+ token?: string;
37293
+ /** Raw API key — sent as `Authorization: Bearer` (needs a ctor that supports headers). */
37294
+ apiKey?: string;
37295
+ /** Conversation id recorded on the usage row (`?session_id=`). */
37296
+ sessionId?: string;
37297
+ /**
37298
+ * First frame sent on open. Default for `codai-transcribe-live`: a transcription
37299
+ * `session.update` (PCM 24 kHz, `language` when set). Pass `null` to send nothing.
37300
+ */
37301
+ sessionUpdate?: Record<string, unknown> | null;
37302
+ /** Injectable WebSocket constructor (tests, `ws` on older Node). Defaults to `globalThis.WebSocket`. */
37303
+ WebSocket?: RealtimeSocketCtor;
37304
+ /** Override the gateway base URL (default: the client's `baseUrl`). */
37305
+ baseUrl?: string;
37306
+ }
37307
+ /** Typed subset of server events; anything else arrives as `RealtimeUnknownEvent`. */
37308
+ export type RealtimeEvent = {
37309
+ type: 'session.created' | 'session.updated';
37310
+ session?: Record<string, unknown>;
37311
+ event_id?: string;
37312
+ } | {
37313
+ type: 'conversation.item.input_audio_transcription.delta';
37314
+ item_id: string;
37315
+ content_index?: number;
37316
+ delta: string;
37317
+ event_id?: string;
37318
+ } | {
37319
+ type: 'conversation.item.input_audio_transcription.completed';
37320
+ item_id: string;
37321
+ content_index?: number;
37322
+ transcript: string;
37323
+ event_id?: string;
37324
+ } | {
37325
+ type: 'input_audio_buffer.committed';
37326
+ item_id?: string;
37327
+ previous_item_id?: string | null;
37328
+ } | {
37329
+ type: 'input_audio_buffer.cleared';
37330
+ } | {
37331
+ type: 'error';
37332
+ error: {
37333
+ type?: string;
37334
+ code?: string;
37335
+ message?: string;
37336
+ };
37337
+ } |
37338
+ /** Emitted by the client itself when the socket closes (always the last event). */
37339
+ {
37340
+ type: 'close';
37341
+ code: number;
37342
+ reason: string;
37343
+ };
37344
+ export type RealtimeUnknownEvent = {
37345
+ type: string;
37346
+ [k: string]: unknown;
37347
+ };
37348
+ export type RealtimeAnyEvent = RealtimeEvent | RealtimeUnknownEvent;
37349
+ type Listener$1 = (ev: RealtimeAnyEvent) => void;
37350
+ /** A live realtime session: async-iterable of events + `on()` listeners. */
37351
+ export declare class RealtimeSession implements AsyncIterable<RealtimeAnyEvent> {
37352
+ readonly socket: RealtimeSocket;
37353
+ private readonly listeners;
37354
+ private readonly queue;
37355
+ private readonly waiters;
37356
+ private readonly outbox;
37357
+ private closed;
37358
+ /** Resolves when the socket is open (rejects if it closes first). */
37359
+ readonly ready: Promise<void>;
37360
+ constructor(socket: RealtimeSocket, firstFrame: Record<string, unknown> | null);
37361
+ /** Listen for one event type (`'*'` = every event). Returns an unsubscribe function. */
37362
+ on(type: string, fn: Listener$1): () => void;
37363
+ /** Send any client event (JSON). Queued until the socket opens. */
37364
+ send(event: Record<string, unknown>): void;
37365
+ /** Append PCM16 little-endian mono audio (24 kHz for `codai-transcribe-live`). */
37366
+ appendAudio(audio: Int16Array | ArrayBuffer | Uint8Array): void;
37367
+ /** Close the current utterance: the server answers with one `...transcription.completed`. */
37368
+ commit(): void;
37369
+ /** Drop audio the server holds for the current utterance. */
37370
+ clear(): void;
37371
+ close(code?: number, reason?: string): void;
37372
+ [Symbol.asyncIterator](): AsyncIterator<RealtimeAnyEvent>;
37373
+ private emit;
37374
+ }
37375
+ /** Build the `wss://…/v1/realtime?…` URL (exported for tests and custom transports). */
37376
+ export declare function realtimeUrl(baseUrl: string, opts: RealtimeConnectOptions): string;
37377
+ export declare class Realtime {
37378
+ private readonly defaults;
37379
+ constructor(defaults: {
37380
+ baseUrl: string;
37381
+ apiKey?: string;
37382
+ });
37383
+ /** Open a realtime session. Returns immediately; `await session.ready` to wait for the socket. */
37384
+ connect(opts?: RealtimeConnectOptions): RealtimeSession;
37385
+ }
37386
+ //#endregion
37387
+ //#region src/resources/jam.d.ts
37388
+ export declare const JAM_SUBPROTOCOL = "codai-jam";
37389
+ /** WebSocket close codes of `/v1/studio/jam`. */
37390
+ export declare const JAM_CLOSE_CODES: {
37391
+ readonly invalidMessage: 4400;
37392
+ readonly unauthorized: 4401;
37393
+ readonly insufficientFunds: 4402;
37394
+ readonly forbidden: 4403;
37395
+ readonly maxDuration: 4408;
37396
+ readonly busy: 4409;
37397
+ readonly upstream: 4502;
37398
+ readonly unavailable: 4503;
37399
+ };
37400
+ export declare const JAM_SCALES: readonly ["SCALE_UNSPECIFIED", "C_MAJOR_A_MINOR", "D_FLAT_MAJOR_B_FLAT_MINOR", "D_MAJOR_B_MINOR", "E_FLAT_MAJOR_C_MINOR", "E_MAJOR_D_FLAT_MINOR", "F_MAJOR_D_MINOR", "G_FLAT_MAJOR_E_FLAT_MINOR", "G_MAJOR_E_MINOR", "A_FLAT_MAJOR_F_MINOR", "A_MAJOR_G_FLAT_MINOR", "B_FLAT_MAJOR_G_MINOR", "B_MAJOR_A_FLAT_MINOR"];
37401
+ export type JamScale = (typeof JAM_SCALES)[number];
37402
+ /** A weighted prompt: 1..8 per message, `weight` in [-10, 10] and not 0. */
37403
+ export interface JamPrompt {
37404
+ text: string;
37405
+ weight: number;
37406
+ }
37407
+ /** Partial config; the server merges it into the last full config. bpm / scale changes reset the context. */
37408
+ export interface JamConfig {
37409
+ bpm?: number;
37410
+ density?: number;
37411
+ brightness?: number;
37412
+ scale?: JamScale;
37413
+ }
37414
+ export type JamClientMessage = {
37415
+ type: 'prompts';
37416
+ prompts: JamPrompt[];
37417
+ } | ({
37418
+ type: 'config';
37419
+ } & JamConfig) | {
37420
+ type: 'play' | 'pause' | 'stop' | 'reset';
37421
+ };
37422
+ export type JamState = 'connecting' | 'ready' | 'playing' | 'paused' | 'stopped' | (string & Record<never, never>);
37423
+ export type JamEvent = {
37424
+ type: 'status';
37425
+ state: JamState;
37426
+ remaining_ms: number;
37427
+ sample_rate?: number;
37428
+ channels?: number;
37429
+ } | {
37430
+ type: 'filtered';
37431
+ text: string;
37432
+ reason: string;
37433
+ } | {
37434
+ type: 'error';
37435
+ code: string;
37436
+ message: string;
37437
+ } |
37438
+ /** Emitted by the client for every binary frame. */
37439
+ {
37440
+ type: 'audio';
37441
+ data: ArrayBuffer;
37442
+ } |
37443
+ /** Emitted by the client itself when the socket closes (always the last event). */
37444
+ {
37445
+ type: 'close';
37446
+ code: number;
37447
+ reason: string;
37448
+ };
37449
+ export interface JamConnectOptions {
37450
+ /** Ephemeral token (scope `realtime` or `live`) — sent as the `bearer.<token>` subprotocol. Required in browsers. */
37451
+ token?: string;
37452
+ /** API key — sent as `Authorization: Bearer` (needs a ctor that supports headers). */
37453
+ apiKey?: string;
37454
+ /** Conversation id recorded on the usage row (`?session_id=`). */
37455
+ sessionId?: string;
37456
+ /** Injectable WebSocket constructor (tests, `ws` on older Node). Defaults to `globalThis.WebSocket`. */
37457
+ WebSocket?: RealtimeSocketCtor;
37458
+ /** Override the gateway base URL (default: the client's `baseUrl`). */
37459
+ baseUrl?: string;
37460
+ }
37461
+ type Listener<T extends JamEvent['type']> = (ev: Extract<JamEvent, {
37462
+ type: T;
37463
+ }>) => void;
37464
+ type AnyListener = (ev: JamEvent) => void;
37465
+ /** A live jam session: `on()` listeners for status / audio / errors and typed senders. */
37466
+ export declare class JamSession {
37467
+ readonly socket: RealtimeSocket;
37468
+ private readonly listeners;
37469
+ private readonly outbox;
37470
+ private closed;
37471
+ /** Resolves when the socket is open (rejects if it closes first). */
37472
+ readonly ready: Promise<void>;
37473
+ constructor(socket: RealtimeSocket);
37474
+ /** Listen for one event type (`'*'` = every event). Returns an unsubscribe function. */
37475
+ on<T extends JamEvent['type']>(type: T, fn: Listener<T>): () => void;
37476
+ on(type: '*', fn: AnyListener): () => void;
37477
+ /** Send one client message (JSON). Queued until the socket opens. */
37478
+ send(msg: JamClientMessage): void;
37479
+ prompts(prompts: JamPrompt[]): void;
37480
+ config(config: JamConfig): void;
37481
+ play(): void;
37482
+ pause(): void;
37483
+ stop(): void;
37484
+ reset(): void;
37485
+ close(code?: number, reason?: string): void;
37486
+ private emit;
37487
+ }
37488
+ /** Build the `wss://…/v1/studio/jam` URL (exported for tests and custom transports). */
37489
+ export declare function jamUrl(baseUrl: string, opts?: Pick<JamConnectOptions, 'sessionId'>): string;
37490
+ export declare class Jam {
37491
+ private readonly defaults;
37492
+ constructor(defaults: {
37493
+ baseUrl: string;
37494
+ apiKey?: string;
37495
+ });
37496
+ /** Open a live jam. Returns immediately; `await session.ready` to wait for the socket. */
37497
+ connect(opts?: JamConnectOptions): JamSession;
37498
+ }
37499
+ //#endregion
35512
37500
  //#region src/resources/batches.d.ts
35513
37501
  export type StudioBatchStatus = Schema<'StudioBatchStatus'>;
35514
37502
  export type StudioBatchRowStatus = Schema<'StudioBatchRowStatus'>;
@@ -35930,146 +37918,6 @@ export declare class Projects {
35930
37918
  delete(projectId: string, opts?: CallOpts$19): Promise<Reply<'deleteProject'>>;
35931
37919
  }
35932
37920
  //#endregion
35933
- //#region src/resources/realtime.d.ts
35934
- /**
35935
- * `wss://…/v1/realtime` — dependency-free realtime client (live transcription and the OpenAI
35936
- * Realtime protocol lanes). Not an OpenAPI operation (OpenAPI cannot describe WebSockets), so it is
35937
- * outside the `OPERATION_METHODS` parity table.
35938
- *
35939
- * const live = codai.realtime.connect({ model: 'codai-transcribe-live', language: 'ro', token });
35940
- * live.appendAudio(pcm16At24kHz); // Int16Array | ArrayBuffer | Uint8Array
35941
- * for await (const ev of live) {
35942
- * if (ev.type === 'conversation.item.input_audio_transcription.delta') draw(ev.delta);
35943
- * }
35944
- *
35945
- * Uses the global `WebSocket` (browsers, Node ≥ 22, Deno, Bun) or an injected constructor.
35946
- * - Browser path: pass an ephemeral `token` (scope `realtime` or `live`); it travels as `?key=`.
35947
- * Raw `codai_` keys in the query string are refused by the gateway (close 4401).
35948
- * - Server path: pass `apiKey` (or a token) with a WebSocket constructor that accepts headers
35949
- * (e.g. `ws`); it is sent as `Authorization: Bearer` on the upgrade.
35950
- */
35951
- /** Minimal WebSocket surface (browser `WebSocket`, Node 22 global, or the `ws` package). */
35952
- export interface RealtimeSocket {
35953
- readonly readyState: number;
35954
- binaryType?: string;
35955
- send(data: string | ArrayBuffer | ArrayBufferView): void;
35956
- close(code?: number, reason?: string): void;
35957
- onopen: ((ev: unknown) => void) | null;
35958
- onmessage: ((ev: {
35959
- data: unknown;
35960
- }) => void) | null;
35961
- onclose: ((ev: {
35962
- code: number;
35963
- reason: string;
35964
- }) => void) | null;
35965
- onerror: ((ev: unknown) => void) | null;
35966
- }
35967
- /** `new (url, protocols?, options?)` — the third argument is used for headers by `ws`. */
35968
- export type RealtimeSocketCtor = new (url: string, protocols?: string | string[], options?: {
35969
- headers?: Record<string, string>;
35970
- }) => RealtimeSocket;
35971
- export type RealtimeModel = 'codai-transcribe-live' | 'codai-realtime' | 'codai-voice' | (string & Record<never, never>);
35972
- export interface RealtimeConnectOptions {
35973
- /** Default `codai-transcribe-live`. */
35974
- model?: RealtimeModel;
35975
- /** Language hint (`ro`, `en`, …). `ro` uses the Deepgram Nova-3 lane when the gateway has it. */
35976
- language?: string;
35977
- /** Ephemeral token (scope `realtime` or `live`) — sent as `?key=`. Required in browsers. */
35978
- token?: string;
35979
- /** Raw API key — sent as `Authorization: Bearer` (needs a ctor that supports headers). */
35980
- apiKey?: string;
35981
- /** Conversation id recorded on the usage row (`?session_id=`). */
35982
- sessionId?: string;
35983
- /**
35984
- * First frame sent on open. Default for `codai-transcribe-live`: a transcription
35985
- * `session.update` (PCM 24 kHz, `language` when set). Pass `null` to send nothing.
35986
- */
35987
- sessionUpdate?: Record<string, unknown> | null;
35988
- /** Injectable WebSocket constructor (tests, `ws` on older Node). Defaults to `globalThis.WebSocket`. */
35989
- WebSocket?: RealtimeSocketCtor;
35990
- /** Override the gateway base URL (default: the client's `baseUrl`). */
35991
- baseUrl?: string;
35992
- }
35993
- /** Typed subset of server events; anything else arrives as `RealtimeUnknownEvent`. */
35994
- export type RealtimeEvent = {
35995
- type: 'session.created' | 'session.updated';
35996
- session?: Record<string, unknown>;
35997
- event_id?: string;
35998
- } | {
35999
- type: 'conversation.item.input_audio_transcription.delta';
36000
- item_id: string;
36001
- content_index?: number;
36002
- delta: string;
36003
- event_id?: string;
36004
- } | {
36005
- type: 'conversation.item.input_audio_transcription.completed';
36006
- item_id: string;
36007
- content_index?: number;
36008
- transcript: string;
36009
- event_id?: string;
36010
- } | {
36011
- type: 'input_audio_buffer.committed';
36012
- item_id?: string;
36013
- previous_item_id?: string | null;
36014
- } | {
36015
- type: 'input_audio_buffer.cleared';
36016
- } | {
36017
- type: 'error';
36018
- error: {
36019
- type?: string;
36020
- code?: string;
36021
- message?: string;
36022
- };
36023
- } |
36024
- /** Emitted by the client itself when the socket closes (always the last event). */
36025
- {
36026
- type: 'close';
36027
- code: number;
36028
- reason: string;
36029
- };
36030
- export type RealtimeUnknownEvent = {
36031
- type: string;
36032
- [k: string]: unknown;
36033
- };
36034
- export type RealtimeAnyEvent = RealtimeEvent | RealtimeUnknownEvent;
36035
- type Listener = (ev: RealtimeAnyEvent) => void;
36036
- /** A live realtime session: async-iterable of events + `on()` listeners. */
36037
- export declare class RealtimeSession implements AsyncIterable<RealtimeAnyEvent> {
36038
- readonly socket: RealtimeSocket;
36039
- private readonly listeners;
36040
- private readonly queue;
36041
- private readonly waiters;
36042
- private readonly outbox;
36043
- private closed;
36044
- /** Resolves when the socket is open (rejects if it closes first). */
36045
- readonly ready: Promise<void>;
36046
- constructor(socket: RealtimeSocket, firstFrame: Record<string, unknown> | null);
36047
- /** Listen for one event type (`'*'` = every event). Returns an unsubscribe function. */
36048
- on(type: string, fn: Listener): () => void;
36049
- /** Send any client event (JSON). Queued until the socket opens. */
36050
- send(event: Record<string, unknown>): void;
36051
- /** Append PCM16 little-endian mono audio (24 kHz for `codai-transcribe-live`). */
36052
- appendAudio(audio: Int16Array | ArrayBuffer | Uint8Array): void;
36053
- /** Close the current utterance: the server answers with one `...transcription.completed`. */
36054
- commit(): void;
36055
- /** Drop audio the server holds for the current utterance. */
36056
- clear(): void;
36057
- close(code?: number, reason?: string): void;
36058
- [Symbol.asyncIterator](): AsyncIterator<RealtimeAnyEvent>;
36059
- private emit;
36060
- }
36061
- /** Build the `wss://…/v1/realtime?…` URL (exported for tests and custom transports). */
36062
- export declare function realtimeUrl(baseUrl: string, opts: RealtimeConnectOptions): string;
36063
- export declare class Realtime {
36064
- private readonly defaults;
36065
- constructor(defaults: {
36066
- baseUrl: string;
36067
- apiKey?: string;
36068
- });
36069
- /** Open a realtime session. Returns immediately; `await session.ready` to wait for the socket. */
36070
- connect(opts?: RealtimeConnectOptions): RealtimeSession;
36071
- }
36072
- //#endregion
36073
37921
  //#region src/resources/referrals.d.ts
36074
37922
  export type ReferralsView = Reply<'getReferrals'>;
36075
37923
  export type ReferralRow = Schema<'ReferralRow'>;
@@ -38459,6 +40307,11 @@ export interface AppKeyMintInput {
38459
40307
  maxOutputTokens?: number;
38460
40308
  /** ISO 8601 with offset, in the future. Omit = never expires. */
38461
40309
  expiresAt?: string;
40310
+ /**
40311
+ * The end user confirmed being 18 or older in your app. Stored on the codai user when it is
40312
+ * CREATED by this call (`users.adult_confirmed_at`, version `host:<app slug>`).
40313
+ */
40314
+ adultConfirmed?: boolean;
38462
40315
  }
38463
40316
  export interface AppKeyMinted {
38464
40317
  id: string;
@@ -38601,6 +40454,8 @@ export interface AppSubscriptionSyncInput {
38601
40454
  object?: unknown;
38602
40455
  };
38603
40456
  };
40457
+ /** The end user confirmed being 18 or older (stored when the codai user is created by this sync). */
40458
+ adultConfirmed?: boolean;
38604
40459
  }
38605
40460
  export interface AppKeyValidation {
38606
40461
  ok: boolean;
@@ -38776,6 +40631,12 @@ export declare class Codai {
38776
40631
  readonly templates: Templates;
38777
40632
  /** codai Studio productions (`productions.run({ brief, language: 'ro' })` → a finished promo video + editable creative). */
38778
40633
  readonly productions: Productions;
40634
+ /** codai Studio media operations (`mediaOps.run('audio.separate_stems', { assetIds })` → job; `mediaOps.wait(id)`). */
40635
+ readonly mediaOps: MediaOps;
40636
+ /** codai Studio lyrics (`lyrics.write({ brief, language: 'ro' })`, `lyrics.align({ creative_id, clip_id, lyrics_text })`). */
40637
+ readonly lyrics: LyricsResource;
40638
+ /** codai Studio live jam over WebSocket (`jam.connect({ token })` → PCM16 48 kHz stereo; `prompts`, `config`, `play`). */
40639
+ readonly jam: Jam;
38779
40640
  /** codai Studio FCPXML exports (`creatives.exportFcpxml(id)` queues one; `exports.wait(id)` polls until the zip is ready). */
38780
40641
  readonly exports: Exports;
38781
40642
  /** codai Studio batches (`batches.create({ source: { template_id }, csv })` → one creative per row; `batches.wait(id)`). */