codai-sdk 0.66.0 → 0.68.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
@@ -5157,7 +5157,7 @@ type paths$1 = {
5157
5157
  * `GET /v1/studio/renders/{id}` with the returned `render_id`; the render reports `creative_id`. Billed like
5158
5158
  * `POST /v1/studio/renders`, once, when it has succeeded. The format must be 1920×1080, 1080×1920 or 1080×1080
5159
5159
  * (400 `unsupported_format`); every referenced asset must be yours and ready (400 `asset_not_found`). Video
5160
- * creatives only for now.
5160
+ * creatives; an `audio` creative renders a mixdown instead (see below).
5161
5161
  *
5162
5162
  * Renders are composed from per-scene segments: scenes unchanged since an earlier render are reused (the charge
5163
5163
  * is still per second of output). When the same render already exists for this exact version, format, quality and
@@ -5168,6 +5168,13 @@ type paths$1 = {
5168
5168
  * When omitted it is `corner` if the render uses TTS narration (synthetic voice) or AI-generated images, else
5169
5169
  * `none`; an explicit `none` with TTS narration is rejected (400 `ai_label_required`). The response returns the
5170
5170
  * resolved `ai_label`. As the deployer you remain responsible for labelling deepfakes you publish.
5171
+ *
5172
+ * **Audio creatives** (`kind: audio`) take `CreativeAudioRenderRequest`: `formats` (`wav` / `mp3` / `flac`,
5173
+ * default WAV + MP3), `stems` (one WAV per audible track), `lrc` and `loudness` (preset or LUFS). The document is
5174
+ * mixed with ffmpeg, mastered to the loudness target (two-pass loudnorm + true-peak limiter) and every output is
5175
+ * AI-marked in the file (RIFF ICMT / ID3v2.4 / Vorbis comment). The 202 is a `CreativeAudioRenderAccepted`; poll
5176
+ * `GET /v1/studio/renders/{id}`, whose `data[]` holds one signed asset per output. Price: 1 000 µUSD per output
5177
+ * second (minimum 10 000 µUSD), `stems: true` adds 50 %; at most 20 minutes per render.
5171
5178
  * 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
5179
  * 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
5180
  */
@@ -5706,6 +5713,150 @@ type paths$1 = {
5706
5713
  readonly patch?: never;
5707
5714
  readonly trace?: never;
5708
5715
  };
5716
+ readonly '/v1/studio/lyrics': {
5717
+ readonly parameters: {
5718
+ readonly query?: never;
5719
+ readonly header?: never;
5720
+ readonly path?: never;
5721
+ readonly cookie?: never;
5722
+ };
5723
+ readonly get?: never;
5724
+ readonly put?: never;
5725
+ /**
5726
+ * Write song lyrics
5727
+ * @description Writes original song lyrics for a brief in Romanian or English: one bounded `codai` turn with a forced tool,
5728
+ * checked line by line for syllables (`syllables_per_line`, tolerance ±1) and the rhyme scheme (`AABB`, `ABAB` or
5729
+ * `free`). When more than 30 % of the lines miss, ONE repair turn names the problems and the better of the two answers
5730
+ * is returned (`repaired`). Billing: token-metered (usage model `codai::lyrics`, prompt caching on) under a small
5731
+ * wallet hold (20 000 µUSD, settled with the real cost; 402 `insufficient_funds` when short). Briefs and lyrics are
5732
+ * never logged. Supports `Idempotency-Key` (24 h).
5733
+ */
5734
+ readonly post: operations$1['writeStudioLyrics'];
5735
+ readonly delete?: never;
5736
+ readonly options?: never;
5737
+ readonly head?: never;
5738
+ readonly patch?: never;
5739
+ readonly trace?: never;
5740
+ };
5741
+ readonly '/v1/studio/lyrics/align': {
5742
+ readonly parameters: {
5743
+ readonly query?: never;
5744
+ readonly header?: never;
5745
+ readonly path?: never;
5746
+ readonly cookie?: never;
5747
+ };
5748
+ readonly get?: never;
5749
+ readonly put?: never;
5750
+ /**
5751
+ * Align lyrics to an audio clip
5752
+ * @description Karaoke alignment: matches written lyrics to the word timestamps of one clip of an audio (or video) creative and
5753
+ * writes the timed lines with one `setLyrics` edit (`apply: false` only returns them), plus an LRC file. The clip's
5754
+ * words come from the transcription cached on its asset (free, `cached: true`); otherwise the clip is transcribed
5755
+ * (Whisper, at most 25 MB) and billed `codai::lyrics-align` at the speech-to-text rate (6 000 µUSD per started minute)
5756
+ * under a wallet hold. Not available for EU data-residency accounts (403 `residency_unavailable`). Supports
5757
+ * `Idempotency-Key` (24 h).
5758
+ */
5759
+ readonly post: operations$1['alignStudioLyrics'];
5760
+ readonly delete?: never;
5761
+ readonly options?: never;
5762
+ readonly head?: never;
5763
+ readonly patch?: never;
5764
+ readonly trace?: never;
5765
+ };
5766
+ readonly '/v1/studio/media-ops': {
5767
+ readonly parameters: {
5768
+ readonly query?: never;
5769
+ readonly header?: never;
5770
+ readonly path?: never;
5771
+ readonly cookie?: never;
5772
+ };
5773
+ /**
5774
+ * List media operations
5775
+ * @description The media-op catalogue: one entry per op (`image.remove_background`, `audio.separate_stems`,
5776
+ * `music.generate_ace`…) with its engine, lane, sync/async mode, accepted inputs, output kind, whether the lane is
5777
+ * configured on this gateway (`available`) and a list quote for a reference input (default params, 60 s of input
5778
+ * audio or a 1024×1024 image; `quote_basis`). Free. Ask `POST /v1/studio/media-ops/{op}/quote` for the exact price
5779
+ * of a real request.
5780
+ */
5781
+ readonly get: operations$1['listStudioMediaOps'];
5782
+ readonly put?: never;
5783
+ readonly post?: never;
5784
+ readonly delete?: never;
5785
+ readonly options?: never;
5786
+ readonly head?: never;
5787
+ readonly patch?: never;
5788
+ readonly trace?: never;
5789
+ };
5790
+ readonly '/v1/studio/media-ops/{op}': {
5791
+ readonly parameters: {
5792
+ readonly query?: never;
5793
+ readonly header?: never;
5794
+ readonly path?: never;
5795
+ readonly cookie?: never;
5796
+ };
5797
+ readonly get?: never;
5798
+ readonly put?: never;
5799
+ /**
5800
+ * Run a media operation
5801
+ * @description Runs one op on your Studio assets: `asset_ids` (0–4 owned, ready assets, in the order the op expects) and
5802
+ * `params` (validated strictly per op, see `MediaOpRequest`). Sync ops (`mode: sync`: background removal,
5803
+ * upscale, inpaint / outpaint / erase, analyze) answer **200** with the stored outputs; async ops (stems, denoise,
5804
+ * MIDI, mastering, music and sound-effect generation) answer **202** with a job — poll
5805
+ * `GET /v1/studio/media-ops/jobs/{id}`; the sweeper settles it even when nobody polls. At most 3 async jobs run per
5806
+ * user (429 beyond). Money gate: the quote is held on the wallet first (402 `insufficient_funds` when it does not
5807
+ * fit), the measured cost is billed once and the rest of the hold released. Every output is marked as
5808
+ * AI-generated (C2PA / XMP on images, RIFF INFO / ID3 on audio, GCS metadata) and carries lineage:
5809
+ * `parent_asset_id` = the first input, `op` and `op_inputs`. Supports `Idempotency-Key`.
5810
+ */
5811
+ readonly post: operations$1['runStudioMediaOp'];
5812
+ readonly delete?: never;
5813
+ readonly options?: never;
5814
+ readonly head?: never;
5815
+ readonly patch?: never;
5816
+ readonly trace?: never;
5817
+ };
5818
+ readonly '/v1/studio/media-ops/{op}/quote': {
5819
+ readonly parameters: {
5820
+ readonly query?: never;
5821
+ readonly header?: never;
5822
+ readonly path?: never;
5823
+ readonly cookie?: never;
5824
+ };
5825
+ readonly get?: never;
5826
+ readonly put?: never;
5827
+ /**
5828
+ * Quote a media operation
5829
+ * @description The exact price of `{ asset_ids, params }` for one op, after the same validation as the run (op id, params,
5830
+ * asset ownership, kinds and mimes, lane configured). Nothing is held or billed. `quote_micro_eur` is what the
5831
+ * wallet hold would be; the run bills the measured cost, never more than the quote.
5832
+ */
5833
+ readonly post: operations$1['quoteStudioMediaOp'];
5834
+ readonly delete?: never;
5835
+ readonly options?: never;
5836
+ readonly head?: never;
5837
+ readonly patch?: never;
5838
+ readonly trace?: never;
5839
+ };
5840
+ readonly '/v1/studio/media-ops/jobs/{id}': {
5841
+ readonly parameters: {
5842
+ readonly query?: never;
5843
+ readonly header?: never;
5844
+ readonly path?: never;
5845
+ readonly cookie?: never;
5846
+ };
5847
+ /**
5848
+ * Retrieve a media job
5849
+ * @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.
5850
+ */
5851
+ readonly get: operations$1['getStudioMediaOpJob'];
5852
+ readonly put?: never;
5853
+ readonly post?: never;
5854
+ readonly delete?: never;
5855
+ readonly options?: never;
5856
+ readonly head?: never;
5857
+ readonly patch?: never;
5858
+ readonly trace?: never;
5859
+ };
5709
5860
  readonly '/v1/studio/previews/{id}': {
5710
5861
  readonly parameters: {
5711
5862
  readonly query?: never;
@@ -5862,6 +6013,9 @@ type paths$1 = {
5862
6013
  * Timeline renders (`POST /v1/studio/timelines`) also return `timeline` (scenes with their assets),
5863
6014
  * `parent_render_id` and `root_render_id`; while a regenerated video scene is still being generated the render
5864
6015
  * stays `queued` with `stage: generating_scene`.
6016
+ *
6017
+ * Audio creative renders (`target: audio`) answer `StudioAudioRender`: `data` holds one asset per output
6018
+ * (`output`: `mix` / `stem` / `lrc`, `format`, `track_id`), `qa` the measured loudness and true peak.
5865
6019
  */
5866
6020
  readonly get: operations$1['getRender'];
5867
6021
  readonly put?: never;
@@ -7292,6 +7446,26 @@ type paths$1 = {
7292
7446
  readonly patch?: never;
7293
7447
  readonly trace?: never;
7294
7448
  };
7449
+ readonly '/v1/vault/grants/revoke-task': {
7450
+ readonly parameters: {
7451
+ readonly query?: never;
7452
+ readonly header?: never;
7453
+ readonly path?: never;
7454
+ readonly cookie?: never;
7455
+ };
7456
+ readonly get?: never;
7457
+ readonly put?: never;
7458
+ /**
7459
+ * Revoke the grants of a task
7460
+ * @description Revokes every live grant whose `task` matches (task id, client task id or session key sent as `task` on `/v1/vault/use`). The gateway also does this on task confirm, session delete and every 5 minutes for closed tasks.
7461
+ */
7462
+ readonly post: operations$1['revokeVaultTaskGrants'];
7463
+ readonly delete?: never;
7464
+ readonly options?: never;
7465
+ readonly head?: never;
7466
+ readonly patch?: never;
7467
+ readonly trace?: never;
7468
+ };
7295
7469
  readonly '/v1/vault/http': {
7296
7470
  readonly parameters: {
7297
7471
  readonly query?: never;
@@ -7376,6 +7550,66 @@ type paths$1 = {
7376
7550
  readonly patch?: never;
7377
7551
  readonly trace?: never;
7378
7552
  };
7553
+ readonly '/v1/vault/items/{id}/limits': {
7554
+ readonly parameters: {
7555
+ readonly query?: never;
7556
+ readonly header?: never;
7557
+ readonly path?: never;
7558
+ readonly cookie?: never;
7559
+ };
7560
+ readonly get?: never;
7561
+ /**
7562
+ * Set per-handle limits
7563
+ * @description Editor or above on the item's vault. Send all three keys; null removes a cap, all null removes the limits. Over a cap `/v1/vault/use`, `/v1/vault/http` and `/v1/vault/resolve` answer 429 `vault_rate_limited` with `Retry-After`.
7564
+ */
7565
+ readonly put: operations$1['setVaultItemLimits'];
7566
+ readonly post?: never;
7567
+ readonly delete?: never;
7568
+ readonly options?: never;
7569
+ readonly head?: never;
7570
+ readonly patch?: never;
7571
+ readonly trace?: never;
7572
+ };
7573
+ readonly '/v1/vault/limits': {
7574
+ readonly parameters: {
7575
+ readonly query?: never;
7576
+ readonly header?: never;
7577
+ readonly path?: never;
7578
+ readonly cookie?: never;
7579
+ };
7580
+ /**
7581
+ * List per-handle limits
7582
+ * @description Usage caps set on your items. Only allowed uses count; an `http` use costs 2 units, other modes 1.
7583
+ */
7584
+ readonly get: operations$1['listVaultLimits'];
7585
+ readonly put?: never;
7586
+ readonly post?: never;
7587
+ readonly delete?: never;
7588
+ readonly options?: never;
7589
+ readonly head?: never;
7590
+ readonly patch?: never;
7591
+ readonly trace?: never;
7592
+ };
7593
+ readonly '/v1/vault/lock': {
7594
+ readonly parameters: {
7595
+ readonly query?: never;
7596
+ readonly header?: never;
7597
+ readonly path?: never;
7598
+ readonly cookie?: never;
7599
+ };
7600
+ readonly get?: never;
7601
+ readonly put?: never;
7602
+ /**
7603
+ * Panic lock
7604
+ * @description Revokes every live grant, denies every pending approval and locks the vault: from then on every agent use is denied with reason `vault_locked` (`/v1/vault/http` and `/v1/vault/resolve` answer 403 `vault_denied`). Device keys stay enrolled. The body is optional; idempotent (a second call keeps the first lock time).
7605
+ */
7606
+ readonly post: operations$1['lockVault'];
7607
+ readonly delete?: never;
7608
+ readonly options?: never;
7609
+ readonly head?: never;
7610
+ readonly patch?: never;
7611
+ readonly trace?: never;
7612
+ };
7379
7613
  readonly '/v1/vault/resolve': {
7380
7614
  readonly parameters: {
7381
7615
  readonly query?: never;
@@ -7454,12 +7688,52 @@ type paths$1 = {
7454
7688
  readonly options?: never;
7455
7689
  readonly head?: never;
7456
7690
  /**
7457
- * Change the default agent tier
7458
- * @description Default approval tier for items without a matching rule (t3 = explicit approval).
7691
+ * Change the default tier and anomaly guards
7692
+ * @description Send `default_tier` (approval tier for items without a matching rule; t3 = explicit approval), `guards` (partial anomaly settings, merged over the current ones) or both. A use on a new host, in a burst or outside the allowed hours is forced to t4 with reason `anomaly:new_host`, `anomaly:burst` or `anomaly:hour`. Answers the effective settings.
7459
7693
  */
7460
7694
  readonly patch: operations$1['patchVaultSettings'];
7461
7695
  readonly trace?: never;
7462
7696
  };
7697
+ readonly '/v1/vault/unlock': {
7698
+ readonly parameters: {
7699
+ readonly query?: never;
7700
+ readonly header?: never;
7701
+ readonly path?: never;
7702
+ readonly cookie?: never;
7703
+ };
7704
+ readonly get?: never;
7705
+ readonly put?: never;
7706
+ /**
7707
+ * Unlock the vault
7708
+ * @description Ends a panic or honeytoken lock with a device key (phone, desktop) or passkey proof over the unlock challenge. Watch keys are refused (`wear_t3_only`). Errors (403): `challenge_invalid`, `unknown_device`, `device_revoked`, `wear_t3_only`, `invalid_signature`, `passkey_invalid`.
7709
+ */
7710
+ readonly post: operations$1['unlockVault'];
7711
+ readonly delete?: never;
7712
+ readonly options?: never;
7713
+ readonly head?: never;
7714
+ readonly patch?: never;
7715
+ readonly trace?: never;
7716
+ };
7717
+ readonly '/v1/vault/unlock/challenge': {
7718
+ readonly parameters: {
7719
+ readonly query?: never;
7720
+ readonly header?: never;
7721
+ readonly path?: never;
7722
+ readonly cookie?: never;
7723
+ };
7724
+ readonly get?: never;
7725
+ readonly put?: never;
7726
+ /**
7727
+ * Get an unlock challenge
7728
+ * @description Single-use challenge valid for 5 minutes. Sign `codai-vault/unlock/v1|<challenge>|<device_id>` with a device key, or use base64url(SHA-256(`codai-vault/unlock/v1|<challenge>|passkey`)) as the WebAuthn challenge.
7729
+ */
7730
+ readonly post: operations$1['createVaultUnlockChallenge'];
7731
+ readonly delete?: never;
7732
+ readonly options?: never;
7733
+ readonly head?: never;
7734
+ readonly patch?: never;
7735
+ readonly trace?: never;
7736
+ };
7463
7737
  readonly '/v1/vault/use': {
7464
7738
  readonly parameters: {
7465
7739
  readonly query?: never;
@@ -9686,6 +9960,223 @@ type components$1 = {
9686
9960
  readonly seq: number;
9687
9961
  readonly warnings: readonly string[];
9688
9962
  };
9963
+ /**
9964
+ * Creative audio part
9965
+ * @description `doc.audio`: the audio timeline of every creative (voice / music / sfx tracks of a video) and the whole document
9966
+ * of an `audio` creative (song or podcast). Milliseconds are the source of truth; bars and beats are derived from
9967
+ * `meta.bpm` / `meta.timeSignature`. Every field but `tracks` is optional.
9968
+ */
9969
+ readonly CreativeAudio: {
9970
+ /** @description Human-contribution log of an `audio` creative, appended by the server for each edit (who: `human` or `ai`). */
9971
+ readonly humanLog?: readonly {
9972
+ /** @enum {string} */
9973
+ readonly actor: 'human' | 'ai';
9974
+ readonly detail?: string;
9975
+ readonly op: string;
9976
+ /** Format: date-time */
9977
+ readonly ts: string;
9978
+ }[];
9979
+ /** @description Timed lyric lines (exported as LRC). */
9980
+ readonly lyrics?: readonly {
9981
+ readonly endMs: number;
9982
+ readonly sectionId?: string;
9983
+ readonly startMs: number;
9984
+ readonly text: string;
9985
+ }[];
9986
+ /** @description Master bus. Unset fields resolve to `meta.loudnessTarget` (or -14 LUFS) and a -1 dBTP true peak. */
9987
+ readonly master?: {
9988
+ readonly fx?: readonly components$1['schemas']['CreativeAudioFx'][];
9989
+ readonly limiter?: boolean;
9990
+ readonly targetLufs?: number;
9991
+ readonly truePeakDb?: number;
9992
+ };
9993
+ /** @description Song / episode metadata. */
9994
+ readonly meta?: {
9995
+ readonly bpm?: number;
9996
+ readonly key?: {
9997
+ /** @enum {string} */
9998
+ readonly mode: 'major' | 'minor';
9999
+ /** @enum {string} */
10000
+ readonly tonic: 'C' | 'C#' | 'Db' | 'D' | 'D#' | 'Eb' | 'E' | 'F' | 'F#' | 'Gb' | 'G' | 'G#' | 'Ab' | 'A' | 'A#' | 'Bb' | 'B';
10001
+ };
10002
+ readonly language?: string;
10003
+ /** @description `streaming` (-14 LUFS), `podcast` (-16), `broadcast` (-23) or an integrated LUFS number (-40…-5). */
10004
+ readonly loudnessTarget?: ('streaming' | 'podcast' | 'broadcast') | number;
10005
+ /** @enum {integer} */
10006
+ readonly sampleRate?: 44100 | 48000;
10007
+ /** @description `[beats per bar, beat unit]`, e.g. `[4, 4]`. */
10008
+ readonly timeSignature?: readonly number[];
10009
+ };
10010
+ readonly sections?: readonly components$1['schemas']['CreativeAudioSection'][];
10011
+ readonly tracks: readonly components$1['schemas']['CreativeAudioTrack'][];
10012
+ };
10013
+ /**
10014
+ * Creative audio clip
10015
+ * @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`.
10016
+ */
10017
+ readonly CreativeAudioClip: {
10018
+ /** @description Studio asset id (uuid). */
10019
+ readonly assetId: string;
10020
+ readonly color?: string;
10021
+ /** @description Duck under voice / vocal tracks (default on for music tracks of an `audio` creative). */
10022
+ readonly duck?: boolean;
10023
+ /** @enum {string} */
10024
+ readonly fadeCurve?: 'linear' | 'exp' | 's';
10025
+ readonly fadeInMs?: number;
10026
+ readonly fadeOutMs?: number;
10027
+ readonly gainDb?: number;
10028
+ /** @description How the clip was generated (public codai provider / model ids, never an upstream name). */
10029
+ readonly generation?: {
10030
+ readonly model: string;
10031
+ readonly op?: string;
10032
+ readonly parentClipId?: string;
10033
+ readonly prompt?: string;
10034
+ readonly provider: string;
10035
+ readonly seed?: number;
10036
+ };
10037
+ readonly id: string;
10038
+ readonly inMs?: number;
10039
+ readonly locked?: boolean;
10040
+ readonly loop?: boolean;
10041
+ readonly outMs?: number;
10042
+ readonly pan?: number;
10043
+ readonly pitchSemitones?: number;
10044
+ readonly startMs: number;
10045
+ /** @description Timeline length / source length (pitch kept). */
10046
+ readonly stretch?: number;
10047
+ };
10048
+ /** Creative audio effect */
10049
+ readonly CreativeAudioFx: {
10050
+ readonly bypass?: boolean;
10051
+ readonly id: string;
10052
+ /** @description Numeric effect parameters by name (`threshold`, `ratio`, `mix`…). */
10053
+ readonly params: {
10054
+ readonly [key: string]: number;
10055
+ };
10056
+ /** @enum {string} */
10057
+ readonly type: 'eq' | 'compressor' | 'reverb' | 'delay' | 'limiter' | 'gate' | 'deesser' | 'pitch' | 'chorus' | 'saturation';
10058
+ };
10059
+ /** Queued audio render */
10060
+ readonly CreativeAudioRenderAccepted: {
10061
+ /** @enum {boolean} */
10062
+ readonly cached: false;
10063
+ /** Format: uuid */
10064
+ readonly creative_id: string;
10065
+ readonly duration_seconds: number;
10066
+ readonly formats: readonly ('wav' | 'mp3' | 'flac')[];
10067
+ /** Format: uuid */
10068
+ readonly id: string;
10069
+ readonly lrc: boolean;
10070
+ readonly minimum_micro_usd: string;
10071
+ readonly model: string;
10072
+ /** @enum {string} */
10073
+ readonly object: 'studio.render';
10074
+ /** @description The files this render will produce, in result order: mixes, stems, LRC. */
10075
+ readonly outputs: readonly components$1['schemas']['CreativeAudioRenderOutput'][];
10076
+ readonly price_micro_usd_per_second: string;
10077
+ /** @description The amount held on the wallet (micro-USD); the bill uses the measured length. */
10078
+ readonly quote_micro_usd: string;
10079
+ /**
10080
+ * Format: uuid
10081
+ * @description Poll it with `GET /v1/studio/renders/{id}`.
10082
+ */
10083
+ readonly render_id: string;
10084
+ readonly seq: number;
10085
+ /** @enum {string} */
10086
+ readonly status: 'queued';
10087
+ readonly stems: boolean;
10088
+ readonly stems_surcharge_pct: number;
10089
+ /** @enum {string} */
10090
+ readonly target: 'audio';
10091
+ readonly target_lufs: number;
10092
+ readonly true_peak_db: number;
10093
+ };
10094
+ readonly CreativeAudioRenderOutput: {
10095
+ /** @enum {string} */
10096
+ readonly format: 'wav' | 'mp3' | 'flac' | 'lrc';
10097
+ /** @enum {string} */
10098
+ readonly kind: 'mix' | 'stem' | 'lrc';
10099
+ readonly mime_type: string;
10100
+ /** @description The track of a stem; null for the mix and the LRC. */
10101
+ readonly track_id: string | null;
10102
+ };
10103
+ /**
10104
+ * Audio creative render request
10105
+ * @description Body of `POST /v1/studio/creatives/{id}/render` for a creative of `kind: audio` (mixdown + mastering + exports).
10106
+ * Any other kind uses `CreativeRenderRequest`.
10107
+ */
10108
+ readonly CreativeAudioRenderRequest: {
10109
+ /**
10110
+ * @default [
10111
+ * "wav",
10112
+ * "mp3"
10113
+ * ]
10114
+ */
10115
+ readonly formats?: readonly ('wav' | 'mp3' | 'flac')[];
10116
+ /** @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. */
10117
+ readonly loudness?: ('streaming' | 'podcast' | 'broadcast') | number;
10118
+ /** @description Export an LRC file (default on when the document has timed lyrics; true without lyrics is 400 `no_lyrics`). */
10119
+ readonly lrc?: boolean;
10120
+ /**
10121
+ * @description Also export one WAV stem per audible track (+50 % price).
10122
+ * @default false
10123
+ */
10124
+ readonly stems?: boolean;
10125
+ readonly title?: string;
10126
+ };
10127
+ /** Creative audio section */
10128
+ readonly CreativeAudioSection: {
10129
+ readonly durationMs: number;
10130
+ readonly id: string;
10131
+ /** @enum {string} */
10132
+ readonly kind: 'intro' | 'verse' | 'pre_chorus' | 'chorus' | 'bridge' | 'outro' | 'instrumental' | 'custom';
10133
+ readonly label?: string;
10134
+ readonly locked?: boolean;
10135
+ readonly lyrics?: string;
10136
+ readonly startMs: number;
10137
+ readonly styleHint?: string;
10138
+ };
10139
+ /** Creative audio track */
10140
+ readonly CreativeAudioTrack: {
10141
+ /** @description Breakpoint envelopes; `target` is `gainDb`, `pan` or `fx.<fxId>.<param>`. */
10142
+ readonly automation?: readonly {
10143
+ readonly points: readonly {
10144
+ readonly tMs: number;
10145
+ readonly value: number;
10146
+ }[];
10147
+ readonly target: string;
10148
+ }[];
10149
+ readonly clips: readonly components$1['schemas']['CreativeAudioClip'][];
10150
+ readonly fx?: readonly components$1['schemas']['CreativeAudioFx'][];
10151
+ readonly gainDb?: number;
10152
+ readonly id: string;
10153
+ /**
10154
+ * @description Absent = `audio`. MIDI tracks hold `midiClips` only; buses hold no clips.
10155
+ * @enum {string}
10156
+ */
10157
+ readonly kind?: 'audio' | 'midi' | 'bus';
10158
+ readonly locked?: boolean;
10159
+ readonly midiClips?: readonly ({
10160
+ readonly durationMs: number;
10161
+ readonly id: string;
10162
+ readonly notes: readonly {
10163
+ readonly [key: string]: unknown;
10164
+ }[];
10165
+ readonly startMs: number;
10166
+ } & {
10167
+ readonly [key: string]: unknown;
10168
+ })[];
10169
+ readonly mute?: boolean;
10170
+ readonly name?: string;
10171
+ readonly pan?: number;
10172
+ /** @enum {string} */
10173
+ readonly role: 'voice' | 'music' | 'sfx' | 'drums' | 'bass' | 'keys' | 'guitar' | 'vocal' | 'lead' | 'pad' | 'fx' | 'bus' | 'podcast_host' | 'podcast_guest';
10174
+ readonly sends?: readonly {
10175
+ readonly busId: string;
10176
+ readonly gainDb: number;
10177
+ }[];
10178
+ readonly solo?: boolean;
10179
+ };
9689
10180
  /**
9690
10181
  * Creative build request
9691
10182
  * @example {
@@ -9934,10 +10425,8 @@ type components$1 = {
9934
10425
  readonly assets: {
9935
10426
  readonly [key: string]: unknown;
9936
10427
  };
9937
- /** @description `{ tracks: [{ id, role: voice | music | sfx, clips[] }] }`. */
9938
- readonly audio: {
9939
- readonly [key: string]: unknown;
9940
- };
10428
+ /** @description Audio timeline: `{ tracks[], meta?, sections?, master?, lyrics?, humanLog? }` (see `CreativeAudio`). */
10429
+ readonly audio: components$1['schemas']['CreativeAudio'];
9941
10430
  /** @description `{ kitId?, tokens }`; nodes reference tokens as `{ "$token": "primary" }`. */
9942
10431
  readonly brand: {
9943
10432
  readonly [key: string]: unknown;
@@ -9994,7 +10483,7 @@ type components$1 = {
9994
10483
  readonly CreativeError: {
9995
10484
  readonly error: {
9996
10485
  /** @enum {string} */
9997
- 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';
10486
+ 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';
9998
10487
  readonly conflicts?: readonly {
9999
10488
  readonly head_prop?: string;
10000
10489
  readonly prop?: string;
@@ -10119,7 +10608,7 @@ type components$1 = {
10119
10608
  * Creative kind
10120
10609
  * @enum {string}
10121
10610
  */
10122
- readonly CreativeKind: 'video' | 'image' | 'deck' | 'doc' | 'sheet';
10611
+ readonly CreativeKind: 'video' | 'image' | 'deck' | 'doc' | 'sheet' | 'audio';
10123
10612
  /**
10124
10613
  * Lint code
10125
10614
  * @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`.
@@ -10436,6 +10925,14 @@ type components$1 = {
10436
10925
  * (`control: null` clears it), `setMeta { title?, locale?, formats?, defaultFormat?, fps? }`,
10437
10926
  * `setLocaleText { locale, texts, by? }` (`texts`: unit key → translation, `null` removes it),
10438
10927
  * `setLocale { locale, tone?, audio?, captions?, remove? }`, `setLocalization { source?, glossary?, forkOf?, reset? }`.
10928
+ * Audio ops (any creative's `doc.audio`; songs and podcasts): `addSection { section }`, `updateSection { target, patch }`,
10929
+ * `removeSection { target }`, `moveSection { target, startMs }`, `addTrack { track, index? }`,
10930
+ * `updateTrack { target, patch }`, `removeTrack { target }`, `splitClip { clipId, atMs, newId }`,
10931
+ * `trimClip { clipId, startMs?, endMs? }`, `moveClip { clipId, startMs?, trackId? }`,
10932
+ * `setFades { clipId, fadeInMs?, fadeOutMs?, fadeCurve? }`, `addMidiClip { trackId, clip }`, `removeMidiClip { clipId }`,
10933
+ * `updateMidiNotes { clipId, update?, remove?, add?, replace? }`, `setMaster { master }`, `setLyrics { lines }`;
10934
+ * `setMeta` also takes `audio` (bpm, key, timeSignature, language, loudnessTarget, sampleRate) and `setAudioClip` a
10935
+ * `trackId`. `null` in a patch removes an optional field.
10439
10936
  * @example {
10440
10937
  * "op": "setProps",
10441
10938
  * "target": "title",
@@ -10446,7 +10943,7 @@ type components$1 = {
10446
10943
  */
10447
10944
  readonly CreativeOp: {
10448
10945
  /** @enum {string} */
10449
- 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';
10946
+ 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' | 'addSection' | 'updateSection' | 'removeSection' | 'moveSection' | 'addTrack' | 'updateTrack' | 'removeTrack' | 'splitClip' | 'trimClip' | 'moveClip' | 'setFades' | 'addMidiClip' | 'removeMidiClip' | 'updateMidiNotes' | 'setMaster' | 'setLyrics';
10450
10947
  } & {
10451
10948
  readonly [key: string]: unknown;
10452
10949
  };
@@ -12457,6 +12954,157 @@ type components$1 = {
12457
12954
  readonly price_watch?: boolean;
12458
12955
  readonly show_in_share?: boolean;
12459
12956
  };
12957
+ /**
12958
+ * Media op
12959
+ * @description One catalogue entry of `GET /v1/studio/media-ops`.
12960
+ */
12961
+ readonly MediaOp: {
12962
+ /** @description False when the lane is not configured on this gateway (a run then answers 503 `media_ops_unavailable`). */
12963
+ readonly available: boolean;
12964
+ /** @description Engine that runs the op (`birefnet`, `real-esrgan-x4plus`, `gemini-image-edit`, `htdemucs`, `deepfilternet3`, `basic-pitch`, `ffmpeg-loudnorm`, `librosa`, `ace-step-1.5`). */
12965
+ readonly engine: string;
12966
+ readonly id: components$1['schemas']['MediaOpId'];
12967
+ /** @description Asset kinds accepted as input (`image`, `upload`, `frame` for image ops; `music`, `speech`, `sfx`, `upload` for audio ops). */
12968
+ readonly input_kinds: readonly string[];
12969
+ /**
12970
+ * @description `gpu` / `cpu` = the codai Studio media service, `vertex` = Gemini image edit.
12971
+ * @enum {string}
12972
+ */
12973
+ readonly lane: 'gpu' | 'vertex' | 'cpu';
12974
+ readonly max_inputs: number;
12975
+ readonly min_inputs: number;
12976
+ /**
12977
+ * @description `sync` answers 200 with the outputs; `async` answers 202 with a job.
12978
+ * @enum {string}
12979
+ */
12980
+ readonly mode: 'sync' | 'async';
12981
+ /** @description Caveat for the op, when there is one (mask ops: the mask is followed closely, not pixel-exactly). */
12982
+ readonly note?: string;
12983
+ /** @description Kind of the stored outputs (`image`, `music`, `sfx`, `midi`), `same` (the kind of the first input) or `analysis` (JSON only, no asset). */
12984
+ readonly output_kind: string;
12985
+ /** @description The same as a wallet amount, EUR micros. */
12986
+ readonly quote_micro_eur: number;
12987
+ /** @description List price for the reference input (`quote_basis`), USD micros. */
12988
+ readonly quote_micro_usd: number;
12989
+ /** @description Human-readable name. */
12990
+ readonly title: string;
12991
+ };
12992
+ /**
12993
+ * Media op id
12994
+ * @enum {string}
12995
+ */
12996
+ 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';
12997
+ /** Media op job */
12998
+ readonly MediaOpJob: {
12999
+ readonly analysis: {
13000
+ readonly [key: string]: unknown;
13001
+ } | null;
13002
+ /** @description Billed cost, USD micros (0 until settled). */
13003
+ readonly cost_micro_usd: number;
13004
+ /** Format: date-time */
13005
+ readonly created_at: string;
13006
+ /** @description Failure reason (`timeout`, `input_refused`, `dispatch_failed`, `store_failed` or an engine message). */
13007
+ readonly error: string | null;
13008
+ /** Format: uuid */
13009
+ readonly id: string;
13010
+ /** @enum {string} */
13011
+ readonly object: 'media_op.job';
13012
+ readonly op: components$1['schemas']['MediaOpId'];
13013
+ /** @description Stored outputs once `ready` (stems: one asset per stem). */
13014
+ readonly outputs: readonly components$1['schemas']['AssetDto'][];
13015
+ /**
13016
+ * Format: uuid
13017
+ * @description The first input asset (lineage).
13018
+ */
13019
+ readonly parent_asset_id: string | null;
13020
+ /**
13021
+ * @description `pending` while the engine runs; `ready` with outputs; `failed` with `error` (the hold is released, nothing billed).
13022
+ * @enum {string}
13023
+ */
13024
+ readonly status: 'pending' | 'ready' | 'failed';
13025
+ /** Format: date-time */
13026
+ readonly updated_at: string;
13027
+ };
13028
+ /** Media op catalogue */
13029
+ readonly MediaOpList: {
13030
+ readonly data: readonly components$1['schemas']['MediaOp'][];
13031
+ /** @enum {string} */
13032
+ readonly object: 'list';
13033
+ /** @description Reference input of the list quotes. */
13034
+ readonly quote_basis: string;
13035
+ };
13036
+ /** Media op quote */
13037
+ readonly MediaOpQuote: {
13038
+ /** @enum {string} */
13039
+ readonly mode: 'sync' | 'async';
13040
+ /** @enum {string} */
13041
+ readonly object: 'media_op.quote';
13042
+ readonly op: components$1['schemas']['MediaOpId'];
13043
+ /** @description Wallet hold for this request, EUR micros. */
13044
+ readonly quote_micro_eur: number;
13045
+ /** @description Upstream cost ceiling, USD micros. */
13046
+ readonly quote_micro_usd: number;
13047
+ };
13048
+ /**
13049
+ * Media op request
13050
+ * @description `asset_ids` are the inputs, in order; `params` are validated strictly per op (unknown keys are rejected):
13051
+ *
13052
+ * | Op | Assets | Params (defaults) |
13053
+ * | --- | --- | --- |
13054
+ * | `image.remove_background` | 1 image | `format`: `png` \| `webp` (`png`) |
13055
+ * | `image.upscale` | 1 image | `scale`: 2 \| 4 (4); output at most 64 MP |
13056
+ * | `image.inpaint` | image + PNG mask | `prompt` (required, ≤ 2000), `model`, `image_size`: `1K` \| `2K` \| `4K` |
13057
+ * | `image.erase` | image + PNG mask | `prompt` (optional), `model`, `image_size` |
13058
+ * | `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` |
13059
+ * | `audio.separate_stems` | 1 audio | `stems`: 2 \| 4 (4: vocals, drums, bass, other; 2: vocals, accompaniment) |
13060
+ * | `audio.denoise` | 1 audio | `strength`: 0–1 (1) |
13061
+ * | `audio.to_midi` | 1 audio | `onset_threshold`: 0.05–0.95 (0.5), `min_note_ms`: 10–1000 (58) |
13062
+ * | `audio.master` | 1 audio | `target_lufs`: -14 \| -16 \| -23 (-14), `true_peak_db`: -3…-0.1 (-1), `format`: `wav` \| `mp3` (`wav`) |
13063
+ * | `audio.analyze` | 1 audio | none |
13064
+ * | `music.generate_ace` | 0–1 audio | `prompt` (required, ≤ 1000), `lyrics` (≤ 4000), `duration_seconds`: 10–240 (60), `bpm`: 40–220, `key`, `language`, `seed` |
13065
+ * | `music.repaint` | 1 audio | `prompt`, `lyrics`, `start_seconds`, `end_seconds` (after start), `seed` |
13066
+ * | `music.extend` | 1 audio | `prompt`, `lyrics`, `extend_seconds`: 5–120, `seed` |
13067
+ * | `music.cover` | 1 audio | `prompt`, `lyrics`, `strength`: 0–1 (0.8), `seed` |
13068
+ * | `sfx.generate` | none | `prompt` (required), `duration_seconds`: 1–30 (5), `seed` |
13069
+ * @example {
13070
+ * "asset_ids": [
13071
+ * "3f2b8c1e-0000-4000-8000-000000000001"
13072
+ * ],
13073
+ * "params": {
13074
+ * "stems": 4
13075
+ * }
13076
+ * }
13077
+ */
13078
+ readonly MediaOpRequest: {
13079
+ /**
13080
+ * @description Owned, ready Studio asset ids, distinct, in the order the op expects (mask second).
13081
+ * @default []
13082
+ */
13083
+ readonly asset_ids?: readonly string[];
13084
+ /**
13085
+ * @description Per-op parameters (table above).
13086
+ * @default {}
13087
+ */
13088
+ readonly params?: {
13089
+ readonly [key: string]: unknown;
13090
+ };
13091
+ };
13092
+ /** Media op result */
13093
+ readonly MediaOpResult: {
13094
+ /** @description `audio.analyze`: `{ duration_seconds, bpm, key, key_confidence, integrated_lufs, sample_peak_dbfs }`; otherwise `null`. */
13095
+ readonly analysis: {
13096
+ readonly [key: string]: unknown;
13097
+ } | null;
13098
+ /** @description Billed cost, USD micros. */
13099
+ readonly cost_micro_usd: number;
13100
+ /** @enum {string} */
13101
+ readonly object: 'media_op.result';
13102
+ readonly op: components$1['schemas']['MediaOpId'];
13103
+ /** @description Stored outputs, AI-marked, each with lineage to the first input (empty for `audio.analyze`). */
13104
+ readonly outputs: readonly components$1['schemas']['AssetDto'][];
13105
+ /** @enum {string} */
13106
+ readonly status: 'ready';
13107
+ };
12460
13108
  /**
12461
13109
  * Media response format
12462
13110
  * @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.
@@ -14684,6 +15332,41 @@ type components$1 = {
14684
15332
  */
14685
15333
  readonly surface: 'share' | 'review';
14686
15334
  };
15335
+ /**
15336
+ * Audio render
15337
+ * @description An audio creative render as returned by `GET /v1/studio/renders/{id}` (`target: audio`).
15338
+ */
15339
+ readonly StudioAudioRender: {
15340
+ readonly cost_micro_usd?: string;
15341
+ /** Format: uuid */
15342
+ readonly creative_id: string;
15343
+ /** @description One stored, AI-marked asset per output (1-hour signed `url`), only when `succeeded`. */
15344
+ readonly data?: readonly (components$1['schemas']['AssetDto'] & {
15345
+ /** @enum {string} */
15346
+ readonly format: 'wav' | 'mp3' | 'flac' | 'lrc';
15347
+ /** @enum {string} */
15348
+ readonly output: 'mix' | 'stem' | 'lrc';
15349
+ readonly track_id: string | null;
15350
+ })[];
15351
+ readonly duration_seconds?: number | null;
15352
+ readonly error: string | null;
15353
+ readonly formats: readonly ('wav' | 'mp3' | 'flac')[];
15354
+ /** Format: uuid */
15355
+ readonly id: string;
15356
+ readonly lrc: boolean;
15357
+ readonly model: string;
15358
+ /** @enum {string} */
15359
+ readonly object: 'studio.render';
15360
+ readonly progress?: number | null;
15361
+ /** @description Measured `lufs`, `true_peak_db`, `clipping`, `warnings` of the master. */
15362
+ readonly qa?: Record<string, never> | null;
15363
+ readonly stage?: string | null;
15364
+ readonly status: components$1['schemas']['StudioRenderStatus'];
15365
+ readonly stems: boolean;
15366
+ /** @enum {string} */
15367
+ readonly target: 'audio';
15368
+ readonly target_lufs: number;
15369
+ };
14687
15370
  /** Studio batch */
14688
15371
  readonly StudioBatch: {
14689
15372
  /** @description The CSV header and the column mapping. */
@@ -15070,6 +15753,119 @@ type components$1 = {
15070
15753
  /** @description Non-fatal problems, e.g. audio assets that were skipped because they are missing or not ready. */
15071
15754
  readonly warnings: readonly string[];
15072
15755
  };
15756
+ /** Written lyrics */
15757
+ readonly StudioLyrics: {
15758
+ /** @description Charge in micro-USD (string, bigint-safe): the token cost of the turns. */
15759
+ readonly cost_micro_usd: string;
15760
+ /** @enum {string} */
15761
+ readonly language: 'ro' | 'en';
15762
+ /** @enum {string} */
15763
+ readonly object: 'studio.lyrics';
15764
+ /** @description True when the second (repair) turn produced the returned lyrics. */
15765
+ readonly repaired: boolean;
15766
+ /** @description Syllable and rhyme check of the returned lyrics. */
15767
+ readonly report: {
15768
+ readonly lines: number;
15769
+ readonly off_lines: number;
15770
+ readonly off_ratio: number;
15771
+ readonly pairs: number;
15772
+ readonly repair_ratio: number;
15773
+ readonly rhymed: number;
15774
+ };
15775
+ /** @enum {string} */
15776
+ readonly rhyme_scheme: 'AABB' | 'ABAB' | 'free';
15777
+ readonly sections: readonly {
15778
+ readonly kind: components$1['schemas']['StudioLyricsSectionKind'];
15779
+ readonly lines: readonly components$1['schemas']['StudioLyricsLine'][];
15780
+ }[];
15781
+ readonly syllables_per_line: number | null;
15782
+ /** @description The whole song as text, one `[kind]` header per section (ready for `lyrics_text` of the align call). */
15783
+ readonly text: string;
15784
+ readonly title: string | null;
15785
+ };
15786
+ /** Lyrics alignment */
15787
+ readonly StudioLyricsAlignment: {
15788
+ readonly applied: boolean;
15789
+ /** @description True when the cached words of the clip were used (no transcription charge). */
15790
+ readonly cached: boolean;
15791
+ readonly clip_id: string;
15792
+ readonly cost_micro_usd: string;
15793
+ /** Format: uuid */
15794
+ readonly creative_id: string;
15795
+ readonly doc_hash?: string;
15796
+ /** @description Timed lines on the document timeline (the `setLyrics` payload). */
15797
+ readonly lines: readonly {
15798
+ readonly endMs: number;
15799
+ readonly sectionId?: string;
15800
+ readonly startMs: number;
15801
+ readonly text: string;
15802
+ }[];
15803
+ /** @description The lines as an LRC file. */
15804
+ readonly lrc: string;
15805
+ /** @description Share of lyric words matched to a transcribed word. */
15806
+ readonly match_ratio: number;
15807
+ /** @enum {string} */
15808
+ readonly object: 'studio.lyrics_alignment';
15809
+ /** @description The new version, when applied. */
15810
+ readonly seq?: number;
15811
+ };
15812
+ /** Lyrics alignment request */
15813
+ readonly StudioLyricsAlignRequest: {
15814
+ /**
15815
+ * @description false returns the timed lines and LRC without editing the creative.
15816
+ * @default true
15817
+ */
15818
+ readonly apply?: boolean;
15819
+ /** @description Version the setLyrics edit is based on (default the head). */
15820
+ readonly base_seq?: number;
15821
+ /** @description The audio clip of the creative to align to (its asset must be a ready speech, music, video or upload asset). */
15822
+ readonly clip_id: string;
15823
+ readonly creative_id: string;
15824
+ /**
15825
+ * @description Transcription language hint (default the document `meta.language`).
15826
+ * @enum {string}
15827
+ */
15828
+ readonly language?: 'ro' | 'en';
15829
+ /** @description The lyrics as text; `[verse]` / `[chorus]` header lines start sections. */
15830
+ readonly lyrics_text: string;
15831
+ /** @description Ignore the cached words of the clip asset and transcribe again (billed). */
15832
+ readonly retranscribe?: boolean;
15833
+ };
15834
+ /** Checked lyric line */
15835
+ readonly StudioLyricsLine: {
15836
+ /** @description Rhyme letter of the line inside its section (A, B, ...). */
15837
+ readonly letter: string;
15838
+ /** @description True when the syllable count is outside the target ±1. */
15839
+ readonly off: boolean;
15840
+ /** @description The rhyme ending used for the scheme check. */
15841
+ readonly rhyme: string;
15842
+ /** @description Counted syllables (Romanian or English rules). */
15843
+ readonly syllables: number;
15844
+ readonly text: string;
15845
+ };
15846
+ /** Lyrics request */
15847
+ readonly StudioLyricsRequest: {
15848
+ /** @description What the song is about (3-4000 chars). Never logged. */
15849
+ readonly brief: string;
15850
+ readonly genre?: string;
15851
+ /** @enum {string} */
15852
+ readonly language: 'ro' | 'en';
15853
+ /** @default 4 */
15854
+ readonly lines_per_section?: number;
15855
+ readonly mood?: string;
15856
+ /**
15857
+ * @default free
15858
+ * @enum {string}
15859
+ */
15860
+ readonly rhyme_scheme?: 'AABB' | 'ABAB' | 'free';
15861
+ /** @description Section order (default verse, chorus, verse, chorus, bridge, chorus). */
15862
+ readonly structure?: readonly components$1['schemas']['StudioLyricsSectionKind'][];
15863
+ /** @description Target syllables per line (checked with a tolerance of 1). */
15864
+ readonly syllables_per_line?: number;
15865
+ readonly title?: string;
15866
+ };
15867
+ /** @enum {string} */
15868
+ readonly StudioLyricsSectionKind: 'intro' | 'verse' | 'pre_chorus' | 'chorus' | 'bridge' | 'outro' | 'instrumental' | 'custom';
15073
15869
  /** Narration defaults */
15074
15870
  readonly StudioNarrationDefaults: {
15075
15871
  /** @description Delivery instructions for expressive voices. */
@@ -16950,6 +17746,17 @@ type components$1 = {
16950
17746
  readonly default_tier: 't1' | 't2' | 't3' | 't4';
16951
17747
  /** @description Public key fingerprint to compare between devices. */
16952
17748
  readonly fingerprint: string;
17749
+ readonly guards?: components$1['schemas']['VaultGuards'];
17750
+ /**
17751
+ * @description Why the vault is locked.
17752
+ * @enum {string|null}
17753
+ */
17754
+ readonly lock_reason?: 'panic' | 'honeytoken' | null;
17755
+ /**
17756
+ * Format: date-time
17757
+ * @description When the vault was locked (panic or honeytoken); null when unlocked. While locked every agent use is denied with reason `vault_locked`.
17758
+ */
17759
+ readonly locked_at?: string | null;
16953
17760
  readonly revision: number;
16954
17761
  };
16955
17762
  /** @description Proven step-up for a decision. `device`: an enrolled device key signs `codai-vault/approve/v2|<approval_id>|<action_hash>|<decision>|<scope>|<device_id>`. `passkey`: a WebAuthn assertion whose challenge is base64url(SHA-256(the same message with device id `passkey`)). With `match_number` the message is v3: `codai-vault/approve/v3|<approval_id>|<action_hash>|<decision>|<scope>|<device_id>|<preview_digest>|<match_number>`, where `preview_digest` = base64url(SHA-256(the canonical text of `request.preview`)). */
@@ -17026,6 +17833,20 @@ type components$1 = {
17026
17833
  /** @enum {string} */
17027
17834
  readonly surface: 'phone' | 'wear' | 'desktop';
17028
17835
  };
17836
+ readonly VaultGuards: {
17837
+ /** @description Agent requests for one item within `burst_window_s` that count as a burst (`anomaly:burst`); 0 = off. */
17838
+ readonly burst_max: number;
17839
+ /** @description Burst window in seconds. */
17840
+ readonly burst_window_s: number;
17841
+ /** @description End of the allowed hours (exclusive) in `tz`; a use outside [hour_start, hour_end) is `anomaly:hour`. */
17842
+ readonly hour_end: number | null;
17843
+ /** @description Start of the allowed hours (inclusive) in `tz`; null together with `hour_end` turns the hours check off. */
17844
+ readonly hour_start: number | null;
17845
+ /** @description Flag a use on a host with no allowed use or grant for that item in the last 30 days (`anomaly:new_host`). */
17846
+ readonly new_host: boolean;
17847
+ /** @description IANA time zone for the hours check, e.g. `Europe/Bucharest`. */
17848
+ readonly tz: string;
17849
+ };
17029
17850
  readonly VaultItemEnvelope: {
17030
17851
  /** @description Public catalogue entry for agents (title, sensitivity, hosts, env var). Never secret values. */
17031
17852
  readonly agent_meta?: {
@@ -17046,6 +17867,35 @@ type components$1 = {
17046
17867
  /** @description Per-item key wrapped under the vault key (`v1.<nonce>.<ciphertext>`). */
17047
17868
  readonly wrapped_key: string;
17048
17869
  };
17870
+ readonly VaultItemLimits: {
17871
+ /** Format: uuid */
17872
+ readonly item_id: string;
17873
+ /** @description Allowed uses per 24 hours; null = no cap. */
17874
+ readonly per_day: number | null;
17875
+ /** @description Allowed uses per minute; null = no cap. */
17876
+ readonly per_minute: number | null;
17877
+ /** @description Units per 24 hours (an `http` use costs 2, other modes 1); null = no cap. */
17878
+ readonly units_per_day: number | null;
17879
+ };
17880
+ readonly VaultLockResult: {
17881
+ /** @description Pending approvals denied by this lock. */
17882
+ readonly approvals_denied: number;
17883
+ /** @description Live grants revoked by this lock. */
17884
+ readonly grants_revoked: number;
17885
+ /** Format: date-time */
17886
+ readonly locked_at: string;
17887
+ };
17888
+ readonly VaultUnlockChallenge: {
17889
+ /** @description 32 random bytes, base64url. Single use. */
17890
+ readonly challenge: string;
17891
+ /**
17892
+ * Format: date-time
17893
+ * @description 5 minutes after issue.
17894
+ */
17895
+ readonly expires_at: string;
17896
+ /** @description `codai-vault/unlock/v1|<challenge>|<device_id or passkey>`: the UTF-8 message the proof covers. */
17897
+ readonly message_template: string;
17898
+ };
17049
17899
  readonly VaultUseDecision: {
17050
17900
  /** @description Hash of the exact request the approver signs. */
17051
17901
  readonly action_hash?: string;
@@ -17055,6 +17905,7 @@ type components$1 = {
17055
17905
  readonly cloud_usable?: boolean;
17056
17906
  /** @description Two digits to show the user with the approval request; they tap the same number on the approving device (number matching). Null when no approval is needed. */
17057
17907
  readonly match_number?: string | null;
17908
+ /** @description Why this tier. Guard reasons: `vault_locked` (the vault is locked, tier `deny`), `anomaly:new_host`, `anomaly:burst`, `anomaly:hour` (tier forced to t4; grants not approved at t4 are ignored). */
17058
17909
  readonly reasons: readonly string[];
17059
17910
  /** @enum {string} */
17060
17911
  readonly tier: 't0' | 't1' | 't2' | 't3' | 't4' | 'deny';
@@ -17176,6 +18027,8 @@ type components$1 = {
17176
18027
  readonly EnvironmentId: string;
17177
18028
  /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
17178
18029
  readonly IdempotencyKey: string;
18030
+ /** @description Dotted media-op id, e.g. `image.remove_background` or `audio.separate_stems`. */
18031
+ readonly MediaOpIdPath: components$1['schemas']['MediaOpId'];
17179
18032
  /** @description Project UUID. A malformed value is 400; an unknown or foreign project is 404. */
17180
18033
  readonly ProjectId: string;
17181
18034
  /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
@@ -28120,7 +28973,7 @@ interface operations$1 {
28120
28973
  };
28121
28974
  readonly requestBody?: {
28122
28975
  readonly content: {
28123
- readonly 'application/json': components$1['schemas']['CreativeRenderRequest'];
28976
+ readonly 'application/json': components$1['schemas']['CreativeRenderRequest'] | components$1['schemas']['CreativeAudioRenderRequest'];
28124
28977
  };
28125
28978
  };
28126
28979
  readonly responses: {
@@ -28139,10 +28992,10 @@ interface operations$1 {
28139
28992
  readonly [name: string]: unknown;
28140
28993
  };
28141
28994
  content: {
28142
- readonly 'application/json': components$1['schemas']['CreativeRenderAccepted'];
28995
+ readonly 'application/json': components$1['schemas']['CreativeRenderAccepted'] | components$1['schemas']['CreativeAudioRenderAccepted'];
28143
28996
  };
28144
28997
  };
28145
- /** @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`). */
28998
+ /** @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`). */
28146
28999
  readonly 400: {
28147
29000
  headers: {
28148
29001
  readonly [name: string]: unknown;
@@ -29233,6 +30086,281 @@ interface operations$1 {
29233
30086
  readonly 404: components$1['responses']['NotFound'];
29234
30087
  };
29235
30088
  };
30089
+ readonly writeStudioLyrics: {
30090
+ readonly parameters: {
30091
+ readonly query?: never;
30092
+ readonly header?: {
30093
+ /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
30094
+ readonly 'Idempotency-Key'?: components$1['parameters']['IdempotencyKey'];
30095
+ /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
30096
+ readonly 'x-request-id'?: components$1['parameters']['RequestId'];
30097
+ };
30098
+ readonly path?: never;
30099
+ readonly cookie?: never;
30100
+ };
30101
+ readonly requestBody: {
30102
+ readonly content: {
30103
+ readonly 'application/json': components$1['schemas']['StudioLyricsRequest'];
30104
+ };
30105
+ };
30106
+ readonly responses: {
30107
+ /** @description The lyrics with a per-line syllable and rhyme report. */
30108
+ readonly 200: {
30109
+ headers: {
30110
+ readonly [name: string]: unknown;
30111
+ };
30112
+ content: {
30113
+ readonly 'application/json': components$1['schemas']['StudioLyrics'];
30114
+ };
30115
+ };
30116
+ /** @description Invalid body (`invalid_request`). */
30117
+ readonly 400: {
30118
+ headers: {
30119
+ readonly [name: string]: unknown;
30120
+ };
30121
+ content: {
30122
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30123
+ };
30124
+ };
30125
+ readonly 401: components$1['responses']['Unauthorized'];
30126
+ readonly 402: components$1['responses']['InsufficientFunds'];
30127
+ readonly 403: components$1['responses']['Forbidden'];
30128
+ /** @description The brief could not be turned into lyrics (`no_lyrics`); only the turns that ran are billed. */
30129
+ readonly 422: {
30130
+ headers: {
30131
+ readonly [name: string]: unknown;
30132
+ };
30133
+ content: {
30134
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30135
+ };
30136
+ };
30137
+ readonly 429: components$1['responses']['RateLimited'];
30138
+ readonly 502: components$1['responses']['UpstreamError'];
30139
+ };
30140
+ };
30141
+ readonly alignStudioLyrics: {
30142
+ readonly parameters: {
30143
+ readonly query?: never;
30144
+ readonly header?: {
30145
+ /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
30146
+ readonly 'Idempotency-Key'?: components$1['parameters']['IdempotencyKey'];
30147
+ /** @description Client correlation id; echoed back as `x-codai-trace-id` and persisted on the usage row. */
30148
+ readonly 'x-request-id'?: components$1['parameters']['RequestId'];
30149
+ };
30150
+ readonly path?: never;
30151
+ readonly cookie?: never;
30152
+ };
30153
+ readonly requestBody: {
30154
+ readonly content: {
30155
+ readonly 'application/json': components$1['schemas']['StudioLyricsAlignRequest'];
30156
+ };
30157
+ };
30158
+ readonly responses: {
30159
+ /** @description The timed lines, the LRC and the new version when applied. */
30160
+ readonly 200: {
30161
+ headers: {
30162
+ readonly [name: string]: unknown;
30163
+ };
30164
+ content: {
30165
+ readonly 'application/json': components$1['schemas']['StudioLyricsAlignment'];
30166
+ };
30167
+ };
30168
+ /** @description Invalid body, lyrics without lines, or clip audio over 25 MB (`unsupported_media`). */
30169
+ readonly 400: {
30170
+ headers: {
30171
+ readonly [name: string]: unknown;
30172
+ };
30173
+ content: {
30174
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30175
+ };
30176
+ };
30177
+ readonly 401: components$1['responses']['Unauthorized'];
30178
+ readonly 402: components$1['responses']['InsufficientFunds'];
30179
+ /** @description EU data-residency account (`residency_unavailable`). */
30180
+ readonly 403: {
30181
+ headers: {
30182
+ readonly [name: string]: unknown;
30183
+ };
30184
+ content: {
30185
+ readonly 'application/json': components$1['schemas']['Error'];
30186
+ };
30187
+ };
30188
+ readonly 404: components$1['responses']['NotFound'];
30189
+ /** @description The creative moved past `base_seq` and the edit could not be rebased (`stale`). */
30190
+ readonly 409: {
30191
+ headers: {
30192
+ readonly [name: string]: unknown;
30193
+ };
30194
+ content: {
30195
+ readonly 'application/json': components$1['schemas']['CreativeError'];
30196
+ };
30197
+ };
30198
+ /** @description Transcription is not configured or not available right now (`transcription_unavailable`). */
30199
+ readonly 503: {
30200
+ headers: {
30201
+ readonly [name: string]: unknown;
30202
+ };
30203
+ content: {
30204
+ readonly 'application/json': components$1['schemas']['Error'];
30205
+ };
30206
+ };
30207
+ };
30208
+ };
30209
+ readonly listStudioMediaOps: {
30210
+ readonly parameters: {
30211
+ readonly query?: never;
30212
+ readonly header?: never;
30213
+ readonly path?: never;
30214
+ readonly cookie?: never;
30215
+ };
30216
+ readonly requestBody?: never;
30217
+ readonly responses: {
30218
+ /** @description The op catalogue. */
30219
+ readonly 200: {
30220
+ headers: {
30221
+ readonly [name: string]: unknown;
30222
+ };
30223
+ content: {
30224
+ readonly 'application/json': components$1['schemas']['MediaOpList'];
30225
+ };
30226
+ };
30227
+ readonly 401: components$1['responses']['Unauthorized'];
30228
+ };
30229
+ };
30230
+ readonly runStudioMediaOp: {
30231
+ readonly parameters: {
30232
+ readonly query?: never;
30233
+ readonly header?: {
30234
+ /** @description Replays the stored response of an earlier request with the same key for 24 h instead of running it again. */
30235
+ readonly 'Idempotency-Key'?: components$1['parameters']['IdempotencyKey'];
30236
+ };
30237
+ readonly path: {
30238
+ /** @description Dotted media-op id, e.g. `image.remove_background` or `audio.separate_stems`. */
30239
+ readonly op: components$1['parameters']['MediaOpIdPath'];
30240
+ };
30241
+ readonly cookie?: never;
30242
+ };
30243
+ readonly requestBody: {
30244
+ readonly content: {
30245
+ readonly 'application/json': components$1['schemas']['MediaOpRequest'];
30246
+ };
30247
+ };
30248
+ readonly responses: {
30249
+ /** @description Sync op done: the stored, AI-marked outputs (or `analysis` for `audio.analyze`). */
30250
+ readonly 200: {
30251
+ headers: {
30252
+ readonly [name: string]: unknown;
30253
+ };
30254
+ content: {
30255
+ readonly 'application/json': components$1['schemas']['MediaOpResult'];
30256
+ };
30257
+ };
30258
+ /** @description Async op dispatched: the job (`status: pending`). */
30259
+ readonly 202: {
30260
+ headers: {
30261
+ readonly [name: string]: unknown;
30262
+ };
30263
+ content: {
30264
+ readonly 'application/json': components$1['schemas']['MediaOpJob'];
30265
+ };
30266
+ };
30267
+ readonly 400: components$1['responses']['BadRequest'];
30268
+ readonly 401: components$1['responses']['Unauthorized'];
30269
+ readonly 402: components$1['responses']['InsufficientFunds'];
30270
+ /** @description Unknown op id, or an asset that does not exist, is not ready or belongs to another account. */
30271
+ readonly 404: {
30272
+ headers: {
30273
+ readonly [name: string]: unknown;
30274
+ };
30275
+ content: {
30276
+ readonly 'application/json': components$1['schemas']['Error'];
30277
+ };
30278
+ };
30279
+ readonly 429: components$1['responses']['RateLimited'];
30280
+ readonly 502: components$1['responses']['UpstreamError'];
30281
+ /** @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. */
30282
+ readonly 503: {
30283
+ headers: {
30284
+ readonly [name: string]: unknown;
30285
+ };
30286
+ content: {
30287
+ readonly 'application/json': components$1['schemas']['Error'];
30288
+ };
30289
+ };
30290
+ };
30291
+ };
30292
+ readonly quoteStudioMediaOp: {
30293
+ readonly parameters: {
30294
+ readonly query?: never;
30295
+ readonly header?: never;
30296
+ readonly path: {
30297
+ /** @description Dotted media-op id, e.g. `image.remove_background` or `audio.separate_stems`. */
30298
+ readonly op: components$1['parameters']['MediaOpIdPath'];
30299
+ };
30300
+ readonly cookie?: never;
30301
+ };
30302
+ readonly requestBody: {
30303
+ readonly content: {
30304
+ readonly 'application/json': components$1['schemas']['MediaOpRequest'];
30305
+ };
30306
+ };
30307
+ readonly responses: {
30308
+ /** @description The quote. */
30309
+ readonly 200: {
30310
+ headers: {
30311
+ readonly [name: string]: unknown;
30312
+ };
30313
+ content: {
30314
+ readonly 'application/json': components$1['schemas']['MediaOpQuote'];
30315
+ };
30316
+ };
30317
+ readonly 400: components$1['responses']['BadRequest'];
30318
+ readonly 401: components$1['responses']['Unauthorized'];
30319
+ /** @description Unknown op id, or an asset that does not exist, is not ready or belongs to another account. */
30320
+ readonly 404: {
30321
+ headers: {
30322
+ readonly [name: string]: unknown;
30323
+ };
30324
+ content: {
30325
+ readonly 'application/json': components$1['schemas']['Error'];
30326
+ };
30327
+ };
30328
+ /** @description The op lane is not configured on this gateway (code `media_ops_unavailable`) or asset storage is off (`assets_unavailable`). */
30329
+ readonly 503: {
30330
+ headers: {
30331
+ readonly [name: string]: unknown;
30332
+ };
30333
+ content: {
30334
+ readonly 'application/json': components$1['schemas']['Error'];
30335
+ };
30336
+ };
30337
+ };
30338
+ };
30339
+ readonly getStudioMediaOpJob: {
30340
+ readonly parameters: {
30341
+ readonly query?: never;
30342
+ readonly header?: never;
30343
+ readonly path: {
30344
+ /** @description Job UUID (the `id` of the 202 answer). */
30345
+ readonly id: string;
30346
+ };
30347
+ readonly cookie?: never;
30348
+ };
30349
+ readonly requestBody?: never;
30350
+ readonly responses: {
30351
+ /** @description The job. */
30352
+ readonly 200: {
30353
+ headers: {
30354
+ readonly [name: string]: unknown;
30355
+ };
30356
+ content: {
30357
+ readonly 'application/json': components$1['schemas']['MediaOpJob'];
30358
+ };
30359
+ };
30360
+ readonly 401: components$1['responses']['Unauthorized'];
30361
+ readonly 404: components$1['responses']['NotFound'];
30362
+ };
30363
+ };
29236
30364
  readonly retrievePreview: {
29237
30365
  readonly parameters: {
29238
30366
  readonly query?: never;
@@ -29475,7 +30603,7 @@ interface operations$1 {
29475
30603
  readonly [name: string]: unknown;
29476
30604
  };
29477
30605
  content: {
29478
- readonly 'application/json': components$1['schemas']['StudioRender'];
30606
+ readonly 'application/json': components$1['schemas']['StudioRender'] | components$1['schemas']['StudioAudioRender'];
29479
30607
  };
29480
30608
  };
29481
30609
  readonly 401: components$1['responses']['Unauthorized'];
@@ -32265,6 +33393,36 @@ interface operations$1 {
32265
33393
  readonly 404: components$1['responses']['NotFound'];
32266
33394
  };
32267
33395
  };
33396
+ readonly revokeVaultTaskGrants: {
33397
+ readonly parameters: {
33398
+ readonly query?: never;
33399
+ readonly header?: never;
33400
+ readonly path?: never;
33401
+ readonly cookie?: never;
33402
+ };
33403
+ readonly requestBody: {
33404
+ readonly content: {
33405
+ readonly 'application/json': {
33406
+ readonly task: string;
33407
+ };
33408
+ };
33409
+ };
33410
+ readonly responses: {
33411
+ /** @description OK. */
33412
+ readonly 200: {
33413
+ headers: {
33414
+ readonly [name: string]: unknown;
33415
+ };
33416
+ content: {
33417
+ readonly 'application/json': {
33418
+ readonly revoked: number;
33419
+ };
33420
+ };
33421
+ };
33422
+ readonly 400: components$1['responses']['BadRequest'];
33423
+ readonly 401: components$1['responses']['Unauthorized'];
33424
+ };
33425
+ };
32268
33426
  readonly vaultHttp: {
32269
33427
  readonly parameters: {
32270
33428
  readonly query?: never;
@@ -32317,7 +33475,312 @@ interface operations$1 {
32317
33475
  };
32318
33476
  readonly 400: components$1['responses']['BadRequest'];
32319
33477
  readonly 401: components$1['responses']['Unauthorized'];
32320
- /** @description Denied by policy. */
33478
+ /** @description Denied by policy (`vault_denied`; reasons include `vault_locked` while the vault is locked). */
33479
+ readonly 403: {
33480
+ headers: {
33481
+ readonly [name: string]: unknown;
33482
+ };
33483
+ content: {
33484
+ readonly 'application/json': {
33485
+ readonly [key: string]: unknown;
33486
+ };
33487
+ };
33488
+ };
33489
+ readonly 404: components$1['responses']['NotFound'];
33490
+ /** @description `vault_rate_limited`: a per-handle limit is reached (`PUT /v1/vault/items/{id}/limits`). Read `Retry-After` (60 s for the per-minute cap, 3600 s for the daily caps). */
33491
+ readonly 429: {
33492
+ headers: {
33493
+ /** @description Seconds to wait before retrying. */
33494
+ readonly 'Retry-After'?: number;
33495
+ readonly [name: string]: unknown;
33496
+ };
33497
+ content: {
33498
+ readonly 'application/json': components$1['schemas']['Error'];
33499
+ };
33500
+ };
33501
+ };
33502
+ };
33503
+ readonly listVaultItems: {
33504
+ readonly parameters: {
33505
+ readonly query?: {
33506
+ /** @description Only changes after this ISO time. */
33507
+ readonly since?: string;
33508
+ };
33509
+ readonly header?: never;
33510
+ readonly path?: never;
33511
+ readonly cookie?: never;
33512
+ };
33513
+ readonly requestBody?: never;
33514
+ readonly responses: {
33515
+ /** @description OK. */
33516
+ readonly 200: {
33517
+ headers: {
33518
+ readonly [name: string]: unknown;
33519
+ };
33520
+ content: {
33521
+ readonly 'application/json': {
33522
+ readonly [key: string]: unknown;
33523
+ };
33524
+ };
33525
+ };
33526
+ readonly 400: components$1['responses']['BadRequest'];
33527
+ readonly 401: components$1['responses']['Unauthorized'];
33528
+ };
33529
+ };
33530
+ readonly putVaultItem: {
33531
+ readonly parameters: {
33532
+ readonly query?: never;
33533
+ readonly header?: never;
33534
+ readonly path: {
33535
+ /** @description Resource id (uuid). */
33536
+ readonly id: string;
33537
+ };
33538
+ readonly cookie?: never;
33539
+ };
33540
+ readonly requestBody: {
33541
+ readonly content: {
33542
+ readonly 'application/json': components$1['schemas']['VaultItemEnvelope'];
33543
+ };
33544
+ };
33545
+ readonly responses: {
33546
+ /** @description Updated. */
33547
+ readonly 200: {
33548
+ headers: {
33549
+ readonly [name: string]: unknown;
33550
+ };
33551
+ content: {
33552
+ readonly 'application/json': {
33553
+ readonly [key: string]: unknown;
33554
+ };
33555
+ };
33556
+ };
33557
+ /** @description Created. */
33558
+ readonly 201: {
33559
+ headers: {
33560
+ readonly [name: string]: unknown;
33561
+ };
33562
+ content: {
33563
+ readonly 'application/json': {
33564
+ readonly [key: string]: unknown;
33565
+ };
33566
+ };
33567
+ };
33568
+ readonly 400: components$1['responses']['BadRequest'];
33569
+ readonly 401: components$1['responses']['Unauthorized'];
33570
+ readonly 404: components$1['responses']['NotFound'];
33571
+ /** @description Revision conflict. */
33572
+ readonly 409: {
33573
+ headers: {
33574
+ readonly [name: string]: unknown;
33575
+ };
33576
+ content: {
33577
+ readonly 'application/json': {
33578
+ readonly [key: string]: unknown;
33579
+ };
33580
+ };
33581
+ };
33582
+ };
33583
+ };
33584
+ readonly deleteVaultItem: {
33585
+ readonly parameters: {
33586
+ readonly query?: never;
33587
+ readonly header?: never;
33588
+ readonly path: {
33589
+ /** @description Resource id (uuid). */
33590
+ readonly id: string;
33591
+ };
33592
+ readonly cookie?: never;
33593
+ };
33594
+ readonly requestBody?: never;
33595
+ readonly responses: {
33596
+ /** @description Deleted. */
33597
+ readonly 200: {
33598
+ headers: {
33599
+ readonly [name: string]: unknown;
33600
+ };
33601
+ content: {
33602
+ readonly 'application/json': {
33603
+ readonly [key: string]: unknown;
33604
+ };
33605
+ };
33606
+ };
33607
+ readonly 400: components$1['responses']['BadRequest'];
33608
+ readonly 401: components$1['responses']['Unauthorized'];
33609
+ readonly 404: components$1['responses']['NotFound'];
33610
+ };
33611
+ };
33612
+ readonly setVaultItemCloud: {
33613
+ readonly parameters: {
33614
+ readonly query?: never;
33615
+ readonly header?: never;
33616
+ readonly path: {
33617
+ /** @description Resource id (uuid). */
33618
+ readonly id: string;
33619
+ };
33620
+ readonly cookie?: never;
33621
+ };
33622
+ readonly requestBody: {
33623
+ readonly content: {
33624
+ readonly 'application/json': {
33625
+ readonly item: {
33626
+ readonly [key: string]: unknown;
33627
+ } | null;
33628
+ };
33629
+ };
33630
+ };
33631
+ readonly responses: {
33632
+ /** @description OK. */
33633
+ readonly 200: {
33634
+ headers: {
33635
+ readonly [name: string]: unknown;
33636
+ };
33637
+ content: {
33638
+ readonly 'application/json': {
33639
+ readonly [key: string]: unknown;
33640
+ };
33641
+ };
33642
+ };
33643
+ readonly 400: components$1['responses']['BadRequest'];
33644
+ readonly 401: components$1['responses']['Unauthorized'];
33645
+ readonly 404: components$1['responses']['NotFound'];
33646
+ };
33647
+ };
33648
+ readonly setVaultItemLimits: {
33649
+ readonly parameters: {
33650
+ readonly query?: never;
33651
+ readonly header?: never;
33652
+ readonly path: {
33653
+ /** @description Resource id (uuid). */
33654
+ readonly id: string;
33655
+ };
33656
+ readonly cookie?: never;
33657
+ };
33658
+ readonly requestBody: {
33659
+ readonly content: {
33660
+ readonly 'application/json': {
33661
+ readonly per_day: number | null;
33662
+ readonly per_minute: number | null;
33663
+ readonly units_per_day: number | null;
33664
+ };
33665
+ };
33666
+ };
33667
+ readonly responses: {
33668
+ /** @description OK; `limits` is null when removed. */
33669
+ readonly 200: {
33670
+ headers: {
33671
+ readonly [name: string]: unknown;
33672
+ };
33673
+ content: {
33674
+ readonly 'application/json': {
33675
+ readonly limits: components$1['schemas']['VaultItemLimits'];
33676
+ };
33677
+ };
33678
+ };
33679
+ readonly 400: components$1['responses']['BadRequest'];
33680
+ readonly 401: components$1['responses']['Unauthorized'];
33681
+ readonly 404: components$1['responses']['NotFound'];
33682
+ };
33683
+ };
33684
+ readonly listVaultLimits: {
33685
+ readonly parameters: {
33686
+ readonly query?: never;
33687
+ readonly header?: never;
33688
+ readonly path?: never;
33689
+ readonly cookie?: never;
33690
+ };
33691
+ readonly requestBody?: never;
33692
+ readonly responses: {
33693
+ /** @description OK. */
33694
+ readonly 200: {
33695
+ headers: {
33696
+ readonly [name: string]: unknown;
33697
+ };
33698
+ content: {
33699
+ readonly 'application/json': {
33700
+ readonly limits: readonly components$1['schemas']['VaultItemLimits'][];
33701
+ };
33702
+ };
33703
+ };
33704
+ readonly 400: components$1['responses']['BadRequest'];
33705
+ readonly 401: components$1['responses']['Unauthorized'];
33706
+ };
33707
+ };
33708
+ readonly lockVault: {
33709
+ readonly parameters: {
33710
+ readonly query?: never;
33711
+ readonly header?: never;
33712
+ readonly path?: never;
33713
+ readonly cookie?: never;
33714
+ };
33715
+ readonly requestBody?: {
33716
+ readonly content: {
33717
+ readonly 'application/json': {
33718
+ /** @enum {string} */
33719
+ readonly via?: 'hub' | 'desktop' | 'phone' | 'wear' | 'extension';
33720
+ };
33721
+ };
33722
+ };
33723
+ readonly responses: {
33724
+ /** @description Locked. */
33725
+ readonly 200: {
33726
+ headers: {
33727
+ readonly [name: string]: unknown;
33728
+ };
33729
+ content: {
33730
+ readonly 'application/json': components$1['schemas']['VaultLockResult'];
33731
+ };
33732
+ };
33733
+ readonly 400: components$1['responses']['BadRequest'];
33734
+ readonly 401: components$1['responses']['Unauthorized'];
33735
+ readonly 404: components$1['responses']['NotFound'];
33736
+ };
33737
+ };
33738
+ readonly vaultResolve: {
33739
+ readonly parameters: {
33740
+ readonly query?: never;
33741
+ readonly header?: never;
33742
+ readonly path?: never;
33743
+ readonly cookie?: never;
33744
+ };
33745
+ readonly requestBody: {
33746
+ readonly content: {
33747
+ readonly 'application/json': {
33748
+ readonly action: string;
33749
+ readonly chain?: readonly string[];
33750
+ readonly handles: readonly string[];
33751
+ /** @enum {string} */
33752
+ readonly provenance?: 'user' | 'agent' | 'untrusted';
33753
+ readonly purpose?: string;
33754
+ readonly task?: string | null;
33755
+ };
33756
+ };
33757
+ };
33758
+ readonly responses: {
33759
+ /** @description Decrypted items keyed by handle. */
33760
+ readonly 200: {
33761
+ headers: {
33762
+ readonly [name: string]: unknown;
33763
+ };
33764
+ content: {
33765
+ readonly 'application/json': {
33766
+ readonly [key: string]: unknown;
33767
+ };
33768
+ };
33769
+ };
33770
+ /** @description Approval required. */
33771
+ readonly 202: {
33772
+ headers: {
33773
+ readonly [name: string]: unknown;
33774
+ };
33775
+ content: {
33776
+ readonly 'application/json': {
33777
+ readonly [key: string]: unknown;
33778
+ };
33779
+ };
33780
+ };
33781
+ readonly 400: components$1['responses']['BadRequest'];
33782
+ readonly 401: components$1['responses']['Unauthorized'];
33783
+ /** @description Not a broker, or denied by policy. */
32321
33784
  readonly 403: {
32322
33785
  headers: {
32323
33786
  readonly [name: string]: unknown;
@@ -32329,14 +33792,33 @@ interface operations$1 {
32329
33792
  };
32330
33793
  };
32331
33794
  readonly 404: components$1['responses']['NotFound'];
33795
+ /** @description Not cloud-usable: unlock locally. */
33796
+ readonly 409: {
33797
+ headers: {
33798
+ readonly [name: string]: unknown;
33799
+ };
33800
+ content: {
33801
+ readonly 'application/json': {
33802
+ readonly [key: string]: unknown;
33803
+ };
33804
+ };
33805
+ };
33806
+ /** @description `vault_rate_limited`: a per-handle limit is reached (`PUT /v1/vault/items/{id}/limits`). Read `Retry-After` (60 s for the per-minute cap, 3600 s for the daily caps). */
33807
+ readonly 429: {
33808
+ headers: {
33809
+ /** @description Seconds to wait before retrying. */
33810
+ readonly 'Retry-After'?: number;
33811
+ readonly [name: string]: unknown;
33812
+ };
33813
+ content: {
33814
+ readonly 'application/json': components$1['schemas']['Error'];
33815
+ };
33816
+ };
32332
33817
  };
32333
33818
  };
32334
- readonly listVaultItems: {
33819
+ readonly listVaultRules: {
32335
33820
  readonly parameters: {
32336
- readonly query?: {
32337
- /** @description Only changes after this ISO time. */
32338
- readonly since?: string;
32339
- };
33821
+ readonly query?: never;
32340
33822
  readonly header?: never;
32341
33823
  readonly path?: never;
32342
33824
  readonly cookie?: never;
@@ -32358,33 +33840,27 @@ interface operations$1 {
32358
33840
  readonly 401: components$1['responses']['Unauthorized'];
32359
33841
  };
32360
33842
  };
32361
- readonly putVaultItem: {
33843
+ readonly createVaultRule: {
32362
33844
  readonly parameters: {
32363
33845
  readonly query?: never;
32364
33846
  readonly header?: never;
32365
- readonly path: {
32366
- /** @description Resource id (uuid). */
32367
- readonly id: string;
32368
- };
33847
+ readonly path?: never;
32369
33848
  readonly cookie?: never;
32370
33849
  };
32371
33850
  readonly requestBody: {
32372
33851
  readonly content: {
32373
- readonly 'application/json': components$1['schemas']['VaultItemEnvelope'];
33852
+ readonly 'application/json': {
33853
+ readonly agent?: string | null;
33854
+ /** Format: uuid */
33855
+ readonly item_id?: string | null;
33856
+ /** @enum {string|null} */
33857
+ readonly mode?: 'env' | 'http' | 'autofill' | 'ssh_sign' | 'reveal' | null;
33858
+ /** @enum {string} */
33859
+ readonly tier: 't0' | 't1' | 't2' | 't3' | 't4' | 'deny';
33860
+ };
32374
33861
  };
32375
33862
  };
32376
33863
  readonly responses: {
32377
- /** @description Updated. */
32378
- readonly 200: {
32379
- headers: {
32380
- readonly [name: string]: unknown;
32381
- };
32382
- content: {
32383
- readonly 'application/json': {
32384
- readonly [key: string]: unknown;
32385
- };
32386
- };
32387
- };
32388
33864
  /** @description Created. */
32389
33865
  readonly 201: {
32390
33866
  headers: {
@@ -32399,20 +33875,9 @@ interface operations$1 {
32399
33875
  readonly 400: components$1['responses']['BadRequest'];
32400
33876
  readonly 401: components$1['responses']['Unauthorized'];
32401
33877
  readonly 404: components$1['responses']['NotFound'];
32402
- /** @description Revision conflict. */
32403
- readonly 409: {
32404
- headers: {
32405
- readonly [name: string]: unknown;
32406
- };
32407
- content: {
32408
- readonly 'application/json': {
32409
- readonly [key: string]: unknown;
32410
- };
32411
- };
32412
- };
32413
33878
  };
32414
33879
  };
32415
- readonly deleteVaultItem: {
33880
+ readonly deleteVaultRule: {
32416
33881
  readonly parameters: {
32417
33882
  readonly query?: never;
32418
33883
  readonly header?: never;
@@ -32440,34 +33905,47 @@ interface operations$1 {
32440
33905
  readonly 404: components$1['responses']['NotFound'];
32441
33906
  };
32442
33907
  };
32443
- readonly setVaultItemCloud: {
33908
+ readonly patchVaultSettings: {
32444
33909
  readonly parameters: {
32445
33910
  readonly query?: never;
32446
33911
  readonly header?: never;
32447
- readonly path: {
32448
- /** @description Resource id (uuid). */
32449
- readonly id: string;
32450
- };
33912
+ readonly path?: never;
32451
33913
  readonly cookie?: never;
32452
33914
  };
32453
33915
  readonly requestBody: {
32454
33916
  readonly content: {
32455
33917
  readonly 'application/json': {
32456
- readonly item: {
32457
- readonly [key: string]: unknown;
32458
- } | null;
33918
+ /** @enum {string} */
33919
+ readonly default_tier?: 't1' | 't2' | 't3' | 't4';
33920
+ /** @description Any subset of `VaultGuards`; `hour_start` and `hour_end` are both null (off) or both set. */
33921
+ readonly guards?: {
33922
+ /** @description Agent requests for one item within `burst_window_s` that count as a burst (`anomaly:burst`); 0 = off. */
33923
+ readonly burst_max?: number;
33924
+ /** @description Burst window in seconds. */
33925
+ readonly burst_window_s?: number;
33926
+ /** @description End of the allowed hours (exclusive) in `tz`; a use outside [hour_start, hour_end) is `anomaly:hour`. */
33927
+ readonly hour_end?: number | null;
33928
+ /** @description Start of the allowed hours (inclusive) in `tz`; null together with `hour_end` turns the hours check off. */
33929
+ readonly hour_start?: number | null;
33930
+ /** @description Flag a use on a host with no allowed use or grant for that item in the last 30 days (`anomaly:new_host`). */
33931
+ readonly new_host?: boolean;
33932
+ /** @description IANA time zone for the hours check, e.g. `Europe/Bucharest`. */
33933
+ readonly tz?: string;
33934
+ };
32459
33935
  };
32460
33936
  };
32461
33937
  };
32462
33938
  readonly responses: {
32463
- /** @description OK. */
33939
+ /** @description Effective settings. */
32464
33940
  readonly 200: {
32465
33941
  headers: {
32466
33942
  readonly [name: string]: unknown;
32467
33943
  };
32468
33944
  content: {
32469
33945
  readonly 'application/json': {
32470
- readonly [key: string]: unknown;
33946
+ /** @enum {string} */
33947
+ readonly default_tier: 't1' | 't2' | 't3' | 't4';
33948
+ readonly guards: components$1['schemas']['VaultGuards'];
32471
33949
  };
32472
33950
  };
32473
33951
  };
@@ -32476,7 +33954,7 @@ interface operations$1 {
32476
33954
  readonly 404: components$1['responses']['NotFound'];
32477
33955
  };
32478
33956
  };
32479
- readonly vaultResolve: {
33957
+ readonly unlockVault: {
32480
33958
  readonly parameters: {
32481
33959
  readonly query?: never;
32482
33960
  readonly header?: never;
@@ -32486,42 +33964,29 @@ interface operations$1 {
32486
33964
  readonly requestBody: {
32487
33965
  readonly content: {
32488
33966
  readonly 'application/json': {
32489
- readonly action: string;
32490
- readonly chain?: readonly string[];
32491
- readonly handles: readonly string[];
33967
+ /** @description Challenge from `POST /v1/vault/unlock/challenge`. */
33968
+ readonly challenge: string;
33969
+ readonly proof: components$1['schemas']['VaultApprovalProof'];
32492
33970
  /** @enum {string} */
32493
- readonly provenance?: 'user' | 'agent' | 'untrusted';
32494
- readonly purpose?: string;
32495
- readonly task?: string | null;
33971
+ readonly via?: 'hub' | 'desktop' | 'phone' | 'wear' | 'extension';
32496
33972
  };
32497
33973
  };
32498
33974
  };
32499
33975
  readonly responses: {
32500
- /** @description Decrypted items keyed by handle. */
33976
+ /** @description Unlocked. */
32501
33977
  readonly 200: {
32502
33978
  headers: {
32503
33979
  readonly [name: string]: unknown;
32504
33980
  };
32505
33981
  content: {
32506
33982
  readonly 'application/json': {
32507
- readonly [key: string]: unknown;
32508
- };
32509
- };
32510
- };
32511
- /** @description Approval required. */
32512
- readonly 202: {
32513
- headers: {
32514
- readonly [name: string]: unknown;
32515
- };
32516
- content: {
32517
- readonly 'application/json': {
32518
- readonly [key: string]: unknown;
33983
+ readonly unlocked: boolean;
32519
33984
  };
32520
33985
  };
32521
33986
  };
32522
33987
  readonly 400: components$1['responses']['BadRequest'];
32523
33988
  readonly 401: components$1['responses']['Unauthorized'];
32524
- /** @description Not a broker, or denied by policy. */
33989
+ /** @description `challenge_invalid`, `unknown_device`, `device_revoked`, `wear_t3_only`, `invalid_signature` or `passkey_invalid`. */
32525
33990
  readonly 403: {
32526
33991
  headers: {
32527
33992
  readonly [name: string]: unknown;
@@ -32533,20 +33998,9 @@ interface operations$1 {
32533
33998
  };
32534
33999
  };
32535
34000
  readonly 404: components$1['responses']['NotFound'];
32536
- /** @description Not cloud-usable: unlock locally. */
32537
- readonly 409: {
32538
- headers: {
32539
- readonly [name: string]: unknown;
32540
- };
32541
- content: {
32542
- readonly 'application/json': {
32543
- readonly [key: string]: unknown;
32544
- };
32545
- };
32546
- };
32547
34001
  };
32548
34002
  };
32549
- readonly listVaultRules: {
34003
+ readonly createVaultUnlockChallenge: {
32550
34004
  readonly parameters: {
32551
34005
  readonly query?: never;
32552
34006
  readonly header?: never;
@@ -32561,112 +34015,13 @@ interface operations$1 {
32561
34015
  readonly [name: string]: unknown;
32562
34016
  };
32563
34017
  content: {
32564
- readonly 'application/json': {
32565
- readonly [key: string]: unknown;
32566
- };
34018
+ readonly 'application/json': components$1['schemas']['VaultUnlockChallenge'];
32567
34019
  };
32568
34020
  };
32569
34021
  readonly 400: components$1['responses']['BadRequest'];
32570
34022
  readonly 401: components$1['responses']['Unauthorized'];
32571
34023
  };
32572
34024
  };
32573
- readonly createVaultRule: {
32574
- readonly parameters: {
32575
- readonly query?: never;
32576
- readonly header?: never;
32577
- readonly path?: never;
32578
- readonly cookie?: never;
32579
- };
32580
- readonly requestBody: {
32581
- readonly content: {
32582
- readonly 'application/json': {
32583
- readonly agent?: string | null;
32584
- /** Format: uuid */
32585
- readonly item_id?: string | null;
32586
- /** @enum {string|null} */
32587
- readonly mode?: 'env' | 'http' | 'autofill' | 'ssh_sign' | 'reveal' | null;
32588
- /** @enum {string} */
32589
- readonly tier: 't0' | 't1' | 't2' | 't3' | 't4' | 'deny';
32590
- };
32591
- };
32592
- };
32593
- readonly responses: {
32594
- /** @description Created. */
32595
- readonly 201: {
32596
- headers: {
32597
- readonly [name: string]: unknown;
32598
- };
32599
- content: {
32600
- readonly 'application/json': {
32601
- readonly [key: string]: unknown;
32602
- };
32603
- };
32604
- };
32605
- readonly 400: components$1['responses']['BadRequest'];
32606
- readonly 401: components$1['responses']['Unauthorized'];
32607
- readonly 404: components$1['responses']['NotFound'];
32608
- };
32609
- };
32610
- readonly deleteVaultRule: {
32611
- readonly parameters: {
32612
- readonly query?: never;
32613
- readonly header?: never;
32614
- readonly path: {
32615
- /** @description Resource id (uuid). */
32616
- readonly id: string;
32617
- };
32618
- readonly cookie?: never;
32619
- };
32620
- readonly requestBody?: never;
32621
- readonly responses: {
32622
- /** @description Deleted. */
32623
- readonly 200: {
32624
- headers: {
32625
- readonly [name: string]: unknown;
32626
- };
32627
- content: {
32628
- readonly 'application/json': {
32629
- readonly [key: string]: unknown;
32630
- };
32631
- };
32632
- };
32633
- readonly 400: components$1['responses']['BadRequest'];
32634
- readonly 401: components$1['responses']['Unauthorized'];
32635
- readonly 404: components$1['responses']['NotFound'];
32636
- };
32637
- };
32638
- readonly patchVaultSettings: {
32639
- readonly parameters: {
32640
- readonly query?: never;
32641
- readonly header?: never;
32642
- readonly path?: never;
32643
- readonly cookie?: never;
32644
- };
32645
- readonly requestBody: {
32646
- readonly content: {
32647
- readonly 'application/json': {
32648
- /** @enum {string} */
32649
- readonly default_tier: 't1' | 't2' | 't3' | 't4';
32650
- };
32651
- };
32652
- };
32653
- readonly responses: {
32654
- /** @description OK. */
32655
- readonly 200: {
32656
- headers: {
32657
- readonly [name: string]: unknown;
32658
- };
32659
- content: {
32660
- readonly 'application/json': {
32661
- readonly [key: string]: unknown;
32662
- };
32663
- };
32664
- };
32665
- readonly 400: components$1['responses']['BadRequest'];
32666
- readonly 401: components$1['responses']['Unauthorized'];
32667
- readonly 404: components$1['responses']['NotFound'];
32668
- };
32669
- };
32670
34025
  readonly vaultUse: {
32671
34026
  readonly parameters: {
32672
34027
  readonly query?: never;
@@ -32703,6 +34058,17 @@ interface operations$1 {
32703
34058
  readonly 400: components$1['responses']['BadRequest'];
32704
34059
  readonly 401: components$1['responses']['Unauthorized'];
32705
34060
  readonly 404: components$1['responses']['NotFound'];
34061
+ /** @description `vault_rate_limited`: a per-handle limit is reached (`PUT /v1/vault/items/{id}/limits`). Read `Retry-After` (60 s for the per-minute cap, 3600 s for the daily caps). */
34062
+ readonly 429: {
34063
+ headers: {
34064
+ /** @description Seconds to wait before retrying. */
34065
+ readonly 'Retry-After'?: number;
34066
+ readonly [name: string]: unknown;
34067
+ };
34068
+ content: {
34069
+ readonly 'application/json': components$1['schemas']['Error'];
34070
+ };
34071
+ };
32706
34072
  };
32707
34073
  };
32708
34074
  readonly listVaults: {
@@ -33203,7 +34569,7 @@ export type Receipt = Reply<'getReceipt'>;
33203
34569
  export type FeedbackRequest = Mutable<Body<'submitFeedback'>>;
33204
34570
  export type FeedbackResponse = Reply<'submitFeedback'>;
33205
34571
  export type PhoneModel = Schema<'AccountPhoneModel'>;
33206
- type CallOpts$37 = {
34572
+ type CallOpts$38 = {
33207
34573
  ext?: CodaiRequestExtensions;
33208
34574
  signal?: AbortSignal;
33209
34575
  };
@@ -33211,9 +34577,9 @@ export declare class Account {
33211
34577
  private readonly http;
33212
34578
  constructor(http: HttpClient);
33213
34579
  /** `GET /v1/account` — the full account card. */
33214
- get(opts?: CallOpts$37): Promise<AccountView>;
34580
+ get(opts?: CallOpts$38): Promise<AccountView>;
33215
34581
  /** `PATCH /v1/account` — consents, username, referral (at least one field). */
33216
- update(body: AccountPatchRequest, opts?: CallOpts$37): Promise<AccountPatchResponse>;
34582
+ update(body: AccountPatchRequest, opts?: CallOpts$38): Promise<AccountPatchResponse>;
33217
34583
  }
33218
34584
  export declare class Receipts {
33219
34585
  private readonly http;
@@ -33225,7 +34591,7 @@ export declare class Receipts {
33225
34591
  get(query?: {
33226
34592
  sessionId?: string;
33227
34593
  since?: string | Date;
33228
- }, opts?: CallOpts$37): Promise<Receipt>;
34594
+ }, opts?: CallOpts$38): Promise<Receipt>;
33229
34595
  }
33230
34596
  export declare class Feedback {
33231
34597
  private readonly http;
@@ -33234,13 +34600,13 @@ export declare class Feedback {
33234
34600
  * `POST /v1/feedback` — rate one turn. Exactly one of `event_id`,
33235
34601
  * `session_id`, `client_request_id` must be present.
33236
34602
  */
33237
- submit(body: FeedbackRequest, opts?: CallOpts$37): Promise<FeedbackResponse>;
34603
+ submit(body: FeedbackRequest, opts?: CallOpts$38): Promise<FeedbackResponse>;
33238
34604
  }
33239
34605
  export declare class PhoneModels {
33240
34606
  private readonly http;
33241
34607
  constructor(http: HttpClient);
33242
34608
  /** `GET /v1/phone/models` — on-device model catalog with signed URLs. */
33243
- list(opts?: CallOpts$37): Promise<PhoneModel[]>;
34609
+ list(opts?: CallOpts$38): Promise<PhoneModel[]>;
33244
34610
  }
33245
34611
  //#endregion
33246
34612
  //#region src/resources/agents.d.ts
@@ -33252,7 +34618,7 @@ export type AgentRun = Reply<'getAgentRun'>;
33252
34618
  export type AgentRunStep = Schema<'AgentRunStep'>;
33253
34619
  export type AgentRunStats = Reply<'getAgentRunStats'>;
33254
34620
  export type AgentRunStatus = Schema<'AgentRunStatus'>;
33255
- type CallOpts$36 = {
34621
+ type CallOpts$37 = {
33256
34622
  ext?: CodaiRequestExtensions;
33257
34623
  signal?: AbortSignal;
33258
34624
  };
@@ -33289,28 +34655,28 @@ export declare class AgentRuns {
33289
34655
  private readonly http;
33290
34656
  constructor(http: HttpClient);
33291
34657
  /** `POST /v1/agents/runs` — returns 202 with the run id. */
33292
- create(body: AgentRunCreateRequest, opts?: CallOpts$36): Promise<AgentRunAccepted>;
34658
+ create(body: AgentRunCreateRequest, opts?: CallOpts$37): Promise<AgentRunAccepted>;
33293
34659
  /** `GET /v1/agents/runs/{id}` */
33294
- get(id: string, opts?: CallOpts$36): Promise<AgentRun>;
34660
+ get(id: string, opts?: CallOpts$37): Promise<AgentRun>;
33295
34661
  /** `GET /v1/agents/runs/{id}/steps` — newest first. */
33296
- steps(id: string, opts?: CallOpts$36): Promise<AgentRunStep[]>;
34662
+ steps(id: string, opts?: CallOpts$37): Promise<AgentRunStep[]>;
33297
34663
  /** `GET /v1/agents/runs/stats?days=` */
33298
- stats(days?: number, opts?: CallOpts$36): Promise<AgentRunStats>;
34664
+ stats(days?: number, opts?: CallOpts$37): Promise<AgentRunStats>;
33299
34665
  /** `POST /v1/agents/runs/{id}/cancel` */
33300
- cancel(id: string, opts?: CallOpts$36): Promise<Reply<'cancelAgentRun'>>;
34666
+ cancel(id: string, opts?: CallOpts$37): Promise<Reply<'cancelAgentRun'>>;
33301
34667
  /**
33302
34668
  * `GET /v1/agents/runs/{id}/stream` — async iterator over `step` / `done` /
33303
34669
  * `timeout` events. The iterator ends after `done`; on `timeout` (30 min)
33304
34670
  * it also ends and you may reconnect (full replay from seq 0).
33305
34671
  */
33306
- stream(id: string, opts?: CallOpts$36): AsyncGenerator<AgentRunStreamEvent, void, undefined>;
34672
+ stream(id: string, opts?: CallOpts$37): AsyncGenerator<AgentRunStreamEvent, void, undefined>;
33307
34673
  }
33308
34674
  export declare class Agents {
33309
34675
  private readonly http;
33310
34676
  readonly runs: AgentRuns;
33311
34677
  constructor(http: HttpClient);
33312
34678
  /** `POST /v1/agents/run` — blocks until the agent loop finishes. */
33313
- run(body: AgentRunRequest, opts?: CallOpts$36): Promise<AgentRunResult>;
34679
+ run(body: AgentRunRequest, opts?: CallOpts$37): Promise<AgentRunResult>;
33314
34680
  }
33315
34681
  //#endregion
33316
34682
  //#region src/resources/audio.d.ts
@@ -33475,7 +34841,7 @@ export interface StudioQuoteQuery {
33475
34841
  model?: string;
33476
34842
  n?: number;
33477
34843
  }
33478
- type CallOpts$35 = {
34844
+ type CallOpts$36 = {
33479
34845
  ext?: CodaiRequestExtensions;
33480
34846
  signal?: AbortSignal;
33481
34847
  };
@@ -33499,16 +34865,16 @@ export declare class Billing {
33499
34865
  private readonly http;
33500
34866
  constructor(http: HttpClient);
33501
34867
  /** `GET /v1/billing` — plan, wallet, auto top-up, cards and pay links (read-only). */
33502
- get(opts?: CallOpts$35): Promise<BillingOverview>;
34868
+ get(opts?: CallOpts$36): Promise<BillingOverview>;
33503
34869
  /** `GET /v1/billing/invoices` — fiscal invoices and credit notes, newest first. */
33504
34870
  invoices(query?: {
33505
34871
  limit?: number;
33506
- }, opts?: CallOpts$35): Promise<BillingInvoice[]>;
34872
+ }, opts?: CallOpts$36): Promise<BillingInvoice[]>;
33507
34873
  /**
33508
34874
  * `GET /v1/studio/quote` — what a Studio action costs (USD and wallet EUR micros) and your spendable balance,
33509
34875
  * before you run it. Paid Studio calls answer 402 `insufficient_funds` when `sufficient` is false. Free.
33510
34876
  */
33511
- studioQuote(query: StudioQuoteQuery, opts?: CallOpts$35): Promise<StudioQuote>;
34877
+ studioQuote(query: StudioQuoteQuery, opts?: CallOpts$36): Promise<StudioQuote>;
33512
34878
  /**
33513
34879
  * Poll `get()` every `intervalMs` and call `onLow` once each time the wallet
33514
34880
  * balance crosses below `thresholdEur`. Read-only: never creates a checkout.
@@ -33553,7 +34919,7 @@ export interface CardsRendered {
33553
34919
  width: number | null;
33554
34920
  height: number | null;
33555
34921
  }
33556
- type CallOpts$34 = {
34922
+ type CallOpts$35 = {
33557
34923
  ext?: CodaiRequestExtensions;
33558
34924
  signal?: AbortSignal;
33559
34925
  };
@@ -33562,59 +34928,59 @@ export declare class Cards {
33562
34928
  constructor(http: HttpClient);
33563
34929
  private get;
33564
34930
  /** `GET /v1/cards/weather` — `weather` block from MET Norway (cached 30–60 min per 0.01°, free). */
33565
- weather(params: CardsWeatherParams, opts?: CallOpts$34): Promise<CardsWeatherResponse>;
34931
+ weather(params: CardsWeatherParams, opts?: CallOpts$35): Promise<CardsWeatherResponse>;
33566
34932
  /**
33567
34933
  * `GET /v1/cards/places` — `places` block from Google Places: Text Search with `q` (biased to `lat`/`lng`/`radius`),
33568
34934
  * Nearby Search without it. Billed per call; `block` is null when nothing matched.
33569
34935
  */
33570
- places(params: CardsPlacesParams, opts?: CallOpts$34): Promise<CardsPlacesResponse>;
34936
+ places(params: CardsPlacesParams, opts?: CallOpts$35): Promise<CardsPlacesResponse>;
33571
34937
  /** `GET /v1/cards/geocode` — `map` block (≤ 5 markers) plus raw `results` (Google Geocoding, billed). */
33572
- geocode(params: CardsGeocodeParams, opts?: CallOpts$34): Promise<CardsGeocodeResponse>;
34938
+ geocode(params: CardsGeocodeParams, opts?: CallOpts$35): Promise<CardsGeocodeResponse>;
33573
34939
  /**
33574
34940
  * `GET /v1/cards/static-map` — PNG from Google Maps Static proxied through the gateway (no maps key on the client).
33575
34941
  * Needs `center` or `markers` (`lat,lng[,L]` joined by `|`); ≤ 640×400 points. Billed per call.
33576
34942
  */
33577
- staticMap(params: CardsStaticMapParams, opts?: CallOpts$34): Promise<CardsStaticMap>;
34943
+ staticMap(params: CardsStaticMapParams, opts?: CallOpts$35): Promise<CardsStaticMap>;
33578
34944
  /**
33579
34945
  * `GET /v1/cards/fx` — BNR (default) or ECB reference rates: a `metric` block with `from`+`to`, otherwise a `table`
33580
34946
  * block against `quote`, optionally limited to `symbols` (comma-separated). Free.
33581
34947
  */
33582
- fx(params?: CardsFxParams, opts?: CallOpts$34): Promise<CardsFxResponse>;
34948
+ fx(params?: CardsFxParams, opts?: CallOpts$35): Promise<CardsFxResponse>;
33583
34949
  /**
33584
34950
  * `GET /v1/cards/route` — travel time from Google Routes: `route` { mode, durationS, staticDurationS, distanceM,
33585
34951
  * polyline } and a `map` block. `origin`/`destination` as "lat,lng" or `from`/`to` as addresses; `mode` drive
33586
34952
  * (traffic-aware, default), walk, bicycle, transit, two_wheeler. Billed per call; both null when no route exists.
33587
34953
  */
33588
- route(params: CardsRouteParams, opts?: CallOpts$34): Promise<CardsRouteResponse>;
34954
+ route(params: CardsRouteParams, opts?: CallOpts$35): Promise<CardsRouteResponse>;
33589
34955
  /**
33590
34956
  * `GET /v1/cards/track` — parcel history as a `timeline` block plus `result` (carrier, configured, found,
33591
34957
  * delivered, events, trackingUrl). `carrier` (sameday | fan | cargus | dpd) is guessed from the AWB when omitted;
33592
34958
  * carriers without gateway credentials answer `configured: false` with only the tracking link. Free.
33593
34959
  */
33594
- track(params: CardsTrackParams, opts?: CallOpts$34): Promise<CardsTrackResponse>;
34960
+ track(params: CardsTrackParams, opts?: CallOpts$35): Promise<CardsTrackResponse>;
33595
34961
  /**
33596
34962
  * `GET /v1/cards/efactura` — your fiscal documents issued through Brivio with their ANAF e-Factura status
33597
34963
  * (`documents[]` + a `table` block, null when there are none). Free.
33598
34964
  */
33599
- efactura(params?: CardsEfacturaParams, opts?: CallOpts$34): Promise<CardsEfacturaResponse>;
34965
+ efactura(params?: CardsEfacturaParams, opts?: CallOpts$35): Promise<CardsEfacturaResponse>;
33600
34966
  /**
33601
34967
  * `POST /v1/cards/unfurl` — `links` block (variant `preview`) for a public https page; SSRF-guarded, cached 24 h.
33602
34968
  * Private targets throw 400 `unfurl_blocked`, non-https pages 422 `unfurl_not_https`.
33603
34969
  */
33604
- unfurl(url: string, opts?: CallOpts$34): Promise<CardsUnfurlResponse>;
34970
+ unfurl(url: string, opts?: CallOpts$35): Promise<CardsUnfurlResponse>;
33605
34971
  /**
33606
34972
  * `POST /v1/cards/product` — `products` block with one item from a public https product page's schema.org
33607
34973
  * `Product` JSON-LD (or OpenGraph product tags): name, image, price + currency (lowest offer), old price, rating
33608
34974
  * (0–5), reviews, seller, availability badge in `lang` (en default). Only what the page states; never sponsored.
33609
34975
  * SSRF-guarded like `unfurl`, cached 6 h. No product data throws 422 `product_not_found`.
33610
34976
  */
33611
- product(url: string, lang?: 'en' | 'ro', opts?: CallOpts$34): Promise<CardsProductResponse>;
34977
+ product(url: string, lang?: 'en' | 'ro', opts?: CallOpts$35): Promise<CardsProductResponse>;
33612
34978
  /**
33613
34979
  * `POST /v1/cards/render` — renders a `chart` or `qr` block to `format` (`png` default, or `svg`) at
33614
34980
  * `width` x `height` CSS px (64–1200, defaults 480 x 300; QR is square) times `scale` (1–3, PNG only).
33615
34981
  * Other block types (Mermaid `diagram`, `math`, …) throw 422 `render_unsupported`. Free; 2000 renders per day.
33616
34982
  */
33617
- render(body: CardsRenderBody, opts?: CallOpts$34): Promise<CardsRendered>;
34983
+ render(body: CardsRenderBody, opts?: CallOpts$35): Promise<CardsRendered>;
33618
34984
  }
33619
34985
  //#endregion
33620
34986
  //#region src/resources/chat.d.ts
@@ -33730,7 +35096,7 @@ export type Device = Schema<'DeviceListItem'>;
33730
35096
  export type DevicePatch = Mutable<Body<'updateDevice'>>;
33731
35097
  export type DevicePatched = Reply<'updateDevice'>;
33732
35098
  export type DispatchInbox = Reply<'getMyDispatchInbox'>;
33733
- type CallOpts$33 = {
35099
+ type CallOpts$34 = {
33734
35100
  ext?: CodaiRequestExtensions;
33735
35101
  signal?: AbortSignal;
33736
35102
  };
@@ -33738,23 +35104,23 @@ export declare class Devices {
33738
35104
  private readonly http;
33739
35105
  constructor(http: HttpClient);
33740
35106
  /** `GET /v1/devices` — most recently seen first. */
33741
- list(opts?: CallOpts$33): Promise<Device[]>;
35107
+ list(opts?: CallOpts$34): Promise<Device[]>;
33742
35108
  /** `PATCH /v1/devices/{id}` — push token and/or capabilities. */
33743
- update(id: string, body: DevicePatch, opts?: CallOpts$33): Promise<DevicePatched>;
35109
+ update(id: string, body: DevicePatch, opts?: CallOpts$34): Promise<DevicePatched>;
33744
35110
  /** `DELETE /v1/devices/{id}` */
33745
- delete(id: string, opts?: CallOpts$33): Promise<Reply<'deleteDevice'>>;
35111
+ delete(id: string, opts?: CallOpts$34): Promise<Reply<'deleteDevice'>>;
33746
35112
  /**
33747
35113
  * `POST /v1/keys/self/revoke` — the API key this client uses revokes ITSELF (sign out).
33748
35114
  * Every later call with it fails with 401.
33749
35115
  */
33750
- revokeSelfKey(opts?: CallOpts$33): Promise<Reply<'revokeSelfKey'>>;
35116
+ revokeSelfKey(opts?: CallOpts$34): Promise<Reply<'revokeSelfKey'>>;
33751
35117
  /**
33752
35118
  * `GET /v1/devices/me/dispatch?limit=` — pending controls dispatched at the
33753
35119
  * calling device (`x-codai-device` required) across all owned sessions.
33754
35120
  */
33755
35121
  dispatchInbox(query?: {
33756
35122
  limit?: number;
33757
- }, opts?: CallOpts$33): Promise<DispatchInbox>;
35123
+ }, opts?: CallOpts$34): Promise<DispatchInbox>;
33758
35124
  }
33759
35125
  //#endregion
33760
35126
  //#region src/resources/embeddings.d.ts
@@ -33817,7 +35183,7 @@ export type EnvironmentJobStartBody = Mutable<Body<'startEnvironmentJob'>>;
33817
35183
  export type EnvironmentJobStarted = Schema<'EnvironmentJobStarted'>;
33818
35184
  export type EnvironmentJob = Schema<'EnvironmentJob'>;
33819
35185
  export type GetEnvironmentJobQuery = Mutable<QueryOf<'getEnvironmentJob'>>;
33820
- type CallOpts$32 = {
35186
+ type CallOpts$33 = {
33821
35187
  ext?: CodaiRequestExtensions;
33822
35188
  signal?: AbortSignal;
33823
35189
  };
@@ -33825,70 +35191,70 @@ export declare class EnvironmentMembers {
33825
35191
  private readonly http;
33826
35192
  constructor(http: HttpClient);
33827
35193
  /** `GET /v1/environments/{id}/members` — any role. */
33828
- list(envId: string, opts?: CallOpts$32): Promise<EnvironmentMember[]>;
35194
+ list(envId: string, opts?: CallOpts$33): Promise<EnvironmentMember[]>;
33829
35195
  /** `POST /v1/environments/{id}/members` — exactly one of `user_id` / `email`. */
33830
- add(envId: string, body: EnvironmentAddMemberBody, opts?: CallOpts$32): Promise<EnvironmentMemberCreated>;
35196
+ add(envId: string, body: EnvironmentAddMemberBody, opts?: CallOpts$33): Promise<EnvironmentMemberCreated>;
33831
35197
  /** `PUT /v1/environments/{id}/members/me/ssh-key` — one `authorized_keys` line. */
33832
- setSshKey(envId: string, publicKey: string, opts?: CallOpts$32): Promise<Reply<'setMyEnvironmentSshKey'>>;
35198
+ setSshKey(envId: string, publicKey: string, opts?: CallOpts$33): Promise<Reply<'setMyEnvironmentSshKey'>>;
33833
35199
  /** `PATCH /v1/environments/{id}/members/{userId}` — 409 `last_owner` on demoting the last owner. */
33834
- setRole(envId: string, userId: string, role: EnvironmentRole, opts?: CallOpts$32): Promise<Reply<'setEnvironmentMemberRole'>['member']>;
35200
+ setRole(envId: string, userId: string, role: EnvironmentRole, opts?: CallOpts$33): Promise<Reply<'setEnvironmentMemberRole'>['member']>;
33835
35201
  /** `DELETE /v1/environments/{id}/members/{userId}` — pass your own id to leave. */
33836
- remove(envId: string, userId: string, opts?: CallOpts$32): Promise<Reply<'removeEnvironmentMember'>>;
35202
+ remove(envId: string, userId: string, opts?: CallOpts$33): Promise<Reply<'removeEnvironmentMember'>>;
33837
35203
  /** `POST /v1/environments/{id}/members/me/ssh-cert` — 12 h OpenSSH user certificate for your key. */
33838
- sshCert(envId: string, body: EnvironmentSshCertBody, opts?: CallOpts$32): Promise<EnvironmentSshCert>;
35204
+ sshCert(envId: string, body: EnvironmentSshCertBody, opts?: CallOpts$33): Promise<EnvironmentSshCert>;
33839
35205
  }
33840
35206
  /** `/v1/environments/{id}/tasks` — fire-and-forget agent tasks run in the environment. */
33841
35207
  export declare class EnvironmentTasks {
33842
35208
  private readonly http;
33843
35209
  constructor(http: HttpClient);
33844
35210
  /** `GET /v1/environments/{id}/tasks` */
33845
- list(envId: string, opts?: CallOpts$32): Promise<EnvironmentTaskList>;
35211
+ list(envId: string, opts?: CallOpts$33): Promise<EnvironmentTaskList>;
33846
35212
  /** `POST /v1/environments/{id}/tasks` — queued; you get a notification when it finishes. */
33847
- create(envId: string, body: EnvironmentTaskCreateBody, opts?: CallOpts$32): Promise<EnvironmentTaskCreated>;
35213
+ create(envId: string, body: EnvironmentTaskCreateBody, opts?: CallOpts$33): Promise<EnvironmentTaskCreated>;
33848
35214
  /** `GET /v1/environments/{id}/tasks/{taskId}` */
33849
- get(envId: string, taskId: string, opts?: CallOpts$32): Promise<EnvironmentTaskDetail>;
35215
+ get(envId: string, taskId: string, opts?: CallOpts$33): Promise<EnvironmentTaskDetail>;
33850
35216
  }
33851
35217
  /** `/v1/environments/{id}/files` — read/write/list over the relay (developer role or higher). */
33852
35218
  export declare class EnvironmentFiles {
33853
35219
  private readonly http;
33854
35220
  constructor(http: HttpClient);
33855
35221
  /** `GET /v1/environments/{id}/files?path=` — directory entries; no path → your workspace. */
33856
- list(envId: string, path?: string, opts?: CallOpts$32): Promise<EnvironmentFileList>;
35222
+ list(envId: string, path?: string, opts?: CallOpts$33): Promise<EnvironmentFileList>;
33857
35223
  /** `GET /v1/environments/{id}/files/{path}` — UTF-8 text (64 KB default, `maxBytes` ≤ 512 KB). */
33858
35224
  get(envId: string, path: string, options?: {
33859
35225
  maxBytes?: number;
33860
- } & CallOpts$32): Promise<EnvironmentFile>;
35226
+ } & CallOpts$33): Promise<EnvironmentFile>;
33861
35227
  /** `PUT /v1/environments/{id}/files/{path}` — replace with UTF-8 text (≤ 2 MB). */
33862
- put(envId: string, path: string, content: string, opts?: CallOpts$32): Promise<EnvironmentFileWritten>;
35228
+ put(envId: string, path: string, content: string, opts?: CallOpts$33): Promise<EnvironmentFileWritten>;
33863
35229
  }
33864
35230
  /** `/v1/environments/{id}/jobs` — background jobs on the environment daemon. */
33865
35231
  export declare class EnvironmentJobs {
33866
35232
  private readonly http;
33867
35233
  constructor(http: HttpClient);
33868
35234
  /** `POST /v1/environments/{id}/jobs` — returns at once with `job_id`. */
33869
- start(envId: string, body: EnvironmentJobStartBody, opts?: CallOpts$32): Promise<EnvironmentJobStarted>;
35235
+ start(envId: string, body: EnvironmentJobStartBody, opts?: CallOpts$33): Promise<EnvironmentJobStarted>;
33870
35236
  /** `GET /v1/environments/{id}/jobs/{jobId}` — status + output (`since` = previous `next_offset`). */
33871
- get(envId: string, jobId: string | number, query?: GetEnvironmentJobQuery, opts?: CallOpts$32): Promise<EnvironmentJob>;
35237
+ get(envId: string, jobId: string | number, query?: GetEnvironmentJobQuery, opts?: CallOpts$33): Promise<EnvironmentJob>;
33872
35238
  }
33873
35239
  export declare class EnvironmentPorts {
33874
35240
  private readonly http;
33875
35241
  constructor(http: HttpClient);
33876
35242
  /** `GET /v1/environments/{id}/ports` — published (forwarded) ports. */
33877
- list(envId: string, opts?: CallOpts$32): Promise<EnvironmentPort[]>;
35243
+ list(envId: string, opts?: CallOpts$33): Promise<EnvironmentPort[]>;
33878
35244
  /** `PUT /v1/environments/{id}/ports/{port}` — publish or change visibility (upsert). */
33879
- set(envId: string, port: number, body: EnvironmentPortBody, opts?: CallOpts$32): Promise<EnvironmentPort>;
35245
+ set(envId: string, port: number, body: EnvironmentPortBody, opts?: CallOpts$33): Promise<EnvironmentPort>;
33880
35246
  /** `DELETE /v1/environments/{id}/ports/{port}` — unpublish. */
33881
- remove(envId: string, port: number, opts?: CallOpts$32): Promise<Reply<'removeEnvironmentPort'>>;
35247
+ remove(envId: string, port: number, opts?: CallOpts$33): Promise<Reply<'removeEnvironmentPort'>>;
33882
35248
  }
33883
35249
  export declare class EnvironmentSecrets {
33884
35250
  private readonly http;
33885
35251
  constructor(http: HttpClient);
33886
35252
  /** `GET /v1/environments/{id}/secrets` — names and timestamps only, never values. */
33887
- list(envId: string, opts?: CallOpts$32): Promise<EnvironmentSecret[]>;
35253
+ list(envId: string, opts?: CallOpts$33): Promise<EnvironmentSecret[]>;
33888
35254
  /** `PUT /v1/environments/{id}/secrets/{name}` — upsert; `name` is `ENV_STYLE`. */
33889
- set(envId: string, name: string, value: string, opts?: CallOpts$32): Promise<EnvironmentSecretSet>;
35255
+ set(envId: string, name: string, value: string, opts?: CallOpts$33): Promise<EnvironmentSecretSet>;
33890
35256
  /** `DELETE /v1/environments/{id}/secrets/{name}` */
33891
- remove(envId: string, name: string, opts?: CallOpts$32): Promise<Reply<'removeEnvironmentSecret'>>;
35257
+ remove(envId: string, name: string, opts?: CallOpts$33): Promise<Reply<'removeEnvironmentSecret'>>;
33892
35258
  }
33893
35259
  export declare class Environments {
33894
35260
  private readonly http;
@@ -33903,41 +35269,41 @@ export declare class Environments {
33903
35269
  * `POST /v1/environments/{id}/exec` — run one relay op and wait (developer+). `op` defaults to
33904
35270
  * `shell` with `command`; 409 `environment_offline`, 504 `host_timeout`.
33905
35271
  */
33906
- exec(envId: string, body: EnvironmentExecBody, opts?: CallOpts$32): Promise<EnvironmentExecResult>;
35272
+ exec(envId: string, body: EnvironmentExecBody, opts?: CallOpts$33): Promise<EnvironmentExecResult>;
33907
35273
  /** `GET /v1/environments/{id}/ssh-ca` — CA public keys to trust (`@cert-authority` lines). */
33908
- sshCa(envId: string, opts?: CallOpts$32): Promise<EnvironmentSshCa>;
35274
+ sshCa(envId: string, opts?: CallOpts$33): Promise<EnvironmentSshCa>;
33909
35275
  /** `GET /v1/environments?project_id=&for_user_id=me` — newest first, every state. */
33910
- list(query?: ListEnvironmentsQuery, opts?: CallOpts$32): Promise<Environment[]>;
35276
+ list(query?: ListEnvironmentsQuery, opts?: CallOpts$33): Promise<Environment[]>;
33911
35277
  /**
33912
35278
  * `POST /v1/environments` — `byo` starts `pending`; managed providers start
33913
35279
  * `creating`. 409 `already_has_env` in a `vm_per_dev` project (the error
33914
35280
  * body carries the `environment_id` to reuse).
33915
35281
  */
33916
- create(body: EnvironmentCreateBody, opts?: CallOpts$32): Promise<Environment>;
35282
+ create(body: EnvironmentCreateBody, opts?: CallOpts$33): Promise<Environment>;
33917
35283
  /**
33918
35284
  * `POST /v1/environments/enroll` — daemon side. The one-time `codai_env_…`
33919
35285
  * token in the body is the only credential; the client's API key header is
33920
35286
  * ignored by this route. Managed environments additionally receive a
33921
35287
  * freshly minted `api_key`, returned exactly once.
33922
35288
  */
33923
- enroll(body: EnvironmentEnrollBody, opts?: CallOpts$32): Promise<EnvironmentEnrolled>;
35289
+ enroll(body: EnvironmentEnrollBody, opts?: CallOpts$33): Promise<EnvironmentEnrolled>;
33924
35290
  /** `GET /v1/environments/{id}` — environment, your role, members, ports, recent events. */
33925
- get(envId: string, opts?: CallOpts$32): Promise<EnvironmentDetail>;
35291
+ get(envId: string, opts?: CallOpts$33): Promise<EnvironmentDetail>;
33926
35292
  /** `PATCH /v1/environments/{id}` — `name` and/or `idle_timeout_minutes` (5..1440). */
33927
- update(envId: string, body: EnvironmentPatchBody, opts?: CallOpts$32): Promise<Environment>;
35293
+ update(envId: string, body: EnvironmentPatchBody, opts?: CallOpts$33): Promise<Environment>;
33928
35294
  /** `POST /v1/environments/{id}/start` — managed providers only (`stopped` → `starting`). */
33929
- start(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
35295
+ start(envId: string, opts?: CallOpts$33): Promise<EnvironmentTransition>;
33930
35296
  /** `POST /v1/environments/{id}/stop` — managed providers only (`running` → `stopping`). */
33931
- stop(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
35297
+ stop(envId: string, opts?: CallOpts$33): Promise<EnvironmentTransition>;
33932
35298
  /** `POST /v1/environments/{id}/archive` — keeps history, releases the machine. */
33933
- archive(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
35299
+ archive(envId: string, opts?: CallOpts$33): Promise<EnvironmentTransition>;
33934
35300
  /** `POST /v1/environments/{id}/destroy` — owner only; terminal. */
33935
- destroy(envId: string, opts?: CallOpts$32): Promise<EnvironmentTransition>;
35301
+ destroy(envId: string, opts?: CallOpts$33): Promise<EnvironmentTransition>;
33936
35302
  /**
33937
35303
  * `POST /v1/environments/{id}/enroll-token` — `byo` only; a 30-minute
33938
35304
  * one-time token for `enroll()`. Minting again replaces the previous one.
33939
35305
  */
33940
- enrollToken(envId: string, opts?: CallOpts$32): Promise<EnvironmentEnrollToken>;
35306
+ enrollToken(envId: string, opts?: CallOpts$33): Promise<EnvironmentEnrollToken>;
33941
35307
  private transition;
33942
35308
  }
33943
35309
  //#endregion
@@ -33974,7 +35340,7 @@ export type HostExecBody = Mutable<Body<'execOnHost'>>;
33974
35340
  export type HostExecResponse = Reply<'execOnHost'>;
33975
35341
  export type HostExecRequest = Schema<'HostExecRequest'>;
33976
35342
  export type HostExecResultBody = Mutable<Body<'postHostExecResult'>>;
33977
- type CallOpts$31 = {
35343
+ type CallOpts$32 = {
33978
35344
  ext?: CodaiRequestExtensions;
33979
35345
  signal?: AbortSignal;
33980
35346
  };
@@ -34001,7 +35367,7 @@ export declare class Hosts {
34001
35367
  private readonly http;
34002
35368
  constructor(http: HttpClient);
34003
35369
  /** `GET /v1/hosts` — your devices currently connected as hosts. */
34004
- list(opts?: CallOpts$31): Promise<HostPresence[]>;
35370
+ list(opts?: CallOpts$32): Promise<HostPresence[]>;
34005
35371
  /**
34006
35372
  * `POST /v1/hosts/{deviceId}/exec` — run one op on a connected host and
34007
35373
  * block until it answers (or `timeout_ms`, default 60 s).
@@ -34009,9 +35375,9 @@ export declare class Hosts {
34009
35375
  exec(deviceId: string, op: HostOp, args?: Record<string, unknown>, extra?: {
34010
35376
  timeoutMs?: number;
34011
35377
  label?: string;
34012
- } & CallOpts$31): Promise<HostExecResponse>;
35378
+ } & CallOpts$32): Promise<HostExecResponse>;
34013
35379
  /** `POST /v1/hosts/exec/{reqId}/result` — host side: deliver an exec result. */
34014
- postResult(reqId: string, body: HostExecResultBody, opts?: CallOpts$31): Promise<Reply<'postHostExecResult'>>;
35380
+ postResult(reqId: string, body: HostExecResultBody, opts?: CallOpts$32): Promise<Reply<'postHostExecResult'>>;
34015
35381
  /**
34016
35382
  * `GET /v1/hosts/stream?os=&hostname=&roots=` — host side: announce this
34017
35383
  * device and receive `hello` / `ping` / `exec` events. Closed by the server
@@ -34021,7 +35387,7 @@ export declare class Hosts {
34021
35387
  os?: string;
34022
35388
  hostname?: string;
34023
35389
  roots?: string[];
34024
- }, opts?: CallOpts$31): AsyncGenerator<HostStreamEvent, void, undefined>;
35390
+ }, opts?: CallOpts$32): AsyncGenerator<HostStreamEvent, void, undefined>;
34025
35391
  }
34026
35392
  //#endregion
34027
35393
  //#region src/resources/assets.d.ts
@@ -34033,7 +35399,7 @@ export type AssetDeleted = Reply<'deleteAsset'>;
34033
35399
  export type AssetListQuery = QueryOf<'listAssets'>;
34034
35400
  /** `b64_json` (default, inline bytes) or `url` (stored asset + 1 h signed URL; 503 `assets_unavailable` without storage). */
34035
35401
  export type MediaResponseFormat = Schema<'MediaResponseFormat'>;
34036
- type CallOpts$30 = {
35402
+ type CallOpts$31 = {
34037
35403
  ext?: CodaiRequestExtensions;
34038
35404
  signal?: AbortSignal;
34039
35405
  };
@@ -34043,25 +35409,25 @@ export declare class Assets {
34043
35409
  private readonly http;
34044
35410
  constructor(http: HttpClient);
34045
35411
  /** `GET /v1/assets` — newest first, `limit` ≤ 100 (default 30). Paginate by passing `next_before` as `before`. */
34046
- list(query?: AssetListQuery, opts?: CallOpts$30): Promise<AssetList>;
35412
+ list(query?: AssetListQuery, opts?: CallOpts$31): Promise<AssetList>;
34047
35413
  /** Iterate every asset across pages (`list` with `before` = previous `next_before`). */
34048
- iterate(query?: Omit<AssetListQuery, 'before'>, opts?: CallOpts$30): AsyncGenerator<AssetDto, void, undefined>;
35414
+ iterate(query?: Omit<AssetListQuery, 'before'>, opts?: CallOpts$31): AsyncGenerator<AssetDto, void, undefined>;
34049
35415
  /** `GET /v1/assets/{id}` — one asset with a fresh 1 h signed `url` (`null` while not `ready`). */
34050
- retrieve(id: string, opts?: CallOpts$30): Promise<AssetDto>;
35416
+ retrieve(id: string, opts?: CallOpts$31): Promise<AssetDto>;
34051
35417
  /**
34052
35418
  * A fresh signed URL of the asset's bytes (valid 1 h), from `GET /v1/assets/{id}`. Throws when the asset has no
34053
35419
  * content yet. Use it in `<audio>`/`<video>`/`fetch` — it needs no Authorization header.
34054
35420
  */
34055
- contentUrl(id: string, opts?: CallOpts$30): Promise<string>;
35421
+ contentUrl(id: string, opts?: CallOpts$31): Promise<string>;
34056
35422
  /**
34057
35423
  * The authenticated redirect endpoint `GET /v1/assets/{id}/content` (302 to the signed URL). Useful for tools that
34058
35424
  * follow redirects with the API key (`curl -L -H 'Authorization: Bearer …'`); browsers should use `contentUrl()`.
34059
35425
  */
34060
35426
  contentPath(id: string): string;
34061
35427
  /** Download the asset's bytes (fetches the signed URL, no API key sent to storage). */
34062
- content(id: string, opts?: CallOpts$30): Promise<Uint8Array>;
35428
+ content(id: string, opts?: CallOpts$31): Promise<Uint8Array>;
34063
35429
  /** `DELETE /v1/assets/{id}` — deletes the object; signed URLs already handed out stop working. */
34064
- delete(id: string, opts?: CallOpts$30): Promise<AssetDeleted>;
35430
+ delete(id: string, opts?: CallOpts$31): Promise<AssetDeleted>;
34065
35431
  }
34066
35432
  //#endregion
34067
35433
  //#region src/resources/images.d.ts
@@ -34564,11 +35930,11 @@ export type DocumentPreview = Reply<'retrievePreview'>;
34564
35930
  export type DocumentPreviewStatus = DocumentPreview['status'];
34565
35931
  export type DocumentVideoRequest = Mutable<Body<'createDocumentVideo'>>;
34566
35932
  export type DocumentVideoAccepted = Reply<'createDocumentVideo', 202>;
34567
- type CallOpts$29 = {
35933
+ type CallOpts$30 = {
34568
35934
  ext?: CodaiRequestExtensions;
34569
35935
  signal?: AbortSignal;
34570
35936
  };
34571
- export interface DocumentPollOptions extends CallOpts$29 {
35937
+ export interface DocumentPollOptions extends CallOpts$30 {
34572
35938
  /** Delay between polls (default 3000 ms for previews, 5000 ms for videos). */
34573
35939
  pollIntervalMs?: number;
34574
35940
  /** Give up after this long (default 300 000 ms for previews, 900 000 ms for videos). */
@@ -34583,21 +35949,21 @@ export declare class Documents {
34583
35949
  * `sheet` -> `SheetSpec`); invalid specs are 400 `invalid_spec`. Files are free. `based_on` creates the next version
34584
35950
  * of one of your documents; `preview: true` also queues a (billed) preview, returned as `preview`.
34585
35951
  */
34586
- create(body: DocumentCreateRequest, opts?: CallOpts$29): Promise<StudioDocument>;
35952
+ create(body: DocumentCreateRequest, opts?: CallOpts$30): Promise<StudioDocument>;
34587
35953
  /** `GET /v1/studio/documents/{id}` — fresh 1 h signed `file.url`, the stored `spec` and `latest_preview_id`. */
34588
- retrieve(id: string, opts?: CallOpts$29): Promise<StudioDocument>;
35954
+ retrieve(id: string, opts?: CallOpts$30): Promise<StudioDocument>;
34589
35955
  /**
34590
35956
  * Queue a preview (`POST /v1/studio/documents/{id}/previews`, HTTP 202): tagged PDF, page PNGs (1280 px) and a
34591
35957
  * contact sheet. Billed once on the first poll that sees the result; at most 3 active previews per user (429).
34592
35958
  */
34593
- preview(id: string, body?: DocumentPreviewRequest, opts?: CallOpts$29): Promise<DocumentPreviewAccepted>;
35959
+ preview(id: string, body?: DocumentPreviewRequest, opts?: CallOpts$30): Promise<DocumentPreviewAccepted>;
34594
35960
  /** Poll a preview (`GET /v1/studio/previews/{id}`): `queued` | `rendering` | `succeeded` | `failed`. */
34595
- retrievePreview(previewId: string, opts?: CallOpts$29): Promise<DocumentPreview>;
35961
+ retrievePreview(previewId: string, opts?: CallOpts$30): Promise<DocumentPreview>;
34596
35962
  /**
34597
35963
  * Turn a deck into an MP4 (`POST /v1/studio/documents/{id}/video`, HTTP 202). Returns a render: poll it with
34598
35964
  * `renders.retrieve(id)` or use `videoAndWait`. Narration (`narrate`) is synthesized and billed now.
34599
35965
  */
34600
- video(id: string, body?: DocumentVideoRequest, opts?: CallOpts$29): Promise<DocumentVideoAccepted>;
35966
+ video(id: string, body?: DocumentVideoRequest, opts?: CallOpts$30): Promise<DocumentVideoAccepted>;
34601
35967
  /** Queue a preview and poll until it succeeds. Throws on `failed` or timeout. */
34602
35968
  createPreviewAndWait(id: string, opts?: DocumentPollOptions & {
34603
35969
  body?: DocumentPreviewRequest;
@@ -34619,11 +35985,11 @@ export interface LottieDownload {
34619
35985
  filename: string | null;
34620
35986
  contentType: string | null;
34621
35987
  }
34622
- type CallOpts$28 = {
35988
+ type CallOpts$29 = {
34623
35989
  ext?: CodaiRequestExtensions;
34624
35990
  signal?: AbortSignal;
34625
35991
  };
34626
- export interface ExportWaitOptions extends CallOpts$28 {
35992
+ export interface ExportWaitOptions extends CallOpts$29 {
34627
35993
  /** Delay between polls (default 3000 ms). */
34628
35994
  intervalMs?: number;
34629
35995
  /** Give up after this long (default 900 000 ms = 15 min). */
@@ -34633,7 +35999,7 @@ export declare class Exports {
34633
35999
  private readonly http;
34634
36000
  constructor(http: HttpClient);
34635
36001
  /** The export: `queued` / `running`, then `succeeded` (signed `url`, valid 1 h) or `failed` (`error`). Free. */
34636
- retrieve(id: string, opts?: CallOpts$28): Promise<StudioExport>;
36002
+ retrieve(id: string, opts?: CallOpts$29): Promise<StudioExport>;
34637
36003
  /**
34638
36004
  * Poll `retrieve` every `intervalMs` (default 3 s) until the export is `succeeded` or `failed` and resolve with it
34639
36005
  * (a `failed` export resolves too — check `status` / `error`). Throws when it is not done within `timeoutMs`
@@ -34663,11 +36029,18 @@ export type CreativeRevertResult = Reply<'revertCreative'>;
34663
36029
  export type CreativeForkRequest = Mutable<Body<'forkCreative'>>;
34664
36030
  export type CreativeLintResult = Reply<'lintCreative'>;
34665
36031
  export type CreativeCompiled = Reply<'getCreativeCompiled'>;
34666
- export type CreativeRenderRequest = Mutable<Body<'renderCreative'>>;
34667
- export type CreativeRenderAccepted = Reply<'renderCreative', 202>;
36032
+ export type CreativeRenderRequest = Mutable<Schema<'CreativeRenderRequest'>>;
36033
+ export type CreativeRenderAccepted = Schema<'CreativeRenderAccepted'>;
34668
36034
  export type CreativeRenderCached = Reply<'renderCreative', 200>;
34669
36035
  /** `render` answer: a new queued render (202, `cached: false`) or the identical existing one (200, `cached: true`). */
34670
36036
  export type CreativeRenderResult = CreativeRenderAccepted | CreativeRenderCached;
36037
+ /** `renderAudio` body (MU-05): `formats` (wav | mp3 | flac), `stems`, `lrc`, `loudness` (preset or LUFS), `title`. */
36038
+ export type CreativeAudioRenderRequest = Mutable<Schema<'CreativeAudioRenderRequest'>>;
36039
+ /** `renderAudio` answer (202): the queued mixdown with its planned `outputs` and `quote_micro_usd`. */
36040
+ export type CreativeAudioRenderAccepted = Schema<'CreativeAudioRenderAccepted'>;
36041
+ export type CreativeAudioRenderOutput = Schema<'CreativeAudioRenderOutput'>;
36042
+ /** `GET /v1/studio/renders/{id}` of an audio render (`target: 'audio'`): one `data[]` asset per output. */
36043
+ export type StudioAudioRender = Schema<'StudioAudioRender'>;
34671
36044
  export type CreativeFrameRequest = Mutable<Body<'createCreativeFrame'>>;
34672
36045
  export type CreativeFrame = Schema<'CreativeFrame'>;
34673
36046
  export type CreativeFrames = Reply<'createCreativeFrame', 200>;
@@ -34766,7 +36139,7 @@ export interface CreativeEditRequest {
34766
36139
  /** Bypass locked nodes and variables. */
34767
36140
  force?: boolean;
34768
36141
  }
34769
- type CallOpts$27 = {
36142
+ type CallOpts$28 = {
34770
36143
  ext?: CodaiRequestExtensions;
34771
36144
  signal?: AbortSignal;
34772
36145
  };
@@ -34774,49 +36147,49 @@ export declare class Creatives {
34774
36147
  private readonly http;
34775
36148
  constructor(http: HttpClient);
34776
36149
  /** List your creatives, most recently updated first (`next_before` pages). */
34777
- list(query?: CreativeListQuery, opts?: CallOpts$27): Promise<CreativeList>;
36150
+ list(query?: CreativeListQuery, opts?: CallOpts$28): Promise<CreativeList>;
34778
36151
  /**
34779
36152
  * Create a creative (`kind` + optional `title` / `doc`); without `doc` you get an empty document for the kind.
34780
36153
  * `brand_kit_id` applies one of your brand kits (`brandKits`) to version 1: `brand = { kitId, tokens }` + its logo.
34781
36154
  * `template` (+ `vars`, values by var key) starts from one of your templates (`templates`) instead of `doc`.
34782
36155
  */
34783
- create(body: CreativeCreateRequest, opts?: CallOpts$27): Promise<Creative>;
36156
+ create(body: CreativeCreateRequest, opts?: CallOpts$28): Promise<Creative>;
34784
36157
  /** The document at the head (or `seq`) with signed `assets` (1 h URLs). */
34785
36158
  retrieve(id: string, query?: {
34786
36159
  seq?: number;
34787
- }, opts?: CallOpts$27): Promise<CreativeDetail>;
36160
+ }, opts?: CallOpts$28): Promise<CreativeDetail>;
34788
36161
  /** Compact text outline (+ formats and vars) — the cheapest structure for a prompt. */
34789
- outline(id: string, opts?: CallOpts$27): Promise<CreativeOutline>;
36162
+ outline(id: string, opts?: CallOpts$28): Promise<CreativeOutline>;
34790
36163
  /** Node ids matching `query` (a string = text/name/id substring, or `{ text, type, sceneId, assetId, locked }`). */
34791
- find(id: string, query: CreativeFindRequest['query'], opts?: CallOpts$27): Promise<CreativeFindResult>;
36164
+ find(id: string, query: CreativeFindRequest['query'], opts?: CallOpts$28): Promise<CreativeFindResult>;
34792
36165
  /** Full JSON of `ids` (scene ids return whole scenes) or of one `sceneId`. */
34793
- subtree(id: string, body: CreativeSubtreeRequest, opts?: CallOpts$27): Promise<CreativeSubtree>;
36166
+ subtree(id: string, body: CreativeSubtreeRequest, opts?: CallOpts$28): Promise<CreativeSubtree>;
34794
36167
  /**
34795
36168
  * Apply an op batch (all or nothing) authored against `baseSeq`. A stale base is rebased when the touched
34796
36169
  * targets did not change meanwhile; otherwise the call throws `CodaiError` 409 `stale` (reload and retry). Rejected
34797
36170
  * ops throw 400 with `code` (`invalid`, `not_found`, `locked`, `duplicate_id`).
34798
36171
  */
34799
- edit(id: string, body: CreativeEditRequest, opts?: CallOpts$27): Promise<CreativeOpsResult>;
36172
+ edit(id: string, body: CreativeEditRequest, opts?: CallOpts$28): Promise<CreativeOpsResult>;
34800
36173
  /** Version history, newest first (`beforeSeq` pages). */
34801
36174
  versions(id: string, query?: {
34802
36175
  beforeSeq?: number;
34803
36176
  limit?: number;
34804
- }, opts?: CallOpts$27): Promise<CreativeVersionList>;
36177
+ }, opts?: CallOpts$28): Promise<CreativeVersionList>;
34805
36178
  /** New head whose document is version `seq`'s (undo / redo). */
34806
- revert(id: string, seq: number, opts?: CallOpts$27): Promise<CreativeRevertResult>;
36179
+ revert(id: string, seq: number, opts?: CallOpts$28): Promise<CreativeRevertResult>;
34807
36180
  /** New creative from version `seq` (default the head). */
34808
- fork(id: string, body?: CreativeForkRequest, opts?: CallOpts$27): Promise<Creative>;
36181
+ fork(id: string, body?: CreativeForkRequest, opts?: CallOpts$28): Promise<Creative>;
34809
36182
  /** Soft-delete the creative. */
34810
- delete(id: string, opts?: CallOpts$27): Promise<CreativeDeleted>;
36183
+ delete(id: string, opts?: CallOpts$28): Promise<CreativeDeleted>;
34811
36184
  /**
34812
36185
  * Contrast, safe area, empty text, missing assets, brand colours, platform safe zones and text floors, alt text,
34813
36186
  * missing captions, reading speed, flashing, missing / stale translations. Issues carry `format` / `fixable` /
34814
36187
  * `locale`; `fixable` counts them (`lintFix`). `locale` lints the translated document (adds
34815
36188
  * `text_overflow_locale`); 404 `Locale not found.` for an unknown locale.
34816
36189
  */
34817
- lint(id: string, body?: CreativeLintRequest, opts?: CallOpts$27): Promise<CreativeLintResult>;
36190
+ lint(id: string, body?: CreativeLintRequest, opts?: CallOpts$28): Promise<CreativeLintResult>;
34818
36191
  /** Preview HTML (signed asset URLs) for `format` / one `scene` / a translation (`locale`). */
34819
- compiled(id: string, query?: CreativeCompiledQuery, opts?: CallOpts$27): Promise<CreativeCompiled>;
36192
+ compiled(id: string, query?: CreativeCompiledQuery, opts?: CallOpts$28): Promise<CreativeCompiled>;
34820
36193
  /**
34821
36194
  * Queue an MP4 render of the head (`codai-render`, HTTP 202, `cached: false`); poll `renders.retrieve(render_id)`.
34822
36195
  * When the same render already exists for this version / format / quality / fps you get it back at once
@@ -34825,48 +36198,59 @@ export declare class Creatives {
34825
36198
  * `ai_label` (`none` | `corner` | `end_card`, EU AI Act art. 50(4)) burns a visible AI label into the video; omitted =
34826
36199
  * `corner` when the creative uses TTS narration or AI images, else `none` (`none` with narration: 400 `ai_label_required`).
34827
36200
  */
34828
- render(id: string, body?: CreativeRenderRequest, opts?: CallOpts$27): Promise<CreativeRenderResult>;
36201
+ render(id: string, body?: CreativeRenderRequest, opts?: CallOpts$28): Promise<CreativeRenderResult>;
36202
+ /**
36203
+ * Mixdown + mastering + exports of an `audio` creative (MU-05; same `POST …/render` route, HTTP 202). `formats`
36204
+ * (default `['wav', 'mp3']`), `stems: true` adds one WAV per audible track (+50 %), `lrc` exports the timed lyrics
36205
+ * (default on when the document has them), `loudness` is `streaming` (−14) | `podcast` (−16) | `broadcast` (−23) or
36206
+ * LUFS (−40…−5). Poll `renders.retrieve(render_id)`: the finished render's `data[]` holds one signed asset per output
36207
+ * (`output: mix | stem | lrc`). $0.001 per output second, minimum $0.01; held up front, billed on the measured length.
36208
+ * 400 `empty_audio` / `too_long` (20 min) / `no_lyrics`; video creatives use `render`.
36209
+ */
36210
+ renderAudio(id: string, body?: CreativeAudioRenderRequest, opts?: CallOpts$28 & {
36211
+ idempotencyKey?: string;
36212
+ }): Promise<CreativeAudioRenderAccepted>;
34829
36213
  /**
34830
36214
  * PNG still frames at up to 6 times (`t_ms`). `exact: false` (default) screenshots the compiled HTML; `exact: true`
34831
36215
  * cuts them from a draft render of the covering scenes. Waits up to ~90 s: frames (`status: 'succeeded'`) or a
34832
36216
  * running job (`status: 'running'`) to poll with `frameJob(id, frame_job_id)`. Cached frames are free; 60 frame
34833
36217
  * jobs per UTC day are free, then billed (`billed_micro_usd`).
34834
36218
  */
34835
- frame(id: string, body: CreativeFrameRequest, opts?: CallOpts$27): Promise<CreativeFrameResult>;
36219
+ frame(id: string, body: CreativeFrameRequest, opts?: CallOpts$28): Promise<CreativeFrameResult>;
34836
36220
  /**
34837
36221
  * Turn a comment pinned on a frame (`t_ms`, optional `node_id` / `scene_id`) into an edit: one bounded `codai`
34838
36222
  * model turn proposes ops, applied like `edit` against `base_seq` (rebased when possible, 409 `stale` else).
34839
36223
  * 422 `no_edit` when the model made no edit (its answer in `error.text`); `apply: false` only proposes the ops.
34840
36224
  * Token-metered like any `codai` text call.
34841
36225
  */
34842
- comment(id: string, body: CreativeCommentRequest, opts?: CallOpts$27): Promise<CreativeCommentResult>;
36226
+ comment(id: string, body: CreativeCommentRequest, opts?: CallOpts$28): Promise<CreativeCommentResult>;
34843
36227
  /**
34844
36228
  * Generate A/B variants: one bounded `codai` model turn proposes `count` (default 3) variants changing only
34845
36229
  * `focus` (default hook / title / cta); each becomes a fork of the creative at `base_seq` with the ops applied, plus
34846
36230
  * a queued draft render (`render: false` to skip; poll `renders.retrieve(render_id)`). The original is unchanged
34847
36231
  * until `pickVariant`. 422 `no_edit` when no valid variant came back, 504 `timeout` after 90 s. Token-metered.
34848
36232
  */
34849
- variants(id: string, body: CreativeVariantsRequest, opts?: CallOpts$27): Promise<CreativeVariantsResult>;
36233
+ variants(id: string, body: CreativeVariantsRequest, opts?: CallOpts$28): Promise<CreativeVariantsResult>;
34850
36234
  /** The latest variant group of a creative (`group_id: null` when none) with statuses and stored render state. */
34851
- listVariants(id: string, opts?: CallOpts$27): Promise<CreativeVariantList>;
36235
+ listVariants(id: string, opts?: CallOpts$28): Promise<CreativeVariantList>;
34852
36236
  /**
34853
36237
  * Pick the winner: its ops are applied to the original against `base_seq` (rebased when possible, 409 `stale`
34854
36238
  * else); the winner is marked `winner`, the rest of its group `rejected`.
34855
36239
  */
34856
- pickVariant(id: string, variantId: string, body: CreativeVariantPickRequest, opts?: CallOpts$27): Promise<CreativeVariantPickResult>;
36240
+ pickVariant(id: string, variantId: string, body: CreativeVariantPickRequest, opts?: CallOpts$28): Promise<CreativeVariantPickResult>;
34857
36241
  /**
34858
36242
  * Save the creative (at `seq`, default the head) as a private template: each `vars` entry turns a text node's text
34859
36243
  * (`prop: 'text'`) or an image node's asset (`prop: 'image'`) into a variable whose default is the current value.
34860
36244
  * 400 `node_not_found` / `invalid_pick` / `duplicate_key`. Free.
34861
36245
  */
34862
- saveTemplate(id: string, body: SaveTemplateRequest, opts?: CallOpts$27): Promise<CreativeTemplate>;
36246
+ saveTemplate(id: string, body: SaveTemplateRequest, opts?: CallOpts$28): Promise<CreativeTemplate>;
34863
36247
  /**
34864
36248
  * Queue an FCPXML export of a video creative (`seq`, default the head; `format`, default the first 1920×1080 /
34865
36249
  * 1080×1920 / 1080×1080 format): a zip with `project.fcpxml` + per-scene MP4 segments + audio, for Final Cut Pro,
34866
36250
  * DaVinci Resolve or Premiere. Resolves to the queued export; poll it with `exports.wait(e.id)`. Only newly
34867
36251
  * rendered seconds are billed (final render price). 400 `unsupported_kind` / `unsupported_format` / `too_long`.
34868
36252
  */
34869
- exportFcpxml(id: string, query?: ExportFcpxmlQuery, opts?: CallOpts$27): Promise<StudioExport>;
36253
+ exportFcpxml(id: string, query?: ExportFcpxmlQuery, opts?: CallOpts$28): Promise<StudioExport>;
34870
36254
  /**
34871
36255
  * Export a video creative as a Lottie animation (`seq`, default the head; `format`, default the document's default
34872
36256
  * format, or `formats: 'all'`; `container: 'json'` (default, Bodymovin JSON with embedded images) or `'dotlottie'`).
@@ -34874,33 +36258,33 @@ export declare class Creatives {
34874
36258
  * fidelity report in `warnings` (video, chart, HTML block, table, cell grid and audio nodes are not exported).
34875
36259
  * 400 `unsupported_kind` / `invalid_request`, 413 `too_large` (over 20 MB).
34876
36260
  */
34877
- exportLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$27): Promise<StudioExport>;
36261
+ exportLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$28): Promise<StudioExport>;
34878
36262
  /**
34879
36263
  * The Lottie file itself (`download=1`, nothing stored): `application/json` for one Bodymovin JSON, `application/zip`
34880
36264
  * for a dotLottie archive or a zip of JSON files (`formats: 'all'`). Same options and errors as `exportLottie`. Free.
34881
36265
  */
34882
- downloadLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$27): Promise<LottieDownload>;
36266
+ downloadLottie(id: string, query?: ExportLottieQuery, opts?: CallOpts$28): Promise<LottieDownload>;
34883
36267
  /**
34884
36268
  * Turn one of your Studio documents (deck, doc, sheet) into an editable creative — slides become scenes with a
34885
36269
  * `layout` and speaker `notes`, doc pages a `flow` group, sheets a `cell_grid`; nodes carry semantic `role`s.
34886
36270
  * Idempotent: a document that already has a creative resolves to it (`existing: true`). Free. 404 unknown document,
34887
36271
  * 409 `document_spec_missing`, 400 `invalid_spec`, 413 `too_large`.
34888
36272
  */
34889
- fromDocument(documentId: string, opts?: CallOpts$27): Promise<StudioCreativeFromDocument>;
36273
+ fromDocument(documentId: string, opts?: CallOpts$28): Promise<StudioCreativeFromDocument>;
34890
36274
  /**
34891
36275
  * Build a deck / doc / sheet creative (at `seq`, default the head) into a PPTX / DOCX / XLSX — a new version of its
34892
36276
  * Studio document (`document`, exactly the `POST /v1/studio/documents` body). Converter notes come back in
34893
36277
  * `warnings`. The file is free; `preview: true` also queues a billed preview (poll it with
34894
36278
  * `documents.waitForPreview`). 400 `not_supported_for_kind` (video / image) or `invalid_spec`.
34895
36279
  */
34896
- build(id: string, body?: CreativeBuildRequest, opts?: CallOpts$27): Promise<StudioCreativeBuild>;
36280
+ build(id: string, body?: CreativeBuildRequest, opts?: CallOpts$28): Promise<StudioCreativeBuild>;
34897
36281
  /**
34898
36282
  * Re-apply a brand kit (`brand_kit_id`) or a flat token map (`tokens`) to the creative as one new version: literal
34899
36283
  * colours equal to the old brand become token refs, `snap: true` maps every other colour to the nearest kit colour,
34900
36284
  * `fonts` (default true) sets heading / body font refs by role, locked nodes are skipped unless `force`. The kit
34901
36285
  * logo is registered too. `base_seq` defaults to the head (rebased like `edit`, 409 `stale` else). Free.
34902
36286
  */
34903
- restyle(id: string, body: CreativeRestyleRequest, opts?: CallOpts$27): Promise<CreativeRestyleResult>;
36287
+ restyle(id: string, body: CreativeRestyleRequest, opts?: CallOpts$28): Promise<CreativeRestyleResult>;
34904
36288
  /**
34905
36289
  * Auto-captions: transcribe a voice clip (`clip_id`, default the first voice clip) word by word and add or update a
34906
36290
  * captions node (`preset`, default `bold-pill`) as one new version. Words are cached on the asset (free next time
@@ -34908,83 +36292,83 @@ export declare class Creatives {
34908
36292
  * transcription is billed at the speech-to-text rate (`cost_micro_usd`). Video creatives only (400
34909
36293
  * `unsupported_kind`); 403 `residency_unavailable`, 503 `transcription_unavailable`.
34910
36294
  */
34911
- captions(id: string, body?: CreativeCaptionsRequest, opts?: CallOpts$27): Promise<CreativeCaptionsResult>;
36295
+ captions(id: string, body?: CreativeCaptionsRequest, opts?: CallOpts$28): Promise<CreativeCaptionsResult>;
34912
36296
  /** The captions as SubRip text on the document timeline (`node_id`, `seq` optional); 404 without captions. Free. */
34913
- captionsSrt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$27): Promise<string>;
36297
+ captionsSrt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$28): Promise<string>;
34914
36298
  /** The captions as WebVTT text on the document timeline (`node_id`, `seq` optional); 404 without captions. Free. */
34915
- captionsVtt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$27): Promise<string>;
36299
+ captionsVtt(id: string, query?: CreativeCaptionsQuery, opts?: CallOpts$28): Promise<string>;
34916
36300
  /**
34917
36301
  * Adapt to platforms (`tiktok`, `reels`, `shorts`, `feed-square`, `feed-portrait`, `youtube`): one format per
34918
36302
  * platform in one new version, text kept inside each platform's safe zone and above its legible size.
34919
36303
  * `focal: 'vision'` (token-metered) finds the focal point of full-bleed images; it fails open. Free otherwise.
34920
36304
  */
34921
- adapt(id: string, body: CreativeAdaptRequest, opts?: CallOpts$27): Promise<CreativeAdaptResult>;
36305
+ adapt(id: string, body: CreativeAdaptRequest, opts?: CallOpts$28): Promise<CreativeAdaptResult>;
34922
36306
  /**
34923
36307
  * Fix lint issues as one new version: deterministic fixes (free) for `off_brand_color`, `text_too_small`,
34924
36308
  * `outside_platform_safe_zone` and `flashing` (`codes` limits them); `agent: true` (token-metered) gives the rest
34925
36309
  * to one `codai` turn. Nothing to fix: the current `seq`, empty `fixed`, no new version.
34926
36310
  */
34927
- lintFix(id: string, body?: CreativeLintFixRequest, opts?: CallOpts$27): Promise<CreativeLintFixResult>;
36311
+ lintFix(id: string, body?: CreativeLintFixRequest, opts?: CallOpts$28): Promise<CreativeLintFixResult>;
34928
36312
  /**
34929
36313
  * The tweak panel model: one control per variable (stored `meta.controls` entry or derived from the type). Change
34930
36314
  * values with a `setVar` op and controls with a `setControl` op (`edit`). Free.
34931
36315
  */
34932
- controls(id: string, opts?: CallOpts$27): Promise<CreativeControls>;
36316
+ controls(id: string, opts?: CallOpts$28): Promise<CreativeControls>;
34933
36317
  /**
34934
36318
  * Localisation state: source locale, glossary, unit count and per locale translated / missing / stale / voice.
34935
36319
  * With `locale` (+ `units`, default 1) also the units of that locale (paged with `offset` / `limit` ≤ 500). Free.
34936
36320
  */
34937
- locales(id: string, query?: CreativeLocalesQuery, opts?: CallOpts$27): Promise<CreativeLocaleStatus>;
36321
+ locales(id: string, query?: CreativeLocalesQuery, opts?: CallOpts$28): Promise<CreativeLocaleStatus>;
34938
36322
  /**
34939
36323
  * Translate every text into up to 10 BCP-47 `locales` as per-locale overrides (one new version, author `agent`).
34940
36324
  * Token-metered `codai` turns; `glossary` terms and the brand kit name stay verbatim, `tone` picks the address,
34941
36325
  * `only_missing` (default true) skips fresh translations, `voice: true` (video, billed) narrates voice clips again.
34942
36326
  * 400 `nothing_to_translate`; 503 `localize_unavailable` when every locale failed.
34943
36327
  */
34944
- localize(id: string, body: CreativeLocalizeRequest, opts?: CallOpts$27): Promise<CreativeLocalizeResult>;
36328
+ localize(id: string, body: CreativeLocalizeRequest, opts?: CallOpts$28): Promise<CreativeLocalizeResult>;
34945
36329
  /**
34946
36330
  * Save `locale` as a new standalone creative (translations applied, overrides dropped, `fork_of` recorded; default
34947
36331
  * title `<title> (<locale>)`). 404 `Locale not found.`. Free (HTTP 201).
34948
36332
  */
34949
- forkLocale(id: string, locale: string, body?: CreativeLocaleForkRequest, opts?: CallOpts$27): Promise<CreativeLocaleForkResult>;
36333
+ forkLocale(id: string, locale: string, body?: CreativeLocaleForkRequest, opts?: CallOpts$28): Promise<CreativeLocaleForkResult>;
34950
36334
  /**
34951
36335
  * Create a public link: `view` (read-only preview of version `seq` or the head; `allow_remix` default false) or
34952
36336
  * `review` (comments by name, no account; `can_approve` lets the holder approve). The `token` and `url` are shown
34953
36337
  * only in this answer (HTTP 201). 400 `unknown_seq`; 409 `too_many_shares` (20 active links). Free.
34954
36338
  */
34955
- createShare(id: string, body: StudioShareCreateRequest, opts?: CallOpts$27): Promise<StudioShareCreated>;
36339
+ createShare(id: string, body: StudioShareCreateRequest, opts?: CallOpts$28): Promise<StudioShareCreated>;
34956
36340
  /** The active links (not revoked, not expired), newest first; `url` is always null. Free. */
34957
- listShares(id: string, opts?: CallOpts$27): Promise<StudioShareList>;
36341
+ listShares(id: string, opts?: CallOpts$28): Promise<StudioShareList>;
34958
36342
  /** Revoke a link: it answers 404 from now on. 404 when unknown or already revoked. Free. */
34959
- revokeShare(id: string, shareId: string, opts?: CallOpts$27): Promise<void>;
36343
+ revokeShare(id: string, shareId: string, opts?: CallOpts$28): Promise<void>;
34960
36344
  /**
34961
36345
  * The review state: `status` (`draft` → `in_review` → `approved` | `changes_requested`), requested / approved
34962
36346
  * version (`approved_is_head` false once the creative changed), decider and thread counts. Free.
34963
36347
  */
34964
- review(id: string, opts?: CallOpts$27): Promise<StudioReview>;
36348
+ review(id: string, opts?: CallOpts$28): Promise<StudioReview>;
34965
36349
  /** Send the head to review (`in_review`, earlier decision cleared) so approver links can decide. Free. */
34966
- requestReview(id: string, opts?: CallOpts$27): Promise<StudioReview>;
36350
+ requestReview(id: string, opts?: CallOpts$28): Promise<StudioReview>;
34967
36351
  /** Back to `draft` (decision cleared, comments kept). Free. */
34968
- resetReview(id: string, opts?: CallOpts$27): Promise<StudioReview>;
36352
+ resetReview(id: string, opts?: CallOpts$28): Promise<StudioReview>;
34969
36353
  /** Comment threads, newest first (≤ 200), replies oldest first; `status` `open` | `resolved` | `all`. Free. */
34970
- reviewThreads(id: string, query?: StudioReviewThreadsQuery, opts?: CallOpts$27): Promise<StudioReviewThreadList>;
36354
+ reviewThreads(id: string, query?: StudioReviewThreadsQuery, opts?: CallOpts$28): Promise<StudioReviewThreadList>;
34971
36355
  /**
34972
36356
  * Start a thread as the owner, optionally anchored to `node_id` / `scene_id` / `t_ms` (checked against the head:
34973
36357
  * 400 `unknown_node` / `unknown_scene`; HTTP 201). 409 `too_many_comments`. Free.
34974
36358
  */
34975
- createReviewThread(id: string, body: StudioReviewThreadCreateRequest, opts?: CallOpts$27): Promise<StudioReviewThread>;
36359
+ createReviewThread(id: string, body: StudioReviewThreadCreateRequest, opts?: CallOpts$28): Promise<StudioReviewThread>;
34976
36360
  /** Reply in a thread as the owner (HTTP 201) — returns the whole thread. Free. */
34977
36361
  replyReviewThread(id: string, threadId: string, body: {
34978
36362
  body: string;
34979
- }, opts?: CallOpts$27): Promise<StudioReviewThread>;
36363
+ }, opts?: CallOpts$28): Promise<StudioReviewThread>;
34980
36364
  /** Resolve a thread. Free. */
34981
- resolveReviewThread(id: string, threadId: string, opts?: CallOpts$27): Promise<StudioReviewThread>;
36365
+ resolveReviewThread(id: string, threadId: string, opts?: CallOpts$28): Promise<StudioReviewThread>;
34982
36366
  /** Reopen a resolved thread. Free. */
34983
- reopenReviewThread(id: string, threadId: string, opts?: CallOpts$27): Promise<StudioReviewThread>;
36367
+ reopenReviewThread(id: string, threadId: string, opts?: CallOpts$28): Promise<StudioReviewThread>;
34984
36368
  /** Delete any comment (owner moderation; deleting a root hides the thread). 404 when unknown. Free. */
34985
- deleteReviewComment(id: string, commentId: string, opts?: CallOpts$27): Promise<void>;
36369
+ deleteReviewComment(id: string, commentId: string, opts?: CallOpts$28): Promise<void>;
34986
36370
  /** Poll a frame job: frames when done (`status: 'succeeded'`), `status: 'running'` meanwhile; 404 unknown job. */
34987
- frameJob(id: string, jobId: string, opts?: CallOpts$27): Promise<CreativeFrameResult>;
36371
+ frameJob(id: string, jobId: string, opts?: CallOpts$28): Promise<CreativeFrameResult>;
34988
36372
  }
34989
36373
  //#endregion
34990
36374
  //#region src/resources/brand-kits.d.ts
@@ -35000,7 +36384,7 @@ export type BrandKitCreateRequest = Mutable<Body<'createBrandKit'>>;
35000
36384
  export type BrandKitUpdateRequest = Mutable<Body<'updateBrandKit'>>;
35001
36385
  export type BrandKitList = Reply<'listBrandKits'>;
35002
36386
  export type BrandKitDeleted = Reply<'deleteBrandKit'>;
35003
- type CallOpts$26 = {
36387
+ type CallOpts$27 = {
35004
36388
  ext?: CodaiRequestExtensions;
35005
36389
  signal?: AbortSignal;
35006
36390
  };
@@ -35012,29 +36396,29 @@ export declare class BrandKits {
35012
36396
  * (import) — exactly one. 400 `invalid_tokens` (with `details.issues`) for an invalid DTCG document, 404 when
35013
36397
  * `logo_asset_id` is not one of your ready image assets. Free.
35014
36398
  */
35015
- create(body: BrandKitCreateRequest, opts?: CallOpts$26): Promise<BrandKit>;
36399
+ create(body: BrandKitCreateRequest, opts?: CallOpts$27): Promise<BrandKit>;
35016
36400
  /**
35017
36401
  * Edit a kit: `tokens` is merged onto the current kit, `dtcg` replaces the whole document (not both),
35018
36402
  * `logo_asset_id: null` removes the logo. Creatives keep their tokens until `creatives.restyle`. Free.
35019
36403
  */
35020
- update(id: string, body: BrandKitUpdateRequest, opts?: CallOpts$26): Promise<BrandKit>;
36404
+ update(id: string, body: BrandKitUpdateRequest, opts?: CallOpts$27): Promise<BrandKit>;
35021
36405
  /** The kit as a DTCG 2025.10 JSON document (`$extensions['ro.codai']` = kit id, name, logo asset id). Free. */
35022
- exportDtcg(id: string, opts?: CallOpts$26): Promise<BrandKitDtcg>;
36406
+ exportDtcg(id: string, opts?: CallOpts$27): Promise<BrandKitDtcg>;
35023
36407
  /**
35024
36408
  * Extract a brand kit from a public `https` page (`{ url }`) or from one of your logo images
35025
36409
  * (`{ logo_asset_id }`, PNG / JPEG / WebP up to 5 MB; it becomes the kit logo): palette (primary, secondary, accent,
35026
36410
  * background, text) and heading / body fonts. One bounded `codai` model call (token-metered); 400 `url_blocked` for
35027
36411
  * private hosts, 400 `unsupported_media` for a bad logo, 422 `fetch_failed` / `extract_failed`, 504 `timeout`.
35028
36412
  */
35029
- extract(body: BrandKitExtractRequest, opts?: CallOpts$26): Promise<BrandKit>;
36413
+ extract(body: BrandKitExtractRequest, opts?: CallOpts$27): Promise<BrandKit>;
35030
36414
  /** Your brand kits, newest first (`limit` 1–100, default 50). Free. */
35031
36415
  list(query?: {
35032
36416
  limit?: number;
35033
- }, opts?: CallOpts$26): Promise<BrandKitList>;
36417
+ }, opts?: CallOpts$27): Promise<BrandKitList>;
35034
36418
  /** One kit with a signed logo URL (1 h), its `dtcg` and the WCAG `contrast` pairs. Free. */
35035
- retrieve(id: string, opts?: CallOpts$26): Promise<BrandKit>;
36419
+ retrieve(id: string, opts?: CallOpts$27): Promise<BrandKit>;
35036
36420
  /** Delete a kit (creatives keep their tokens; the logo asset stays). Free. */
35037
- delete(id: string, opts?: CallOpts$26): Promise<BrandKitDeleted>;
36421
+ delete(id: string, opts?: CallOpts$27): Promise<BrandKitDeleted>;
35038
36422
  }
35039
36423
  //#endregion
35040
36424
  //#region src/resources/templates.d.ts
@@ -35042,7 +36426,7 @@ export type CreativeTemplateVar = Schema<'CreativeTemplateVar'>;
35042
36426
  export type CreativeTemplateList = Reply<'listCreativeTemplates'>;
35043
36427
  export type CreativeTemplateListQuery = QueryOf<'listCreativeTemplates'>;
35044
36428
  export type CreativeTemplateDeleted = Reply<'deleteCreativeTemplate'>;
35045
- type CallOpts$25 = {
36429
+ type CallOpts$26 = {
35046
36430
  ext?: CodaiRequestExtensions;
35047
36431
  signal?: AbortSignal;
35048
36432
  };
@@ -35055,25 +36439,25 @@ export declare class Templates {
35055
36439
  * (default). `kind` filters both. Without `doc`. Free. A starter id works anywhere a template id does
35056
36440
  * (`retrieve`, `creatives.create({ template })`, batches); starters cannot be deleted.
35057
36441
  */
35058
- list(query?: CreativeTemplateListQuery, opts?: CallOpts$25): Promise<CreativeTemplateList>;
36442
+ list(query?: CreativeTemplateListQuery, opts?: CallOpts$26): Promise<CreativeTemplateList>;
35059
36443
  /** One template with its variables and `doc`. Free. */
35060
- retrieve(id: string, opts?: CallOpts$25): Promise<Schema<'CreativeTemplate'>>;
36444
+ retrieve(id: string, opts?: CallOpts$26): Promise<Schema<'CreativeTemplate'>>;
35061
36445
  /** Delete a template (creatives made from it are not affected). Free. */
35062
- delete(id: string, opts?: CallOpts$25): Promise<CreativeTemplateDeleted>;
36446
+ delete(id: string, opts?: CallOpts$26): Promise<CreativeTemplateDeleted>;
35063
36447
  }
35064
36448
  //#endregion
35065
36449
  //#region src/resources/productions.d.ts
35066
36450
  export type StudioProductionCreate = Mutable<Body<'createStudioProduction'>>;
35067
36451
  export type StudioProduction = Schema<'StudioProduction'>;
35068
- type CallOpts$24 = {
36452
+ type CallOpts$25 = {
35069
36453
  ext?: CodaiRequestExtensions;
35070
36454
  signal?: AbortSignal;
35071
36455
  };
35072
- export interface ProductionCreateOptions extends CallOpts$24 {
36456
+ export interface ProductionCreateOptions extends CallOpts$25 {
35073
36457
  /** `Idempotency-Key`: a retry with the same key replays the first production instead of starting another one. */
35074
36458
  idempotencyKey?: string;
35075
36459
  }
35076
- export interface ProductionWaitOptions extends CallOpts$24 {
36460
+ export interface ProductionWaitOptions extends CallOpts$25 {
35077
36461
  /** Delay between polls (default 5000 ms). */
35078
36462
  intervalMs?: number;
35079
36463
  /** Give up after this long (default 600 000 ms = 10 min). */
@@ -35086,7 +36470,7 @@ export declare class Productions {
35086
36470
  /** `POST /v1/studio/productions` — brief → storyboard → assets → creative → queued draft render (202). */
35087
36471
  create(body: StudioProductionCreate, opts?: ProductionCreateOptions): Promise<StudioProduction>;
35088
36472
  /** `GET /v1/studio/productions/{id}` — advances the production and returns it (another account's id is a 404). */
35089
- retrieve(id: string, opts?: CallOpts$24): Promise<StudioProduction>;
36473
+ retrieve(id: string, opts?: CallOpts$25): Promise<StudioProduction>;
35090
36474
  /**
35091
36475
  * Poll `retrieve` every `intervalMs` (default 5 s) until the production `succeeded` or `failed` (a failed one
35092
36476
  * resolves too — check `status` / `error`). Throws after `timeoutMs` (default 10 min) or when `signal` aborts.
@@ -35096,6 +36480,344 @@ export declare class Productions {
35096
36480
  run(body: StudioProductionCreate, opts?: ProductionCreateOptions & ProductionWaitOptions): Promise<StudioProduction>;
35097
36481
  }
35098
36482
  //#endregion
36483
+ //#region src/resources/media-ops.d.ts
36484
+ export type MediaOpId = Schema<'MediaOpId'>;
36485
+ export type MediaOp = Schema<'MediaOp'>;
36486
+ export type MediaOpList = Reply<'listStudioMediaOps'>;
36487
+ export type MediaOpRequest = Mutable<Schema<'MediaOpRequest'>>;
36488
+ export type MediaOpQuote = Schema<'MediaOpQuote'>;
36489
+ export type MediaOpResult = Schema<'MediaOpResult'>;
36490
+ export type MediaOpJob = Schema<'MediaOpJob'>;
36491
+ type CallOpts$24 = {
36492
+ ext?: CodaiRequestExtensions;
36493
+ signal?: AbortSignal;
36494
+ };
36495
+ export interface MediaOpInput {
36496
+ /** Owned, ready Studio asset ids in the order the op expects (mask second for inpaint / erase). */
36497
+ assetIds?: string[];
36498
+ /** Per-op parameters (validated strictly by the gateway; see the docs table). */
36499
+ params?: Record<string, unknown>;
36500
+ }
36501
+ export interface MediaOpRunOptions extends CallOpts$24 {
36502
+ /** `Idempotency-Key`: a retry with the same key replays the first answer instead of running (and billing) again. */
36503
+ idempotencyKey?: string;
36504
+ }
36505
+ export interface MediaOpWaitOptions extends CallOpts$24 {
36506
+ /** Delay between polls (default 3000 ms). */
36507
+ intervalMs?: number;
36508
+ /** Give up after this long (default 1 200 000 ms = 20 min, the server-side job timeout). */
36509
+ timeoutMs?: number;
36510
+ }
36511
+ /** A run answer is a job (async op, HTTP 202) when `object` is `media_op.job`. */
36512
+ export declare const isMediaOpJob: (r: MediaOpResult | MediaOpJob) => r is MediaOpJob;
36513
+ export declare const isMediaOpJobFinished: (j: Pick<MediaOpJob, "status">) => boolean;
36514
+ export declare class MediaOps {
36515
+ private readonly http;
36516
+ constructor(http: HttpClient);
36517
+ /** `GET /v1/studio/media-ops` — every op with engine, mode, inputs, `available` and a list quote (free). */
36518
+ list(opts?: CallOpts$24): Promise<MediaOpList>;
36519
+ /** `POST /v1/studio/media-ops/{op}/quote` — exact price of this request; nothing is held or billed. */
36520
+ quote(op: MediaOpId | string, input?: MediaOpInput, opts?: CallOpts$24): Promise<MediaOpQuote>;
36521
+ /**
36522
+ * `POST /v1/studio/media-ops/{op}` — sync ops resolve to a `media_op.result` with the outputs, async ops to a
36523
+ * `media_op.job` (`status: pending`; poll with `job` / `wait`). Use `isMediaOpJob` to tell them apart.
36524
+ */
36525
+ run(op: MediaOpId | string, input?: MediaOpInput, opts?: MediaOpRunOptions): Promise<MediaOpResult | MediaOpJob>;
36526
+ /** `GET /v1/studio/media-ops/jobs/{id}` — the job; reading a finished one stores its outputs and bills it once. */
36527
+ job(id: string, opts?: CallOpts$24): Promise<MediaOpJob>;
36528
+ /**
36529
+ * Poll `job` every `intervalMs` (default 3 s) until it is `ready` or `failed` (a failed job resolves too — check
36530
+ * `status` / `error`). Throws after `timeoutMs` (default 20 min) or when `signal` aborts.
36531
+ */
36532
+ wait(id: string, opts?: MediaOpWaitOptions): Promise<MediaOpJob>;
36533
+ /** `run`, then `wait` when the op is async. */
36534
+ runAndWait(op: MediaOpId | string, input?: MediaOpInput, opts?: MediaOpRunOptions & MediaOpWaitOptions): Promise<MediaOpResult | MediaOpJob>;
36535
+ }
36536
+ //#endregion
36537
+ //#region src/resources/lyrics.d.ts
36538
+ export type LyricsRequest = Mutable<Schema<'StudioLyricsRequest'>>;
36539
+ export type LyricsSectionKind = Schema<'StudioLyricsSectionKind'>;
36540
+ export type LyricsLine = Schema<'StudioLyricsLine'>;
36541
+ export type Lyrics = Schema<'StudioLyrics'>;
36542
+ export type LyricsAlignRequest = Mutable<Schema<'StudioLyricsAlignRequest'>>;
36543
+ export type LyricsAlignment = Schema<'StudioLyricsAlignment'>;
36544
+ export interface LyricsCallOptions {
36545
+ ext?: CodaiRequestExtensions;
36546
+ signal?: AbortSignal;
36547
+ /** `Idempotency-Key`: a retry with the same key replays the first answer instead of running (and billing) again. */
36548
+ idempotencyKey?: string;
36549
+ }
36550
+ export declare class LyricsResource {
36551
+ private readonly http;
36552
+ constructor(http: HttpClient);
36553
+ private post;
36554
+ /**
36555
+ * `POST /v1/studio/lyrics` — `{ brief, language: 'ro' | 'en', genre?, mood?, structure?, syllables_per_line?,
36556
+ * rhyme_scheme?, lines_per_section?, title? }` → `studio.lyrics` with every line's syllables and rhyme letter, the
36557
+ * whole song as `text` (`[kind]` headers) and a `report`. `repaired: true` when the repair turn won.
36558
+ */
36559
+ write(body: LyricsRequest, opts?: LyricsCallOptions): Promise<Lyrics>;
36560
+ /**
36561
+ * `POST /v1/studio/lyrics/align` — `{ creative_id, clip_id, lyrics_text, language?, apply?, base_seq?,
36562
+ * retranscribe? }` → `studio.lyrics_alignment`: timed `lines`, `lrc`, `match_ratio`, `cached`, and `seq` /
36563
+ * `doc_hash` of the new version when applied.
36564
+ */
36565
+ align(body: LyricsAlignRequest, opts?: LyricsCallOptions): Promise<LyricsAlignment>;
36566
+ }
36567
+ //#endregion
36568
+ //#region src/resources/realtime.d.ts
36569
+ /**
36570
+ * `wss://…/v1/realtime` — dependency-free realtime client (live transcription and the OpenAI
36571
+ * Realtime protocol lanes). Not an OpenAPI operation (OpenAPI cannot describe WebSockets), so it is
36572
+ * outside the `OPERATION_METHODS` parity table.
36573
+ *
36574
+ * const live = codai.realtime.connect({ model: 'codai-transcribe-live', language: 'ro', token });
36575
+ * live.appendAudio(pcm16At24kHz); // Int16Array | ArrayBuffer | Uint8Array
36576
+ * for await (const ev of live) {
36577
+ * if (ev.type === 'conversation.item.input_audio_transcription.delta') draw(ev.delta);
36578
+ * }
36579
+ *
36580
+ * Uses the global `WebSocket` (browsers, Node ≥ 22, Deno, Bun) or an injected constructor.
36581
+ * - Browser path: pass an ephemeral `token` (scope `realtime` or `live`); it travels as `?key=`.
36582
+ * Raw `codai_` keys in the query string are refused by the gateway (close 4401).
36583
+ * - Server path: pass `apiKey` (or a token) with a WebSocket constructor that accepts headers
36584
+ * (e.g. `ws`); it is sent as `Authorization: Bearer` on the upgrade.
36585
+ */
36586
+ /** Minimal WebSocket surface (browser `WebSocket`, Node 22 global, or the `ws` package). */
36587
+ export interface RealtimeSocket {
36588
+ readonly readyState: number;
36589
+ binaryType?: string;
36590
+ send(data: string | ArrayBuffer | ArrayBufferView): void;
36591
+ close(code?: number, reason?: string): void;
36592
+ onopen: ((ev: unknown) => void) | null;
36593
+ onmessage: ((ev: {
36594
+ data: unknown;
36595
+ }) => void) | null;
36596
+ onclose: ((ev: {
36597
+ code: number;
36598
+ reason: string;
36599
+ }) => void) | null;
36600
+ onerror: ((ev: unknown) => void) | null;
36601
+ }
36602
+ /** `new (url, protocols?, options?)` — the third argument is used for headers by `ws`. */
36603
+ export type RealtimeSocketCtor = new (url: string, protocols?: string | string[], options?: {
36604
+ headers?: Record<string, string>;
36605
+ }) => RealtimeSocket;
36606
+ export type RealtimeModel = 'codai-transcribe-live' | 'codai-realtime' | 'codai-voice' | (string & Record<never, never>);
36607
+ export interface RealtimeConnectOptions {
36608
+ /** Default `codai-transcribe-live`. */
36609
+ model?: RealtimeModel;
36610
+ /** Language hint (`ro`, `en`, …). `ro` uses the Deepgram Nova-3 lane when the gateway has it. */
36611
+ language?: string;
36612
+ /** Ephemeral token (scope `realtime` or `live`) — sent as `?key=`. Required in browsers. */
36613
+ token?: string;
36614
+ /** Raw API key — sent as `Authorization: Bearer` (needs a ctor that supports headers). */
36615
+ apiKey?: string;
36616
+ /** Conversation id recorded on the usage row (`?session_id=`). */
36617
+ sessionId?: string;
36618
+ /**
36619
+ * First frame sent on open. Default for `codai-transcribe-live`: a transcription
36620
+ * `session.update` (PCM 24 kHz, `language` when set). Pass `null` to send nothing.
36621
+ */
36622
+ sessionUpdate?: Record<string, unknown> | null;
36623
+ /** Injectable WebSocket constructor (tests, `ws` on older Node). Defaults to `globalThis.WebSocket`. */
36624
+ WebSocket?: RealtimeSocketCtor;
36625
+ /** Override the gateway base URL (default: the client's `baseUrl`). */
36626
+ baseUrl?: string;
36627
+ }
36628
+ /** Typed subset of server events; anything else arrives as `RealtimeUnknownEvent`. */
36629
+ export type RealtimeEvent = {
36630
+ type: 'session.created' | 'session.updated';
36631
+ session?: Record<string, unknown>;
36632
+ event_id?: string;
36633
+ } | {
36634
+ type: 'conversation.item.input_audio_transcription.delta';
36635
+ item_id: string;
36636
+ content_index?: number;
36637
+ delta: string;
36638
+ event_id?: string;
36639
+ } | {
36640
+ type: 'conversation.item.input_audio_transcription.completed';
36641
+ item_id: string;
36642
+ content_index?: number;
36643
+ transcript: string;
36644
+ event_id?: string;
36645
+ } | {
36646
+ type: 'input_audio_buffer.committed';
36647
+ item_id?: string;
36648
+ previous_item_id?: string | null;
36649
+ } | {
36650
+ type: 'input_audio_buffer.cleared';
36651
+ } | {
36652
+ type: 'error';
36653
+ error: {
36654
+ type?: string;
36655
+ code?: string;
36656
+ message?: string;
36657
+ };
36658
+ } |
36659
+ /** Emitted by the client itself when the socket closes (always the last event). */
36660
+ {
36661
+ type: 'close';
36662
+ code: number;
36663
+ reason: string;
36664
+ };
36665
+ export type RealtimeUnknownEvent = {
36666
+ type: string;
36667
+ [k: string]: unknown;
36668
+ };
36669
+ export type RealtimeAnyEvent = RealtimeEvent | RealtimeUnknownEvent;
36670
+ type Listener$1 = (ev: RealtimeAnyEvent) => void;
36671
+ /** A live realtime session: async-iterable of events + `on()` listeners. */
36672
+ export declare class RealtimeSession implements AsyncIterable<RealtimeAnyEvent> {
36673
+ readonly socket: RealtimeSocket;
36674
+ private readonly listeners;
36675
+ private readonly queue;
36676
+ private readonly waiters;
36677
+ private readonly outbox;
36678
+ private closed;
36679
+ /** Resolves when the socket is open (rejects if it closes first). */
36680
+ readonly ready: Promise<void>;
36681
+ constructor(socket: RealtimeSocket, firstFrame: Record<string, unknown> | null);
36682
+ /** Listen for one event type (`'*'` = every event). Returns an unsubscribe function. */
36683
+ on(type: string, fn: Listener$1): () => void;
36684
+ /** Send any client event (JSON). Queued until the socket opens. */
36685
+ send(event: Record<string, unknown>): void;
36686
+ /** Append PCM16 little-endian mono audio (24 kHz for `codai-transcribe-live`). */
36687
+ appendAudio(audio: Int16Array | ArrayBuffer | Uint8Array): void;
36688
+ /** Close the current utterance: the server answers with one `...transcription.completed`. */
36689
+ commit(): void;
36690
+ /** Drop audio the server holds for the current utterance. */
36691
+ clear(): void;
36692
+ close(code?: number, reason?: string): void;
36693
+ [Symbol.asyncIterator](): AsyncIterator<RealtimeAnyEvent>;
36694
+ private emit;
36695
+ }
36696
+ /** Build the `wss://…/v1/realtime?…` URL (exported for tests and custom transports). */
36697
+ export declare function realtimeUrl(baseUrl: string, opts: RealtimeConnectOptions): string;
36698
+ export declare class Realtime {
36699
+ private readonly defaults;
36700
+ constructor(defaults: {
36701
+ baseUrl: string;
36702
+ apiKey?: string;
36703
+ });
36704
+ /** Open a realtime session. Returns immediately; `await session.ready` to wait for the socket. */
36705
+ connect(opts?: RealtimeConnectOptions): RealtimeSession;
36706
+ }
36707
+ //#endregion
36708
+ //#region src/resources/jam.d.ts
36709
+ export declare const JAM_SUBPROTOCOL = "codai-jam";
36710
+ /** WebSocket close codes of `/v1/studio/jam`. */
36711
+ export declare const JAM_CLOSE_CODES: {
36712
+ readonly invalidMessage: 4400;
36713
+ readonly unauthorized: 4401;
36714
+ readonly insufficientFunds: 4402;
36715
+ readonly forbidden: 4403;
36716
+ readonly maxDuration: 4408;
36717
+ readonly busy: 4409;
36718
+ readonly upstream: 4502;
36719
+ readonly unavailable: 4503;
36720
+ };
36721
+ 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"];
36722
+ export type JamScale = (typeof JAM_SCALES)[number];
36723
+ /** A weighted prompt: 1..8 per message, `weight` in [-10, 10] and not 0. */
36724
+ export interface JamPrompt {
36725
+ text: string;
36726
+ weight: number;
36727
+ }
36728
+ /** Partial config; the server merges it into the last full config. bpm / scale changes reset the context. */
36729
+ export interface JamConfig {
36730
+ bpm?: number;
36731
+ density?: number;
36732
+ brightness?: number;
36733
+ scale?: JamScale;
36734
+ }
36735
+ export type JamClientMessage = {
36736
+ type: 'prompts';
36737
+ prompts: JamPrompt[];
36738
+ } | ({
36739
+ type: 'config';
36740
+ } & JamConfig) | {
36741
+ type: 'play' | 'pause' | 'stop' | 'reset';
36742
+ };
36743
+ export type JamState = 'connecting' | 'ready' | 'playing' | 'paused' | 'stopped' | (string & Record<never, never>);
36744
+ export type JamEvent = {
36745
+ type: 'status';
36746
+ state: JamState;
36747
+ remaining_ms: number;
36748
+ sample_rate?: number;
36749
+ channels?: number;
36750
+ } | {
36751
+ type: 'filtered';
36752
+ text: string;
36753
+ reason: string;
36754
+ } | {
36755
+ type: 'error';
36756
+ code: string;
36757
+ message: string;
36758
+ } |
36759
+ /** Emitted by the client for every binary frame. */
36760
+ {
36761
+ type: 'audio';
36762
+ data: ArrayBuffer;
36763
+ } |
36764
+ /** Emitted by the client itself when the socket closes (always the last event). */
36765
+ {
36766
+ type: 'close';
36767
+ code: number;
36768
+ reason: string;
36769
+ };
36770
+ export interface JamConnectOptions {
36771
+ /** Ephemeral token (scope `realtime` or `live`) — sent as the `bearer.<token>` subprotocol. Required in browsers. */
36772
+ token?: string;
36773
+ /** API key — sent as `Authorization: Bearer` (needs a ctor that supports headers). */
36774
+ apiKey?: string;
36775
+ /** Conversation id recorded on the usage row (`?session_id=`). */
36776
+ sessionId?: string;
36777
+ /** Injectable WebSocket constructor (tests, `ws` on older Node). Defaults to `globalThis.WebSocket`. */
36778
+ WebSocket?: RealtimeSocketCtor;
36779
+ /** Override the gateway base URL (default: the client's `baseUrl`). */
36780
+ baseUrl?: string;
36781
+ }
36782
+ type Listener<T extends JamEvent['type']> = (ev: Extract<JamEvent, {
36783
+ type: T;
36784
+ }>) => void;
36785
+ type AnyListener = (ev: JamEvent) => void;
36786
+ /** A live jam session: `on()` listeners for status / audio / errors and typed senders. */
36787
+ export declare class JamSession {
36788
+ readonly socket: RealtimeSocket;
36789
+ private readonly listeners;
36790
+ private readonly outbox;
36791
+ private closed;
36792
+ /** Resolves when the socket is open (rejects if it closes first). */
36793
+ readonly ready: Promise<void>;
36794
+ constructor(socket: RealtimeSocket);
36795
+ /** Listen for one event type (`'*'` = every event). Returns an unsubscribe function. */
36796
+ on<T extends JamEvent['type']>(type: T, fn: Listener<T>): () => void;
36797
+ on(type: '*', fn: AnyListener): () => void;
36798
+ /** Send one client message (JSON). Queued until the socket opens. */
36799
+ send(msg: JamClientMessage): void;
36800
+ prompts(prompts: JamPrompt[]): void;
36801
+ config(config: JamConfig): void;
36802
+ play(): void;
36803
+ pause(): void;
36804
+ stop(): void;
36805
+ reset(): void;
36806
+ close(code?: number, reason?: string): void;
36807
+ private emit;
36808
+ }
36809
+ /** Build the `wss://…/v1/studio/jam` URL (exported for tests and custom transports). */
36810
+ export declare function jamUrl(baseUrl: string, opts?: Pick<JamConnectOptions, 'sessionId'>): string;
36811
+ export declare class Jam {
36812
+ private readonly defaults;
36813
+ constructor(defaults: {
36814
+ baseUrl: string;
36815
+ apiKey?: string;
36816
+ });
36817
+ /** Open a live jam. Returns immediately; `await session.ready` to wait for the socket. */
36818
+ connect(opts?: JamConnectOptions): JamSession;
36819
+ }
36820
+ //#endregion
35099
36821
  //#region src/resources/batches.d.ts
35100
36822
  export type StudioBatchStatus = Schema<'StudioBatchStatus'>;
35101
36823
  export type StudioBatchRowStatus = Schema<'StudioBatchRowStatus'>;
@@ -35246,6 +36968,20 @@ export type VaultUseRequest = Mutable<Body<'vaultUse'>>;
35246
36968
  export type VaultHttpRequest = Mutable<Body<'vaultHttp'>>;
35247
36969
  export type VaultResolveRequest = Mutable<Body<'vaultResolve'>>;
35248
36970
  export type VaultTier = VaultAccount['default_tier'];
36971
+ /** Anomaly guards (V-32): new host, burst, allowed hours. An anomaly forces t4. */
36972
+ export type VaultGuards = Schema<'VaultGuards'>;
36973
+ export type VaultSettingsPatch = Mutable<Body<'patchVaultSettings'>>;
36974
+ export type VaultSettings = Reply<'patchVaultSettings'>;
36975
+ export type VaultLockResult = Schema<'VaultLockResult'>;
36976
+ export type VaultUnlockChallenge = Schema<'VaultUnlockChallenge'>;
36977
+ export type VaultUnlockRequest = Mutable<Body<'unlockVault'>>;
36978
+ /** Per-handle limits (V-21); an `http` use costs 2 units, other modes 1. */
36979
+ export type VaultItemLimits = Schema<'VaultItemLimits'>;
36980
+ export type VaultItemLimitsInput = Mutable<Body<'setVaultItemLimits'>>;
36981
+ /** Where a lock/unlock was triggered from. */
36982
+ export type VaultVia = 'hub' | 'desktop' | 'phone' | 'wear' | 'extension';
36983
+ /** The UTF-8 message an unlock proof covers: `codai-vault/unlock/v1|<challenge>|<device_id or "passkey">`. */
36984
+ export declare function vaultUnlockMessage(challenge: string, deviceIdOrPasskey: string): string;
35249
36985
  /** Loose JSON object answers (lists, acks) as documented in the OpenAPI spec. */
35250
36986
  export type VaultObject = Record<string, unknown>;
35251
36987
  type CallOpts$21 = {
@@ -35279,6 +37015,32 @@ export declare class Vault {
35279
37015
  putAccount(body: VaultAccountPut, opts?: CallOpts$21): Promise<VaultObject>;
35280
37016
  /** `PATCH /v1/vault/settings` — default approval tier for items without a matching rule. */
35281
37017
  setDefaultTier(defaultTier: VaultTier, opts?: CallOpts$21): Promise<VaultObject>;
37018
+ /**
37019
+ * `PATCH /v1/vault/settings` — `default_tier` and/or partial anomaly `guards` (merged over the current ones).
37020
+ * Answers the effective `{ default_tier, guards }`.
37021
+ */
37022
+ updateSettings(body: VaultSettingsPatch, opts?: CallOpts$21): Promise<VaultSettings>;
37023
+ /**
37024
+ * `POST /v1/vault/lock` — panic: revoke every live grant, deny every pending approval, lock the vault (agent uses
37025
+ * then answer `vault_locked`). Device keys stay enrolled. Idempotent.
37026
+ */
37027
+ lock(params?: {
37028
+ via?: VaultVia;
37029
+ }, opts?: CallOpts$21): Promise<VaultLockResult>;
37030
+ /** `POST /v1/vault/unlock/challenge` — single-use unlock challenge, valid 5 minutes. */
37031
+ unlockChallenge(opts?: CallOpts$21): Promise<VaultUnlockChallenge>;
37032
+ /**
37033
+ * `POST /v1/vault/unlock` — end a lock with a device-key proof over {@link vaultUnlockMessage} or a passkey whose
37034
+ * challenge is base64url(SHA-256(that message with `passkey`)). 403 `challenge_invalid`, `wear_t3_only`, …
37035
+ */
37036
+ unlock(body: VaultUnlockRequest, opts?: CallOpts$21): Promise<Reply<'unlockVault'>>;
37037
+ /** `GET /v1/vault/limits` — per-handle usage caps on your items. */
37038
+ limits(opts?: CallOpts$21): Promise<VaultItemLimits[]>;
37039
+ /**
37040
+ * `PUT /v1/vault/items/{id}/limits` — all three keys required; `null` removes a cap, all `null` removes the limits
37041
+ * (answers `null`). Over a cap the broker calls answer 429 `vault_rate_limited` with `Retry-After`.
37042
+ */
37043
+ setLimits(id: string, limits: VaultItemLimitsInput, opts?: CallOpts$21): Promise<VaultItemLimits | null>;
35282
37044
  /** `GET /v1/vault/vaults` — vaults you belong to, with your role and sealed vault key. */
35283
37045
  vaults(opts?: CallOpts$21): Promise<VaultObject>;
35284
37046
  /** `POST /v1/vault/vaults` — register a vault created client-side (HTTP 201). */
@@ -35301,6 +37063,8 @@ export declare class Vault {
35301
37063
  grants(opts?: CallOpts$21): Promise<VaultObject>;
35302
37064
  /** `DELETE /v1/vault/grants/{id}` — revoke a grant immediately. */
35303
37065
  revokeGrant(id: string, opts?: CallOpts$21): Promise<VaultObject>;
37066
+ /** `POST /v1/vault/grants/revoke-task` — revoke every live grant of a task / session; answers `{ revoked }`. */
37067
+ revokeTaskGrants(task: string, opts?: CallOpts$21): Promise<Reply<'revokeVaultTaskGrants'>>;
35304
37068
  /** `GET /v1/vault/events` — append-only audit log (never contains secret values). */
35305
37069
  events(params?: QueryOf<'listVaultEvents'>, opts?: CallOpts$21): Promise<VaultObject>;
35306
37070
  /** `GET /v1/vault/approvals` — agent requests waiting for your decision. */
@@ -35475,146 +37239,6 @@ export declare class Projects {
35475
37239
  delete(projectId: string, opts?: CallOpts$19): Promise<Reply<'deleteProject'>>;
35476
37240
  }
35477
37241
  //#endregion
35478
- //#region src/resources/realtime.d.ts
35479
- /**
35480
- * `wss://…/v1/realtime` — dependency-free realtime client (live transcription and the OpenAI
35481
- * Realtime protocol lanes). Not an OpenAPI operation (OpenAPI cannot describe WebSockets), so it is
35482
- * outside the `OPERATION_METHODS` parity table.
35483
- *
35484
- * const live = codai.realtime.connect({ model: 'codai-transcribe-live', language: 'ro', token });
35485
- * live.appendAudio(pcm16At24kHz); // Int16Array | ArrayBuffer | Uint8Array
35486
- * for await (const ev of live) {
35487
- * if (ev.type === 'conversation.item.input_audio_transcription.delta') draw(ev.delta);
35488
- * }
35489
- *
35490
- * Uses the global `WebSocket` (browsers, Node ≥ 22, Deno, Bun) or an injected constructor.
35491
- * - Browser path: pass an ephemeral `token` (scope `realtime` or `live`); it travels as `?key=`.
35492
- * Raw `codai_` keys in the query string are refused by the gateway (close 4401).
35493
- * - Server path: pass `apiKey` (or a token) with a WebSocket constructor that accepts headers
35494
- * (e.g. `ws`); it is sent as `Authorization: Bearer` on the upgrade.
35495
- */
35496
- /** Minimal WebSocket surface (browser `WebSocket`, Node 22 global, or the `ws` package). */
35497
- export interface RealtimeSocket {
35498
- readonly readyState: number;
35499
- binaryType?: string;
35500
- send(data: string | ArrayBuffer | ArrayBufferView): void;
35501
- close(code?: number, reason?: string): void;
35502
- onopen: ((ev: unknown) => void) | null;
35503
- onmessage: ((ev: {
35504
- data: unknown;
35505
- }) => void) | null;
35506
- onclose: ((ev: {
35507
- code: number;
35508
- reason: string;
35509
- }) => void) | null;
35510
- onerror: ((ev: unknown) => void) | null;
35511
- }
35512
- /** `new (url, protocols?, options?)` — the third argument is used for headers by `ws`. */
35513
- export type RealtimeSocketCtor = new (url: string, protocols?: string | string[], options?: {
35514
- headers?: Record<string, string>;
35515
- }) => RealtimeSocket;
35516
- export type RealtimeModel = 'codai-transcribe-live' | 'codai-realtime' | 'codai-voice' | (string & Record<never, never>);
35517
- export interface RealtimeConnectOptions {
35518
- /** Default `codai-transcribe-live`. */
35519
- model?: RealtimeModel;
35520
- /** Language hint (`ro`, `en`, …). `ro` uses the Deepgram Nova-3 lane when the gateway has it. */
35521
- language?: string;
35522
- /** Ephemeral token (scope `realtime` or `live`) — sent as `?key=`. Required in browsers. */
35523
- token?: string;
35524
- /** Raw API key — sent as `Authorization: Bearer` (needs a ctor that supports headers). */
35525
- apiKey?: string;
35526
- /** Conversation id recorded on the usage row (`?session_id=`). */
35527
- sessionId?: string;
35528
- /**
35529
- * First frame sent on open. Default for `codai-transcribe-live`: a transcription
35530
- * `session.update` (PCM 24 kHz, `language` when set). Pass `null` to send nothing.
35531
- */
35532
- sessionUpdate?: Record<string, unknown> | null;
35533
- /** Injectable WebSocket constructor (tests, `ws` on older Node). Defaults to `globalThis.WebSocket`. */
35534
- WebSocket?: RealtimeSocketCtor;
35535
- /** Override the gateway base URL (default: the client's `baseUrl`). */
35536
- baseUrl?: string;
35537
- }
35538
- /** Typed subset of server events; anything else arrives as `RealtimeUnknownEvent`. */
35539
- export type RealtimeEvent = {
35540
- type: 'session.created' | 'session.updated';
35541
- session?: Record<string, unknown>;
35542
- event_id?: string;
35543
- } | {
35544
- type: 'conversation.item.input_audio_transcription.delta';
35545
- item_id: string;
35546
- content_index?: number;
35547
- delta: string;
35548
- event_id?: string;
35549
- } | {
35550
- type: 'conversation.item.input_audio_transcription.completed';
35551
- item_id: string;
35552
- content_index?: number;
35553
- transcript: string;
35554
- event_id?: string;
35555
- } | {
35556
- type: 'input_audio_buffer.committed';
35557
- item_id?: string;
35558
- previous_item_id?: string | null;
35559
- } | {
35560
- type: 'input_audio_buffer.cleared';
35561
- } | {
35562
- type: 'error';
35563
- error: {
35564
- type?: string;
35565
- code?: string;
35566
- message?: string;
35567
- };
35568
- } |
35569
- /** Emitted by the client itself when the socket closes (always the last event). */
35570
- {
35571
- type: 'close';
35572
- code: number;
35573
- reason: string;
35574
- };
35575
- export type RealtimeUnknownEvent = {
35576
- type: string;
35577
- [k: string]: unknown;
35578
- };
35579
- export type RealtimeAnyEvent = RealtimeEvent | RealtimeUnknownEvent;
35580
- type Listener = (ev: RealtimeAnyEvent) => void;
35581
- /** A live realtime session: async-iterable of events + `on()` listeners. */
35582
- export declare class RealtimeSession implements AsyncIterable<RealtimeAnyEvent> {
35583
- readonly socket: RealtimeSocket;
35584
- private readonly listeners;
35585
- private readonly queue;
35586
- private readonly waiters;
35587
- private readonly outbox;
35588
- private closed;
35589
- /** Resolves when the socket is open (rejects if it closes first). */
35590
- readonly ready: Promise<void>;
35591
- constructor(socket: RealtimeSocket, firstFrame: Record<string, unknown> | null);
35592
- /** Listen for one event type (`'*'` = every event). Returns an unsubscribe function. */
35593
- on(type: string, fn: Listener): () => void;
35594
- /** Send any client event (JSON). Queued until the socket opens. */
35595
- send(event: Record<string, unknown>): void;
35596
- /** Append PCM16 little-endian mono audio (24 kHz for `codai-transcribe-live`). */
35597
- appendAudio(audio: Int16Array | ArrayBuffer | Uint8Array): void;
35598
- /** Close the current utterance: the server answers with one `...transcription.completed`. */
35599
- commit(): void;
35600
- /** Drop audio the server holds for the current utterance. */
35601
- clear(): void;
35602
- close(code?: number, reason?: string): void;
35603
- [Symbol.asyncIterator](): AsyncIterator<RealtimeAnyEvent>;
35604
- private emit;
35605
- }
35606
- /** Build the `wss://…/v1/realtime?…` URL (exported for tests and custom transports). */
35607
- export declare function realtimeUrl(baseUrl: string, opts: RealtimeConnectOptions): string;
35608
- export declare class Realtime {
35609
- private readonly defaults;
35610
- constructor(defaults: {
35611
- baseUrl: string;
35612
- apiKey?: string;
35613
- });
35614
- /** Open a realtime session. Returns immediately; `await session.ready` to wait for the socket. */
35615
- connect(opts?: RealtimeConnectOptions): RealtimeSession;
35616
- }
35617
- //#endregion
35618
37242
  //#region src/resources/referrals.d.ts
35619
37243
  export type ReferralsView = Reply<'getReferrals'>;
35620
37244
  export type ReferralRow = Schema<'ReferralRow'>;
@@ -38004,6 +39628,11 @@ export interface AppKeyMintInput {
38004
39628
  maxOutputTokens?: number;
38005
39629
  /** ISO 8601 with offset, in the future. Omit = never expires. */
38006
39630
  expiresAt?: string;
39631
+ /**
39632
+ * The end user confirmed being 18 or older in your app. Stored on the codai user when it is
39633
+ * CREATED by this call (`users.adult_confirmed_at`, version `host:<app slug>`).
39634
+ */
39635
+ adultConfirmed?: boolean;
38007
39636
  }
38008
39637
  export interface AppKeyMinted {
38009
39638
  id: string;
@@ -38146,6 +39775,8 @@ export interface AppSubscriptionSyncInput {
38146
39775
  object?: unknown;
38147
39776
  };
38148
39777
  };
39778
+ /** The end user confirmed being 18 or older (stored when the codai user is created by this sync). */
39779
+ adultConfirmed?: boolean;
38149
39780
  }
38150
39781
  export interface AppKeyValidation {
38151
39782
  ok: boolean;
@@ -38321,6 +39952,12 @@ export declare class Codai {
38321
39952
  readonly templates: Templates;
38322
39953
  /** codai Studio productions (`productions.run({ brief, language: 'ro' })` → a finished promo video + editable creative). */
38323
39954
  readonly productions: Productions;
39955
+ /** codai Studio media operations (`mediaOps.run('audio.separate_stems', { assetIds })` → job; `mediaOps.wait(id)`). */
39956
+ readonly mediaOps: MediaOps;
39957
+ /** codai Studio lyrics (`lyrics.write({ brief, language: 'ro' })`, `lyrics.align({ creative_id, clip_id, lyrics_text })`). */
39958
+ readonly lyrics: LyricsResource;
39959
+ /** codai Studio live jam over WebSocket (`jam.connect({ token })` → PCM16 48 kHz stereo; `prompts`, `config`, `play`). */
39960
+ readonly jam: Jam;
38324
39961
  /** codai Studio FCPXML exports (`creatives.exportFcpxml(id)` queues one; `exports.wait(id)` polls until the zip is ready). */
38325
39962
  readonly exports: Exports;
38326
39963
  /** codai Studio batches (`batches.create({ source: { template_id }, csv })` → one creative per row; `batches.wait(id)`). */