@neta-art/generation 0.1.4 → 0.1.6

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 (37) hide show
  1. package/README.md +97 -14
  2. package/dist/{builtins-BJ2_TVlr.d.ts → builtins-C-_aGhT8.d.ts} +2 -2
  3. package/dist/builtins-C-_aGhT8.d.ts.map +1 -0
  4. package/dist/builtins-NAtI9FFU.js +1186 -0
  5. package/dist/builtins-NAtI9FFU.js.map +1 -0
  6. package/dist/builtins.d.ts +1 -1
  7. package/dist/builtins.js +1 -1
  8. package/dist/cli/index.js +2 -2
  9. package/dist/{export-config-D8By2_r7.js → export-config-DS2XD-tF.js} +443 -44
  10. package/dist/export-config-DS2XD-tF.js.map +1 -0
  11. package/dist/index.d.ts +8 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +3 -3
  14. package/models/birefnet-general.yaml +25 -0
  15. package/models/kling-image-to-video.yaml +89 -0
  16. package/models/kling-multi-image-to-video.yaml +93 -0
  17. package/models/kling-omni-video.yaml +107 -0
  18. package/models/kling-text-to-video.yaml +79 -0
  19. package/models/noobxl-i2i-ipa-onediff.yaml +72 -0
  20. package/models/noobxl-t2i-onediff.yaml +44 -0
  21. package/models/qwen-image-edit.yaml +44 -0
  22. package/models/suno_cover_chirp_v5.yaml +159 -0
  23. package/models/suno_image_to_song_chirp_v5.yaml +152 -0
  24. package/models/suno_infill_chirp_v5.yaml +148 -0
  25. package/models/suno_music_chirp_fenix.yaml +77 -0
  26. package/models/suno_sound_chirp_v5.yaml +145 -0
  27. package/models/suno_style_tags.yaml +14 -0
  28. package/models/suno_upload_audio.yaml +44 -0
  29. package/models/suno_video_to_song_chirp_v5.yaml +152 -0
  30. package/models/suno_vox_chirp_v5.yaml +149 -0
  31. package/models/z-image-turbo.yaml +34 -0
  32. package/package.json +19 -15
  33. package/dist/builtins-BJ2_TVlr.d.ts.map +0 -1
  34. package/dist/builtins-FumzmWvj.js +0 -565
  35. package/dist/builtins-FumzmWvj.js.map +0 -1
  36. package/dist/export-config-D8By2_r7.js.map +0 -1
  37. package/models/suno_music.yaml +0 -265
package/README.md CHANGED
@@ -60,6 +60,13 @@ pnpm example:image-editing
60
60
  pnpm example:text-to-video
61
61
  ```
62
62
 
63
+ Live provider tests are separate from `pnpm test` because they use the real SDK client and submit real provider requests. Set
64
+ `NETA_ROUTER_API_KEY` or `NETA_API_KEY`, then run:
65
+
66
+ ```bash
67
+ pnpm test:live:suno
68
+ ```
69
+
63
70
  You can also call providers through the CLI:
64
71
 
65
72
  ```bash
@@ -83,7 +90,7 @@ const client = createGenerationClient({
83
90
  });
84
91
  ```
85
92
 
86
- For a custom logger or full unredacted payloads:
93
+ For a custom logger or unredacted secret headers. Base64 media payloads are always redacted from debug events:
87
94
 
88
95
  ```ts
89
96
  const client = createGenerationClient({
@@ -99,10 +106,27 @@ const client = createGenerationClient({
99
106
  ## Built-in models
100
107
 
101
108
  - `gpt-image-2`
109
+ - `z-image-turbo`
110
+ - `qwen-image-edit`
102
111
  - `gemini-3.1-flash-image-preview`
112
+ - `kling-text-to-video`
113
+ - `kling-image-to-video`
114
+ - `kling-omni-video`
115
+ - `kling-multi-image-to-video`
103
116
  - `seedance-2-0`
104
117
  - `seedance-2-0-fast`
105
- - `suno_music`
118
+ - `suno_music_chirp_fenix`
119
+ - `noobxl-t2i-onediff`
120
+ - `noobxl-i2i-ipa-onediff`
121
+ - `birefnet-general`
122
+ - `suno_style_tags`
123
+ - `suno_upload_audio`
124
+ - `suno_cover_chirp_v5`
125
+ - `suno_infill_chirp_v5`
126
+ - `suno_sound_chirp_v5`
127
+ - `suno_image_to_song_chirp_v5`
128
+ - `suno_video_to_song_chirp_v5`
129
+ - `suno_vox_chirp_v5`
106
130
 
107
131
  Built-in model declarations share the same client-level `apiKey` and `baseUrl`.
108
132
 
@@ -122,6 +146,53 @@ const output = await client.generate({
122
146
  });
123
147
  ```
124
148
 
149
+ ## Image models
150
+
151
+ These image models use the same client API as the other built-in models:
152
+
153
+ - `z-image-turbo`
154
+ - `qwen-image-edit`
155
+ - `noobxl-t2i-onediff`
156
+ - `noobxl-i2i-ipa-onediff`
157
+ - `birefnet-general`
158
+
159
+ ```ts
160
+ await client.generate({
161
+ model: "z-image-turbo",
162
+ content: [{ type: "text", text: "a clean product-style image of a small red toy robot" }],
163
+ parameters: {
164
+ size: "1024*1024",
165
+ },
166
+ });
167
+
168
+ await client.generate({
169
+ model: "qwen-image-edit",
170
+ content: [
171
+ { type: "text", text: "change the background to a clean white studio backdrop" },
172
+ { type: "image", source: { type: "url", url: "https://example.com/input.png" } },
173
+ ],
174
+ parameters: {
175
+ size: "1024x1024",
176
+ },
177
+ });
178
+
179
+ await client.generate({
180
+ model: "noobxl-t2i-onediff",
181
+ content: [{ type: "text", text: "anime key visual, luminous city at night" }],
182
+ parameters: {
183
+ size: "1024x1024",
184
+ negative_prompt: "low quality, blurry",
185
+ },
186
+ });
187
+
188
+ await client.generate({
189
+ model: "birefnet-general",
190
+ content: [
191
+ { type: "image", source: { type: "url", url: "https://example.com/portrait.png" } },
192
+ ],
193
+ });
194
+ ```
195
+
125
196
  ## Video generation
126
197
 
127
198
  ```ts
@@ -151,19 +222,31 @@ await client.generate({
151
222
  });
152
223
  ```
153
224
 
225
+ Kling exposes stable capability model ids while the adapter sends the latest upstream `model_name` for each capability:
226
+
227
+ ```ts
228
+ await client.generate({
229
+ model: "kling-image-to-video",
230
+ content: [
231
+ { type: "text", text: "gently turn toward the camera with soft natural motion" },
232
+ { type: "image", source: { type: "url", url: "https://example.com/input.png" } },
233
+ ],
234
+ parameters: {
235
+ duration: 5,
236
+ aspect_ratio: "16:9",
237
+ },
238
+ });
239
+ ```
240
+
154
241
  ## Music generation
155
242
 
156
243
  ```ts
157
244
  const output = await client.generate({
158
- model: "suno_music",
245
+ model: "suno_music_chirp_fenix",
159
246
  content: [
160
247
  { type: "text", text: "uplifting cinematic pop with warm piano and clear chorus" },
161
248
  ],
162
- parameters: {
163
- operation: "music",
164
- },
165
249
  meta: {
166
- mv: "chirp-v5-5",
167
250
  title: "Warm Horizon",
168
251
  tags: "cinematic pop, warm piano",
169
252
  make_instrumental: false,
@@ -173,14 +256,12 @@ const output = await client.generate({
173
256
  console.log(output);
174
257
  ```
175
258
 
176
- Suno uses one public model, `suno_music`. SDK-level parameters control execution:
177
-
178
- - `music`
179
- - `lyrics`
259
+ Suno uses one shared adapter with a small public model set: `suno_music_chirp_fenix`, `suno_style_tags`,
260
+ `suno_upload_audio`, `suno_cover_chirp_v5`, `suno_infill_chirp_v5`, `suno_sound_chirp_v5`,
261
+ `suno_image_to_song_chirp_v5`, `suno_video_to_song_chirp_v5`, and `suno_vox_chirp_v5`. Provider-specific fields such as
262
+ `title`, `tags`, `make_instrumental`, and `metadata_params` belong in `meta`.
180
263
 
181
- Provider-specific Suno fields belong in `meta`, not `parameters`. The adapter passes `meta` through to Suno and defaults
182
- `meta.mv` to `chirp-v5-5` for music requests. Use `meta.task` for Yunwu-style integrated tasks such as `sound`, `cover`,
183
- `image_to_song`, `video_to_song`, `remaster`, `underpainting`, or `mashup_condition`.
264
+ `suno_music` is removed in this release. Migrate to a concrete model name and stop sending `parameters.operation` or `meta.task`.
184
265
 
185
266
  ## Load model declarations from files
186
267
 
@@ -259,8 +340,10 @@ type GenerationSource =
259
340
  Built-in adapters:
260
341
 
261
342
  - `openai.images`
343
+ - `openai.imageEdits`
262
344
  - `gemini.generateContent`
263
345
  - `ark.videoGenerations`
346
+ - `kling.videoGenerations`
264
347
  - `suno.tasks`
265
348
 
266
349
  You can register custom adapters:
@@ -90,7 +90,7 @@ type GenerationModelDeclaration = {
90
90
  allowUnknownParameters?: boolean;
91
91
  adapter: {
92
92
  type: string;
93
- };
93
+ } & Record<string, unknown>;
94
94
  content: {
95
95
  input: GenerationContentSpec[];
96
96
  };
@@ -185,4 +185,4 @@ declare function getBuiltinGenerationModel(model: string): GenerationModelDeclar
185
185
  declare function listBuiltinGenerationModels(): GenerationModelDeclaration[];
186
186
  //#endregion
187
187
  export { GenerationSourceResolver as C, GenerationSource as S, ResolvedGenerationRequest as T, GenerationMetaFieldSpec as _, GenerateRequest as a, GenerationModelDeclaration as b, GenerationAdapterInput as c, GenerationContentBlockMeta as d, GenerationContentSpec as f, GenerationDebugOptions as g, GenerationDebugLogger as h, CreateGenerationClientOptions as i, GenerationClient as l, GenerationDebugEvent as m, getBuiltinGenerationModel as n, GenerationAdapter as o, GenerationDebugConfig as p, listBuiltinGenerationModels as r, GenerationAdapterContext as s, builtinGenerationModels as t, GenerationContentBlock as u, GenerationMetaSpec as v, MODEL_SCHEMA as w, GenerationParameterSpec as x, GenerationMetaTaskVariantSpec as y };
188
- //# sourceMappingURL=builtins-BJ2_TVlr.d.ts.map
188
+ //# sourceMappingURL=builtins-C-_aGhT8.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtins-C-_aGhT8.d.ts","names":[],"sources":["../src/types.ts","../src/builtins.ts"],"sourcesContent":[],"mappings":";cAAa;AAAA,KAED,gBAAA,GAFmD;EAEnD,IAAA,EAAA,KAAA;EAEA,GAAA,EAAA,MAAA;AAEZ,CAAA,GAAY;EAC6B,IAAA,EAAA,QAAA;EACZ,SAAA,EAAA,MAAA;EAAyB,IAAA,EAAA,MAAA;CACzB;AAAyB,KAL1C,0BAAA,GAA6B,MAKa,CAAA,MAAA,EAAA,OAAA,CAAA;AACzB,KAJjB,sBAAA,GAIiB;EAAyB,IAAA,EAAA,MAAA;EAA0B,IAAA,EAAA,MAAA;EAEpE,IAAA,CAAA,EAL6B,0BAKR;CAKf,GAAA;EAAN,IAAA,EAAA,OAAA;EAEH,MAAA,EAXoB,gBAWpB;EAAM,IAAA,CAAA,EAXuC,0BAWvC;AAIf,CAAA,GAAY;EAmCA,IAAA,EAAA,OAAA;EAIA,MAAA,EArDiB,gBAqDjB;EAOA,IAAA,CAAA,EA5D0C,0BA4DxB;CACJ,GAAA;EAAf,IAAA,EAAA,OAAA;EAEqB,MAAA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