@teinai/cli 1.1.32 → 1.1.33

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.
Files changed (2) hide show
  1. package/index.js +36 -42
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -6827,7 +6827,9 @@ function bi(e) {
6827
6827
  i = e.sourceFramedModes?.length
6828
6828
  ? ` Not taken by ${e.sourceFramedModes.join(', ')}: the source image sets the frame.`
6829
6829
  : '',
6830
- n = [
6830
+ n = e.modeRequired ? void 0 : e.modes[0],
6831
+ s = n != null && e.sourceFramedModes?.includes(n),
6832
+ o = [
6831
6833
  {
6832
6834
  name: 'duration',
6833
6835
  type: t.allowed ? 'select' : 'slider',
@@ -6847,70 +6849,70 @@ function bi(e) {
6847
6849
  {
6848
6850
  name: 'aspect_ratio',
6849
6851
  type: 'select',
6850
- default: e.aspects[0],
6852
+ ...(s ? {} : { default: e.aspects[0] }),
6851
6853
  options: [...e.aspects, ...(e.adaptiveModes?.length ? ['adaptive'] : [])],
6852
6854
  description: `The frame.${e.adaptiveModes?.length ? ` adaptive: ${e.adaptiveModes.join(', ')} only.` : ''}${i}`,
6853
6855
  },
6854
6856
  ];
6855
6857
  if (
6856
6858
  (e.audio === 'priced'
6857
- ? n.push({
6859
+ ? o.push({
6858
6860
  name: 'generate_audio',
6859
6861
  type: 'boolean',
6860
6862
  default: !1,
6861
6863
  description: 'Add sound. Clips with sound are billed at the higher rate.',
6862
6864
  })
6863
6865
  : e.audio === 'free' &&
6864
- n.push({
6866
+ o.push({
6865
6867
  name: 'generate_audio',
6866
6868
  type: 'boolean',
6867
6869
  default: !0,
6868
6870
  description: 'Add sound. Same price on or off.',
6869
6871
  }),
6870
6872
  e.reference?.maxImages &&
6871
- n.push({
6873
+ o.push({
6872
6874
  name: 'images',
6873
6875
  type: 'string[]',
6874
6876
  description: `multi_reference: up to ${e.reference.maxImages} reference images.${e.referenceHandles ? ' In the prompt, name them @Image1, @Image2, ... in this order.' : ''} ${L}`,
6875
6877
  }),
6876
6878
  (e.modes.includes('image_to_video') || e.modes.includes('first_n_last_frames')) &&
6877
- n.push({
6879
+ o.push({
6878
6880
  name: 'first_frame_image',
6879
6881
  type: 'string',
6880
6882
  description: `The start frame (image_to_video, first_n_last_frames), ${L}`,
6881
6883
  }),
6882
6884
  (e.lastFrameOnImageToVideo || e.modes.includes('first_n_last_frames')) &&
6883
- n.push({
6885
+ o.push({
6884
6886
  name: 'last_frame_image',
6885
6887
  type: 'string',
6886
6888
  description: `Last frame (optional on image_to_video), ${L}`,
6887
6889
  }),
6888
6890
  e.reference?.maxVideos)
6889
6891
  ) {
6890
- let s = e.reference,
6891
- o = e.videoInputBilling
6892
+ let u = e.reference,
6893
+ l = e.videoInputBilling
6892
6894
  ? ` Billed as input plus output seconds${e.videoInputBilling.minOutputMultiple > 1 ? `, at least ${e.videoInputBilling.minOutputMultiple}x the output` : ''}.`
6893
6895
  : '';
6894
- n.push({
6896
+ o.push({
6895
6897
  name: 'videos',
6896
6898
  type: 'string[]',
6897
- description: `multi_reference: up to ${s.maxVideos} reference videos${s.maxVideoSeconds ? `, ${s.maxVideoSeconds} s in all` : ''}.${e.referenceHandles ? ' In the prompt, name them @Video1, @Video2, ... in this order.' : ''}${o} ${L}`,
6899
+ description: `multi_reference: up to ${u.maxVideos} reference videos${u.maxVideoSeconds ? `, ${u.maxVideoSeconds} s in all` : ''}.${e.referenceHandles ? ' In the prompt, name them @Video1, @Video2, ... in this order.' : ''}${l} ${L}`,
6898
6900
  });
6899
6901
  }
6900
6902
  if (e.reference?.maxAudios) {
6901
- let s = e.reference,
6902
- o = s.audioClipSeconds
6903
- ? `, each ${s.audioClipSeconds.min} to ${s.audioClipSeconds.max} s`
6904
- : s.maxAudioSeconds
6905
- ? `, ${s.maxAudioSeconds} s in all`
6903
+ let u = e.reference,
6904
+ l = u.audioClipSeconds
6905
+ ? `, each ${u.audioClipSeconds.min} to ${u.audioClipSeconds.max} s`
6906
+ : u.maxAudioSeconds
6907
+ ? `, ${u.maxAudioSeconds} s in all`
6906
6908
  : '';
6907
- n.push({
6909
+ o.push({
6908
6910
  name: 'audios',
6909
6911
  type: 'string[]',
6910
- description: `multi_reference: up to ${s.maxAudios} reference audios${o}, with at least one image or video. ${L}`,
6912
+ description: `multi_reference: up to ${u.maxAudios} reference audios${l}, with at least one image or video. ${L}`,
6911
6913
  });
6912
6914
  }
6913
- return n;
6915
+ return o;
6914
6916
  }
6915
6917
  function ki(e) {
6916
6918
  let t = Object.keys(e.sizes);
@@ -8156,7 +8158,6 @@ var _i,
8156
8158
  (Ye = {
8157
8159
  name: 'auto_fit_images',
8158
8160
  type: 'boolean',
8159
- default: !1,
8160
8161
  description:
8161
8162
  'Fits a reference image whose aspect ratio (width / height) is outside 0.40-2.50 just inside it: a slight stretch, or the image on a blurred copy of itself, never cropped. Off: such an image is refused with a 422. First and last frames are never changed. Same price.',
8162
8163
  }),
@@ -8769,7 +8770,7 @@ function Kr() {
8769
8770
  n = {
8770
8771
  name: 'generate_image',
8771
8772
  description:
8772
- 'Generate or edit images with Tein AI image models (GPT Image 2 and 2.5, Nano Banana 2 and Pro, Seedream 5.5 and 5.0 Pro, Qwen Image 3.0, Hailuo 3 Image). Billed per image at the published price.',
8773
+ "Generate or edit images with Tein AI image models (GPT Image 2 and 2.5, Nano Banana 2 and Pro, Seedream 5.5 and 5.0 Pro, Qwen Image 3.0, Hailuo 3 Image). Billed per image at the published price. A field left out takes the chosen model's own default (see its own tool); send only the fields that model takes.",
8773
8774
  inputSchema: {
8774
8775
  type: 'object',
8775
8776
  properties: {
@@ -8791,8 +8792,8 @@ function Kr() {
8791
8792
  resolution: {
8792
8793
  type: 'string',
8793
8794
  enum: ['1K', '2K', '4K'],
8794
- default: '1K',
8795
- description: 'Output resolution (1K, 2K, or 4K where supported).',
8795
+ description:
8796
+ "Output resolution (1K, 2K, or 4K where supported). Left out: the model's own default.",
8796
8797
  },
8797
8798
  images: {
8798
8799
  type: 'array',
@@ -8803,20 +8804,17 @@ function Kr() {
8803
8804
  endpoint: {
8804
8805
  type: 'string',
8805
8806
  enum: ['dynamic', 'token', 'flat', 'medium'],
8806
- default: 'dynamic',
8807
8807
  description:
8808
8808
  'GPT Image models only. dynamic: lowest price for this request; token: billed by tokens within published limits; flat: one price at any quality or prompt length; medium: gpt-image-2 only, medium quality at one price for any resolution (non-square ratios at 1K only).',
8809
8809
  },
8810
8810
  quality: {
8811
8811
  type: 'string',
8812
8812
  enum: ['low', 'medium', 'high', 'xhigh', 'max'],
8813
- default: 'low',
8814
8813
  description:
8815
8814
  'GPT Image models only. gpt-image-2 supports low, medium and high; the 2.5 models also xhigh and max.',
8816
8815
  },
8817
8816
  n: {
8818
8817
  type: 'number',
8819
- default: 1,
8820
8818
  minimum: 1,
8821
8819
  maximum: 10,
8822
8820
  description:
@@ -8825,7 +8823,6 @@ function Kr() {
8825
8823
  output_format: {
8826
8824
  type: 'string',
8827
8825
  enum: ['png', 'jpeg', 'webp'],
8828
- default: 'png',
8829
8826
  description:
8830
8827
  'GPT Image 2 and Nano Banana. jpeg and webp on GPT Image take output_compression.',
8831
8828
  },
@@ -8838,7 +8835,6 @@ function Kr() {
8838
8835
  background: {
8839
8836
  type: 'string',
8840
8837
  enum: ['auto', 'opaque', 'transparent'],
8841
- default: 'auto',
8842
8838
  description: 'GPT Image 2 only. transparent asks for no backdrop.',
8843
8839
  },
8844
8840
  input_fidelity: {
@@ -8857,7 +8853,7 @@ function Kr() {
8857
8853
  maximum: 2147483647,
8858
8854
  description: 'Nano Banana 2 and Nano Banana Pro. Omit it for a new image each time.',
8859
8855
  },
8860
- creative_mode: { type: 'boolean', default: !1, description: Pa('image') },
8856
+ creative_mode: { type: 'boolean', description: Pa('image') },
8861
8857
  },
8862
8858
  required: ['prompt'],
8863
8859
  additionalProperties: !0,
@@ -8866,14 +8862,14 @@ function Kr() {
8866
8862
  s = {
8867
8863
  name: 'generate_video',
8868
8864
  description:
8869
- 'Generate video with Tein AI video models (Seedance 2.5, Seedance 2.0 with quality standard, fast or mini, Wan 3.0, HappyHorse, Hailuo 3). Seedance and Wan take creative_mode; Seedance takes priority.',
8865
+ "Generate video with Tein AI video models (Seedance 2.5, Seedance 2.0 with quality standard, fast or mini, Wan 3.0, HappyHorse, Hailuo 3). Seedance and Wan take creative_mode; Seedance takes priority. A field left out takes the chosen model's own default (see its own tool); send only the fields that model takes. A model that takes no prompt (Tein Video Upscaler) is called without one.",
8870
8866
  inputSchema: {
8871
8867
  type: 'object',
8872
8868
  properties: {
8873
8869
  prompt: {
8874
8870
  type: 'string',
8875
8871
  description:
8876
- 'Detailed description of the video scene, character motion, lighting, and camera movement.',
8872
+ 'Detailed description of the video scene, character motion, lighting, and camera movement. Required by every model that takes a prompt; leave it out for a model that takes none.',
8877
8873
  },
8878
8874
  model: {
8879
8875
  type: 'string',
@@ -8883,29 +8879,28 @@ function Kr() {
8883
8879
  },
8884
8880
  duration: {
8885
8881
  type: 'number',
8886
- default: 5,
8887
8882
  minimum: 4,
8888
8883
  maximum: 30,
8889
- description: 'Duration in seconds (4 to 30 depending on model).',
8884
+ description:
8885
+ "Duration in seconds (4 to 30 depending on model). Left out: the model's own default.",
8890
8886
  },
8891
8887
  resolution: {
8892
8888
  type: 'string',
8893
8889
  enum: ['480p', '720p', '768p', '1080p', '2k', '4k'],
8894
- default: '480p',
8895
- description: 'Video resolution (the lowest price is the default; see each model tool).',
8890
+ description:
8891
+ "Video resolution, where the model takes it (see each model tool). Left out: the model's own default, its lowest price.",
8896
8892
  },
8897
- creative_mode: { type: 'boolean', default: !1, description: Pa('video') },
8893
+ creative_mode: { type: 'boolean', description: Pa('video') },
8898
8894
  priority: {
8899
8895
  type: 'boolean',
8900
- default: !1,
8901
8896
  description:
8902
8897
  'Seedance models only: guaranteed speed and no queue, at the published Priority price (+6%).',
8903
8898
  },
8904
8899
  aspect_ratio: {
8905
8900
  type: 'string',
8906
8901
  enum: ['16:9', '9:16', '1:1', '4:3', '3:4', '21:9', 'adaptive'],
8907
- default: '16:9',
8908
- description: 'Aspect ratio of the video.',
8902
+ description:
8903
+ "Aspect ratio of the video, where the model takes one. Left out: the model's own default.",
8909
8904
  },
8910
8905
  first_frame_image: {
8911
8906
  type: 'string',
@@ -8914,8 +8909,8 @@ function Kr() {
8914
8909
  },
8915
8910
  generate_audio: {
8916
8911
  type: 'boolean',
8917
- default: !0,
8918
- description: 'Generate synchronized sound effects and dialogue (Seedance 2.5).',
8912
+ description:
8913
+ "Generate synchronized sound, on the models that take it (see each model tool). Left out: the model's own default.",
8919
8914
  },
8920
8915
  images: {
8921
8916
  type: 'array',
@@ -8924,7 +8919,6 @@ function Kr() {
8924
8919
  'Optional reference images as public http(s) URLs or data URIs. The Tein CLI and local MCP client read a file path on your machine and upload it before the request is sent.',
8925
8920
  },
8926
8921
  },
8927
- required: ['prompt'],
8928
8922
  additionalProperties: !0,
8929
8923
  },
8930
8924
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teinai/cli",
3
- "version": "1.1.32",
3
+ "version": "1.1.33",
4
4
  "description": "Official CLI for Tein AI models (Video, Image, Audio, LLM, 3D)",
5
5
  "main": "index.js",
6
6
  "bin": {