@neta-art/generation 0.1.3 → 0.1.5
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/README.md +73 -14
- package/dist/{builtins-BJ2_TVlr.d.ts → builtins-C-_aGhT8.d.ts} +2 -2
- package/dist/builtins-C-_aGhT8.d.ts.map +1 -0
- package/dist/builtins-WOyUMLOY.js +1096 -0
- package/dist/builtins-WOyUMLOY.js.map +1 -0
- package/dist/builtins.d.ts +1 -1
- package/dist/builtins.js +1 -1
- package/dist/cli/index.js +2 -2
- package/dist/{export-config-D8By2_r7.js → export-config-1c3HS6eX.js} +372 -44
- package/dist/export-config-1c3HS6eX.js.map +1 -0
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/models/birefnet-general.yaml +25 -0
- package/models/kling-image-to-video.yaml +89 -0
- package/models/kling-multi-image-to-video.yaml +93 -0
- package/models/kling-omni-video.yaml +107 -0
- package/models/kling-text-to-video.yaml +79 -0
- package/models/noobxl-i2i-ipa-onediff.yaml +72 -0
- package/models/noobxl-t2i-onediff.yaml +44 -0
- package/models/suno_cover_chirp_v5.yaml +159 -0
- package/models/suno_image_to_song_chirp_v5.yaml +152 -0
- package/models/suno_infill_chirp_v5.yaml +148 -0
- package/models/suno_music_chirp_fenix.yaml +77 -0
- package/models/suno_sound_chirp_v5.yaml +145 -0
- package/models/suno_style_tags.yaml +14 -0
- package/models/suno_upload_audio.yaml +44 -0
- package/models/suno_video_to_song_chirp_v5.yaml +152 -0
- package/models/suno_vox_chirp_v5.yaml +149 -0
- package/package.json +19 -15
- package/dist/builtins-BJ2_TVlr.d.ts.map +0 -1
- package/dist/builtins-FumzmWvj.js +0 -565
- package/dist/builtins-FumzmWvj.js.map +0 -1
- package/dist/export-config-D8By2_r7.js.map +0 -1
- 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
|
|
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({
|
|
@@ -100,9 +107,24 @@ const client = createGenerationClient({
|
|
|
100
107
|
|
|
101
108
|
- `gpt-image-2`
|
|
102
109
|
- `gemini-3.1-flash-image-preview`
|
|
110
|
+
- `kling-text-to-video`
|
|
111
|
+
- `kling-image-to-video`
|
|
112
|
+
- `kling-omni-video`
|
|
113
|
+
- `kling-multi-image-to-video`
|
|
103
114
|
- `seedance-2-0`
|
|
104
115
|
- `seedance-2-0-fast`
|
|
105
|
-
- `
|
|
116
|
+
- `suno_music_chirp_fenix`
|
|
117
|
+
- `noobxl-t2i-onediff`
|
|
118
|
+
- `noobxl-i2i-ipa-onediff`
|
|
119
|
+
- `birefnet-general`
|
|
120
|
+
- `suno_style_tags`
|
|
121
|
+
- `suno_upload_audio`
|
|
122
|
+
- `suno_cover_chirp_v5`
|
|
123
|
+
- `suno_infill_chirp_v5`
|
|
124
|
+
- `suno_sound_chirp_v5`
|
|
125
|
+
- `suno_image_to_song_chirp_v5`
|
|
126
|
+
- `suno_video_to_song_chirp_v5`
|
|
127
|
+
- `suno_vox_chirp_v5`
|
|
106
128
|
|
|
107
129
|
Built-in model declarations share the same client-level `apiKey` and `baseUrl`.
|
|
108
130
|
|
|
@@ -122,6 +144,32 @@ const output = await client.generate({
|
|
|
122
144
|
});
|
|
123
145
|
```
|
|
124
146
|
|
|
147
|
+
## Image models
|
|
148
|
+
|
|
149
|
+
These image models use the same client API as the other built-in models:
|
|
150
|
+
|
|
151
|
+
- `noobxl-t2i-onediff`
|
|
152
|
+
- `noobxl-i2i-ipa-onediff`
|
|
153
|
+
- `birefnet-general`
|
|
154
|
+
|
|
155
|
+
```ts
|
|
156
|
+
await client.generate({
|
|
157
|
+
model: "noobxl-t2i-onediff",
|
|
158
|
+
content: [{ type: "text", text: "anime key visual, luminous city at night" }],
|
|
159
|
+
parameters: {
|
|
160
|
+
size: "1024x1024",
|
|
161
|
+
negative_prompt: "low quality, blurry",
|
|
162
|
+
},
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
await client.generate({
|
|
166
|
+
model: "birefnet-general",
|
|
167
|
+
content: [
|
|
168
|
+
{ type: "image", source: { type: "url", url: "https://example.com/portrait.png" } },
|
|
169
|
+
],
|
|
170
|
+
});
|
|
171
|
+
```
|
|
172
|
+
|
|
125
173
|
## Video generation
|
|
126
174
|
|
|
127
175
|
```ts
|
|
@@ -151,19 +199,31 @@ await client.generate({
|
|
|
151
199
|
});
|
|
152
200
|
```
|
|
153
201
|
|
|
202
|
+
Kling exposes stable capability model ids while the adapter sends the latest upstream `model_name` for each capability:
|
|
203
|
+
|
|
204
|
+
```ts
|
|
205
|
+
await client.generate({
|
|
206
|
+
model: "kling-image-to-video",
|
|
207
|
+
content: [
|
|
208
|
+
{ type: "text", text: "gently turn toward the camera with soft natural motion" },
|
|
209
|
+
{ type: "image", source: { type: "url", url: "https://example.com/input.png" } },
|
|
210
|
+
],
|
|
211
|
+
parameters: {
|
|
212
|
+
duration: 5,
|
|
213
|
+
aspect_ratio: "16:9",
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
```
|
|
217
|
+
|
|
154
218
|
## Music generation
|
|
155
219
|
|
|
156
220
|
```ts
|
|
157
221
|
const output = await client.generate({
|
|
158
|
-
model: "
|
|
222
|
+
model: "suno_music_chirp_fenix",
|
|
159
223
|
content: [
|
|
160
224
|
{ type: "text", text: "uplifting cinematic pop with warm piano and clear chorus" },
|
|
161
225
|
],
|
|
162
|
-
parameters: {
|
|
163
|
-
operation: "music",
|
|
164
|
-
},
|
|
165
226
|
meta: {
|
|
166
|
-
mv: "chirp-v5-5",
|
|
167
227
|
title: "Warm Horizon",
|
|
168
228
|
tags: "cinematic pop, warm piano",
|
|
169
229
|
make_instrumental: false,
|
|
@@ -173,14 +233,12 @@ const output = await client.generate({
|
|
|
173
233
|
console.log(output);
|
|
174
234
|
```
|
|
175
235
|
|
|
176
|
-
Suno uses one
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
236
|
+
Suno uses one shared adapter with a small public model set: `suno_music_chirp_fenix`, `suno_style_tags`,
|
|
237
|
+
`suno_upload_audio`, `suno_cover_chirp_v5`, `suno_infill_chirp_v5`, `suno_sound_chirp_v5`,
|
|
238
|
+
`suno_image_to_song_chirp_v5`, `suno_video_to_song_chirp_v5`, and `suno_vox_chirp_v5`. Provider-specific fields such as
|
|
239
|
+
`title`, `tags`, `make_instrumental`, and `metadata_params` belong in `meta`.
|
|
180
240
|
|
|
181
|
-
|
|
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`.
|
|
241
|
+
`suno_music` is removed in this release. Migrate to a concrete model name and stop sending `parameters.operation` or `meta.task`.
|
|
184
242
|
|
|
185
243
|
## Load model declarations from files
|
|
186
244
|
|
|
@@ -261,6 +319,7 @@ Built-in adapters:
|
|
|
261
319
|
- `openai.images`
|
|
262
320
|
- `gemini.generateContent`
|
|
263
321
|
- `ark.videoGenerations`
|
|
322
|
+
- `kling.videoGenerations`
|
|
264
323
|
- `suno.tasks`
|
|
265
324
|
|
|
266
325
|
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-
|
|
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,KAJj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