apick-api 3.0.0 → 3.2.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/CHANGELOG.md +13 -0
- package/README.md +36 -0
- package/docs/guide.en.md +24 -0
- package/docs/guide.ko.md +30 -0
- package/package.json +1 -1
- package/src/index.cjs +71 -0
- package/src/index.d.ts +41 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.2.0 — 2026-09-14
|
|
4
|
+
|
|
5
|
+
- Seedance 참조 영상 작업에 `referenceAudios`(MP3·WAV) 입력을 추가했습니다.
|
|
6
|
+
- Add video generation version selection documentation and compatibility tests.
|
|
7
|
+
- 영상 생성 버전 선택, 버전별 옵션·요금 안내와 호환 검증을 추가했습니다.
|
|
8
|
+
- Add createVideoJob, getVideoJob, downloadVideoResult and public TypeScript types.
|
|
9
|
+
- Document and verify Seedance 2.0 Fast and Mini tier pass-through.
|
|
10
|
+
|
|
11
|
+
## 3.1.0 - 2026-09-08
|
|
12
|
+
|
|
13
|
+
- TTS 발화별 검수 이력, 후보 WAV 조회, 멱등 키를 사용하는 같은 작업 재개 메서드를 추가했습니다.
|
|
14
|
+
- Added TTS quality history, candidate WAV downloads, and idempotent job recovery methods.
|
|
15
|
+
|
|
3
16
|
## 3.0.0 - 2026-09-05
|
|
4
17
|
|
|
5
18
|
- 이미지 프롬프트 허용 길이를 최대 28,000자로 확대했습니다.
|
package/README.md
CHANGED
|
@@ -72,6 +72,9 @@ Leave the allowed-IP list blank for unrestricted access. To restrict access, reg
|
|
|
72
72
|
| `cancelTtsJob(jobId)` | 대기·생성 중 TTS 작업 취소 / Cancel waiting or processing TTS job | JSON |
|
|
73
73
|
| `downloadTtsResult(jobId)` | TTS 결과 1회 다운로드 / One-time TTS result | MP3 |
|
|
74
74
|
| `downloadTtsSubtitles(jobId)` | TTS 자막 1회 다운로드 / One-time TTS subtitles | ASS |
|
|
75
|
+
| `getTtsQuality(jobId)` | 발화별 검수·후보 이력 / Utterance quality and candidates | JSON |
|
|
76
|
+
| `retryTtsJob(jobId, utteranceIds, idempotencyKey)` | 같은 작업의 국소 복구 / Idempotent local recovery | JSON |
|
|
77
|
+
| `downloadTtsCandidate(jobId, candidateId)` | 검수 후보 청취 / Candidate audio | WAV |
|
|
75
78
|
| `htmlToPdf(html, options)` | HTML→PDF | Binary |
|
|
76
79
|
| `jsonToExcel(data, options)` | JSON→Excel | Binary |
|
|
77
80
|
| `summarize(text)` | 텍스트 요약 / Text summarization | JSON |
|
|
@@ -261,3 +264,36 @@ Error codes are one of `APICK_AUTH_ERROR`, `APICK_TIMEOUT`, `APICK_NETWORK_ERROR
|
|
|
261
264
|
## License
|
|
262
265
|
|
|
263
266
|
MIT — see [LICENSE](LICENSE). Use of the APICK service is governed by the [APICK terms](https://apick.app/terms).
|
|
267
|
+
|
|
268
|
+
## Video model versions
|
|
269
|
+
|
|
270
|
+
Omitting `version` preserves Seedance 2.5, Veo 3.1 and Kling 3.0. Set `version` and `tier` explicitly to select a generation; jobs are never silently switched to another version. Submission and status responses include `version`.
|
|
271
|
+
|
|
272
|
+
Available generations: Seedance 1.0/1.5/2.0/2.5, including Seedance 2.0 Standard/Fast/Mini; Veo 3.1 (Standard/Fast/Lite); Kling 1.6/2.0/2.1/2.5/2.6/3.0/O1/O3. Veo 3.0 is unavailable. Modes, tiers, resolutions, durations, audio, file limits and prices vary by combination. See the [Seedance](https://apick.app/dev_guide/seedancejobs), [Veo](https://apick.app/dev_guide/veojobs) and [Kling](https://apick.app/dev_guide/klingjobs) version tables. Unsupported combinations are rejected before submission.
|
|
273
|
+
|
|
274
|
+
Seedance reference mode accepts `referenceImages`, `referenceVideos`, and `referenceAudios` (MP3/WAV) when supported by the selected version.
|
|
275
|
+
|
|
276
|
+
## 영상 모델 버전 선택
|
|
277
|
+
|
|
278
|
+
`version`을 생략하면 Seedance 2.5, Veo 3.1, Kling 3.0을 사용합니다. 버전과 등급을 명시하면 해당 조합으로 생성하며 다른 모델로 자동 대체하지 않습니다. 생성과 상태 응답의 `version`으로 확인할 수 있습니다.
|
|
279
|
+
|
|
280
|
+
| 제품 | 제공 버전 | 제약과 요금 |
|
|
281
|
+
|---|---|---|
|
|
282
|
+
| Seedance | 2.5, 2.0(Standard·Fast·Mini), 1.5, 1.0 | [버전별 지원표](https://apick.app/dev_guide/seedancejobs) |
|
|
283
|
+
| Veo | 3.1 (Standard, Fast, Lite) | [버전별 지원표](https://apick.app/dev_guide/veojobs) |
|
|
284
|
+
| Kling | 3.0, O3, O1, 2.6, 2.5, 2.1, 2.0, 1.6 | [버전별 지원표](https://apick.app/dev_guide/klingjobs) |
|
|
285
|
+
|
|
286
|
+
등급·해상도·길이·오디오·파일 개수와 초당 포인트는 선택 조합별로 다릅니다. Seedance 2.0은 Standard·Fast·Mini를 제공하며 Mini는 480p·720p와 4~15초를 지원합니다. 무음 전용 모델은 `audio=false`, 오디오 필수 모델은 `audio=true`만 허용합니다. Veo 3.0은 현재 제공하지 않습니다. 지원하지 않는 조합은 접수 전에 거절됩니다.
|
|
287
|
+
|
|
288
|
+
Seedance 참조 소재 모드는 지원 버전에서 `referenceImages`, `referenceVideos`, `referenceAudios`(MP3·WAV)를 함께 사용할 수 있습니다.
|
|
289
|
+
|
|
290
|
+
```js
|
|
291
|
+
const job = await client.createVideoJob("kling", "A boat crossing the sea", {
|
|
292
|
+
version: "1.6", tier: "std", mode: "text", duration: 5, audio: false,
|
|
293
|
+
idempotencyKey: "boat-video-0001"
|
|
294
|
+
});
|
|
295
|
+
const status = await client.getVideoJob("kling", job.data.job_id);
|
|
296
|
+
if (status.data.status === "completed") {
|
|
297
|
+
await (await client.downloadVideoResult("kling", job.data.job_id)).save("boat.mp4");
|
|
298
|
+
}
|
|
299
|
+
```
|
package/docs/guide.en.md
CHANGED
|
@@ -180,3 +180,27 @@ The document-specific methods are `maskResidenceCard`, `maskPassport`, `maskIdCa
|
|
|
180
180
|
## Errors and retries
|
|
181
181
|
|
|
182
182
|
`ApickApiError` includes public error information: `code`, optional `serviceCode`, `status`, and `message`. The SDK does not retry automatically because a retry could duplicate an API call and its charge. If your application needs retries, decide explicitly after checking the error code and whether the operation is safe to repeat.
|
|
183
|
+
# TTS quality and recovery
|
|
184
|
+
|
|
185
|
+
Use `getTtsQuality(jobId)` to inspect utterance speed, rejection reasons, and candidate history. Candidates remain available for 72 hours after the job terminates. `downloadTtsCandidate(jobId, candidateId)` does not consume the final MP3 or ASS download.
|
|
186
|
+
|
|
187
|
+
`retryTtsJob(jobId, ['u002'], idempotencyKey)` requests technical recovery within the same job without an additional charge. Reuse the same key and utterance list after a lost response. Check `resume_revision` to identify the current revision. Required quality checks must pass before a job completes.
|
|
188
|
+
|
|
189
|
+
## Video model versions
|
|
190
|
+
|
|
191
|
+
Omitting `version` preserves Seedance 2.5, Veo 3.1 and Kling 3.0. Set `version` and `tier` explicitly to select a generation; jobs are never silently switched to another version. Submission and status responses include `version`.
|
|
192
|
+
|
|
193
|
+
Available generations: Seedance 1.0/1.5/2.0/2.5, including Seedance 2.0 Standard/Fast/Mini; Veo 3.1 (Standard/Fast/Lite); Kling 1.6/2.0/2.1/2.5/2.6/3.0/O1/O3. Veo 3.0 is unavailable. Seedance 2.0 Mini supports 480p/720p and 4–15 seconds. Modes, tiers, resolutions, durations, audio, file limits and prices vary by combination. See the [Seedance](https://apick.app/dev_guide/seedancejobs), [Veo](https://apick.app/dev_guide/veojobs) and [Kling](https://apick.app/dev_guide/klingjobs) version tables. Unsupported combinations are rejected before submission.
|
|
194
|
+
|
|
195
|
+
Seedance reference mode accepts `referenceImages`, `referenceVideos`, and `referenceAudios` (MP3/WAV) when supported by the selected version.
|
|
196
|
+
|
|
197
|
+
```js
|
|
198
|
+
const job = await client.createVideoJob("kling", "A boat crossing the sea", {
|
|
199
|
+
version: "1.6", tier: "std", mode: "text", duration: 5, audio: false,
|
|
200
|
+
idempotencyKey: "boat-video-0001"
|
|
201
|
+
});
|
|
202
|
+
const status = await client.getVideoJob("kling", job.data.job_id);
|
|
203
|
+
if (status.data.status === "completed") {
|
|
204
|
+
await (await client.downloadVideoResult("kling", job.data.job_id)).save("boat.mp4");
|
|
205
|
+
}
|
|
206
|
+
```
|
package/docs/guide.ko.md
CHANGED
|
@@ -182,3 +182,33 @@ console.log(result.data.result.fields);
|
|
|
182
182
|
## 오류와 재시도
|
|
183
183
|
|
|
184
184
|
`ApickApiError`에는 공개 오류 정보인 `code`, `serviceCode`, `status`, `message`가 포함됩니다. SDK는 중복 호출과 중복 과금을 방지하기 위해 자동 재시도를 하지 않습니다. 재시도가 필요하면 작업의 멱등성과 오류 코드를 확인한 뒤 애플리케이션에서 명시적으로 결정하세요.
|
|
185
|
+
# TTS 검수와 재개
|
|
186
|
+
|
|
187
|
+
`getTtsQuality(jobId)`로 발화별 속도·실패 이유와 후보 목록을 조회합니다. 후보는 작업 종료 후 72시간 보존되며 `downloadTtsCandidate(jobId, candidateId)` 호출은 최종 MP3·ASS의 1회 다운로드를 소비하지 않습니다.
|
|
188
|
+
|
|
189
|
+
`retryTtsJob(jobId, ['u002'], idempotencyKey)`는 해당 발화의 기술적 복구를 같은 작업에서 요청합니다. 응답이 끊겨도 같은 키와 발화 목록을 사용하세요. 기술적 복구는 추가 과금하지 않으며, 재개 회차는 `resume_revision`으로 확인합니다. 필수 검수를 통과하지 못한 작업은 완료되지 않습니다.
|
|
190
|
+
|
|
191
|
+
## 영상 모델 버전 선택
|
|
192
|
+
|
|
193
|
+
`version`을 생략하면 Seedance 2.5, Veo 3.1, Kling 3.0을 사용합니다. 버전과 등급을 명시하면 해당 조합으로 생성하며 다른 모델로 자동 대체하지 않습니다. 생성과 상태 응답의 `version`으로 확인할 수 있습니다.
|
|
194
|
+
|
|
195
|
+
| 제품 | 제공 버전 | 제약과 요금 |
|
|
196
|
+
|---|---|---|
|
|
197
|
+
| Seedance | 2.5, 2.0(Standard·Fast·Mini), 1.5, 1.0 | [버전별 지원표](https://apick.app/dev_guide/seedancejobs) |
|
|
198
|
+
| Veo | 3.1 (Standard, Fast, Lite) | [버전별 지원표](https://apick.app/dev_guide/veojobs) |
|
|
199
|
+
| Kling | 3.0, O3, O1, 2.6, 2.5, 2.1, 2.0, 1.6 | [버전별 지원표](https://apick.app/dev_guide/klingjobs) |
|
|
200
|
+
|
|
201
|
+
등급·해상도·길이·오디오·파일 개수와 초당 포인트는 선택 조합별로 다릅니다. Seedance 2.0은 Standard·Fast·Mini를 제공하며 Mini는 480p·720p와 4~15초를 지원합니다. 무음 전용 모델은 `audio=false`, 오디오 필수 모델은 `audio=true`만 허용합니다. Veo 3.0은 현재 제공하지 않습니다. 지원하지 않는 조합은 접수 전에 거절됩니다.
|
|
202
|
+
|
|
203
|
+
Seedance 참조 소재 모드는 지원 버전에서 `referenceImages`, `referenceVideos`, `referenceAudios`(MP3·WAV)를 함께 사용할 수 있습니다.
|
|
204
|
+
|
|
205
|
+
```js
|
|
206
|
+
const job = await client.createVideoJob("kling", "A boat crossing the sea", {
|
|
207
|
+
version: "1.6", tier: "std", mode: "text", duration: 5, audio: false,
|
|
208
|
+
idempotencyKey: "boat-video-0001"
|
|
209
|
+
});
|
|
210
|
+
const status = await client.getVideoJob("kling", job.data.job_id);
|
|
211
|
+
if (status.data.status === "completed") {
|
|
212
|
+
await (await client.downloadVideoResult("kling", job.data.job_id)).save("boat.mp4");
|
|
213
|
+
}
|
|
214
|
+
```
|
package/package.json
CHANGED
package/src/index.cjs
CHANGED
|
@@ -37,6 +37,7 @@ const SERVICE_DEFINITIONS = Object.freeze({
|
|
|
37
37
|
googleImageSearch: { endpoint: '/rest/google_image_search', timeoutMs: 35_000, output: 'json' },
|
|
38
38
|
screenshot: { endpoint: '/rest/url_screenshot', timeoutMs: 75_000, output: 'binary', filename: 'screenshot.jpeg' },
|
|
39
39
|
createTtsJob: { endpoint: '/rest/tts/jobs', timeoutMs: 35_000, output: 'json' },
|
|
40
|
+
createVideoJob: { endpoint: '/rest/seedance/jobs', timeoutMs: 60_000, output: 'json' },
|
|
40
41
|
htmlToPdf: { endpoint: '/rest/html_to_pdf', timeoutMs: 25_000, output: 'binary', filename: 'document.pdf' },
|
|
41
42
|
jsonToExcel: { endpoint: '/rest/json_to_excel', timeoutMs: 45_000, output: 'binary', filename: 'data.xlsx' },
|
|
42
43
|
summarize: { endpoint: '/rest/llm/text_summary', timeoutMs: 75_000, output: 'json' },
|
|
@@ -467,6 +468,52 @@ class ApickClient {
|
|
|
467
468
|
return this._call('screenshot', { url: normalizeUrl(url) });
|
|
468
469
|
}
|
|
469
470
|
|
|
471
|
+
async createVideoJob(model, prompt, options) {
|
|
472
|
+
if (!['seedance', 'veo', 'kling'].includes(model)) throw new RangeError('model must be seedance, veo or kling.');
|
|
473
|
+
const config = options || {};
|
|
474
|
+
const payload = { prompt: config.mode === 'reference' && prompt === '' ? '' : requiredString('prompt', prompt, 2000) };
|
|
475
|
+
for (const [key, field] of Object.entries({ version:'version', tier:'tier', mode:'mode', duration:'duration', aspectRatio:'aspect_ratio', resolution:'resolution', audio:'audio', negativePrompt:'negative_prompt', seed:'seed', cfgScale:'cfg_scale', idempotencyKey:'idempotency_key' })) {
|
|
476
|
+
if (config[key] !== undefined) payload[field] = config[key];
|
|
477
|
+
}
|
|
478
|
+
const files = [['image', config.image], ['last_image', config.lastImage]];
|
|
479
|
+
for (const input of config.referenceImages || []) files.push(['reference_image', input]);
|
|
480
|
+
for (const input of config.referenceVideos || []) files.push(['reference_video', input]);
|
|
481
|
+
for (const input of config.referenceAudios || []) files.push(['reference_audio', input]);
|
|
482
|
+
const present = files.filter(([, input]) => input !== undefined);
|
|
483
|
+
const request = { endpoint: '/rest/' + model + '/jobs' };
|
|
484
|
+
if (!present.length) return this._call('createVideoJob', payload, null, request);
|
|
485
|
+
const form = new FormData();
|
|
486
|
+
for (const [key, value] of Object.entries(payload)) form.append(key, String(value));
|
|
487
|
+
for (const [field, input] of present) {
|
|
488
|
+
if (field !== 'reference_video' && field !== 'reference_audio') {
|
|
489
|
+
const upload = await normalizeImage(input);
|
|
490
|
+
form.append(field, upload.blob, upload.filename);
|
|
491
|
+
} else {
|
|
492
|
+
let bytes, filename, contentType;
|
|
493
|
+
if (typeof input === 'string') {
|
|
494
|
+
bytes = await require('node:fs/promises').readFile(input);
|
|
495
|
+
filename = require('node:path').basename(input);
|
|
496
|
+
contentType = field === 'reference_audio' ? (/\.wav$/i.test(filename) ? 'audio/wav' : 'audio/mpeg') : /\.webm$/i.test(filename) ? 'video/webm' : /\.mov$/i.test(filename) ? 'video/quicktime' : 'video/mp4';
|
|
497
|
+
} else { bytes = await input.arrayBuffer(); filename = input.name || (field === 'reference_audio' ? 'reference.mp3' : 'reference.mp4'); contentType = input.type || (field === 'reference_audio' ? 'audio/mpeg' : 'video/mp4'); }
|
|
498
|
+
const allowed = field === 'reference_audio' ? ['audio/mpeg', 'audio/wav', 'audio/x-wav'] : ['video/mp4', 'video/quicktime', 'video/webm'];
|
|
499
|
+
const maxBytes = field === 'reference_audio' ? 15 * 1024 * 1024 : 100 * 1024 * 1024;
|
|
500
|
+
if (!allowed.includes(contentType) || bytes.byteLength < 1 || bytes.byteLength > maxBytes) throw new RangeError(field === 'reference_audio' ? 'Invalid reference audio.' : 'Invalid reference video.');
|
|
501
|
+
form.append(field, new Blob([bytes], { type: contentType }), filename);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
return this._call('createVideoJob', null, form, request);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
getVideoJob(model, jobId) {
|
|
508
|
+
if (!['seedance', 'veo', 'kling'].includes(model) || !/^[a-f0-9]{32}$/.test(jobId)) throw new RangeError('Invalid video model or job ID.');
|
|
509
|
+
return this._call('createVideoJob', null, null, { endpoint:'/rest/'+model+'/jobs/'+jobId, method:'GET', timeoutMs:30_000 });
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
downloadVideoResult(model, jobId) {
|
|
513
|
+
if (!['seedance', 'veo', 'kling'].includes(model) || !/^[a-f0-9]{32}$/.test(jobId)) throw new RangeError('Invalid video model or job ID.');
|
|
514
|
+
return this._call('createVideoJob', null, null, { endpoint:'/rest/'+model+'/jobs/'+jobId+'/result', method:'GET', output:'binary', filename:jobId+'.mp4', timeoutMs:60_000 });
|
|
515
|
+
}
|
|
516
|
+
|
|
470
517
|
createTtsJob(text, options) {
|
|
471
518
|
const config = options || {};
|
|
472
519
|
return this._call('createTtsJob', {
|
|
@@ -485,6 +532,30 @@ class ApickClient {
|
|
|
485
532
|
return this._call('createTtsJob', null, null, { endpoint: '/rest/tts/jobs/' + id + '/cancel' });
|
|
486
533
|
}
|
|
487
534
|
|
|
535
|
+
getTtsQuality(jobId) {
|
|
536
|
+
const id = normalizeTtsJobId(jobId);
|
|
537
|
+
return this._call('createTtsJob', null, null, { endpoint: '/rest/tts/jobs/' + id + '/quality', method: 'GET' });
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
retryTtsJob(jobId, utteranceIds, idempotencyKey) {
|
|
541
|
+
const id = normalizeTtsJobId(jobId);
|
|
542
|
+
if (!Array.isArray(utteranceIds) || utteranceIds.length > 100 || utteranceIds.some(value => typeof value !== 'string' || !/^u\d{3}$/.test(value))) {
|
|
543
|
+
throw new TypeError('utteranceIds must contain up to 100 uNNN identifiers.');
|
|
544
|
+
}
|
|
545
|
+
if (typeof idempotencyKey !== 'string' || !/^[A-Za-z0-9_-]{8,128}$/.test(idempotencyKey)) {
|
|
546
|
+
throw new TypeError('idempotencyKey must contain 8 to 128 letters, digits, underscores or hyphens.');
|
|
547
|
+
}
|
|
548
|
+
return this._call('createTtsJob', { utterance_ids: [...new Set(utteranceIds)].sort(), idempotency_key: idempotencyKey }, null,
|
|
549
|
+
{ endpoint: '/rest/tts/jobs/' + id + '/retry' });
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
downloadTtsCandidate(jobId, candidateId) {
|
|
553
|
+
const id = normalizeTtsJobId(jobId);
|
|
554
|
+
if (typeof candidateId !== 'string' || !/^[a-f0-9]{32}$/.test(candidateId)) throw new TypeError('candidateId must be a 32-character hexadecimal identifier.');
|
|
555
|
+
return this._call('createTtsJob', null, null, { endpoint: '/rest/tts/jobs/' + id + '/candidates/' + candidateId + '/audio',
|
|
556
|
+
method: 'GET', output: 'binary', filename: candidateId + '.wav' });
|
|
557
|
+
}
|
|
558
|
+
|
|
488
559
|
downloadTtsResult(jobId) {
|
|
489
560
|
const id = normalizeTtsJobId(jobId);
|
|
490
561
|
return this._call('createTtsJob', null, null, {
|
package/src/index.d.ts
CHANGED
|
@@ -59,6 +59,21 @@ export interface TtsJobData {
|
|
|
59
59
|
character_count?: number;
|
|
60
60
|
result_available?: boolean;
|
|
61
61
|
subtitles_available?: boolean;
|
|
62
|
+
resume_revision?: number;
|
|
63
|
+
operation_revision?: number;
|
|
64
|
+
quality?: TtsQualityData | null;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export interface TtsQualityData {
|
|
68
|
+
job_id?: string;
|
|
69
|
+
resume_revision?: number;
|
|
70
|
+
phase?: string;
|
|
71
|
+
accepted_utterances?: number;
|
|
72
|
+
failed_utterances?: number;
|
|
73
|
+
total_utterances?: number;
|
|
74
|
+
utterances?: Array<{ id: string; status: string; attempt?: number; reasons?: string[];
|
|
75
|
+
speech_rate?: { chars: number; duration_sec: number; cps: number; expected_sec: number; duration_ratio: number | null; status: string } }>;
|
|
76
|
+
candidates?: Array<{ candidate_id: string; utterance_id: string; status: string; attempt: number; audio_available?: boolean }>;
|
|
62
77
|
}
|
|
63
78
|
|
|
64
79
|
export class ApickApiError extends Error {
|
|
@@ -93,6 +108,9 @@ export const SERVICES: Readonly<Record<string, Readonly<{
|
|
|
93
108
|
}>>>;
|
|
94
109
|
|
|
95
110
|
export class ApickClient {
|
|
111
|
+
createVideoJob(model: VideoModel, prompt: string, options?: VideoJobOptions): Promise<ApickResult<VideoJobData>>;
|
|
112
|
+
getVideoJob(model: VideoModel, jobId: string): Promise<ApickResult<VideoJobData>>;
|
|
113
|
+
downloadVideoResult(model: VideoModel, jobId: string): Promise<ApickBinaryResult>;
|
|
96
114
|
constructor(apiKeyOrOptions: string | ApickClientOptions);
|
|
97
115
|
businessDetails(businessNumber: string): Promise<ApickResult>;
|
|
98
116
|
ventureBusiness(businessNumber: string): Promise<ApickResult>;
|
|
@@ -119,6 +137,9 @@ export class ApickClient {
|
|
|
119
137
|
cancelTtsJob(jobId: string): Promise<ApickResult<TtsJobData>>;
|
|
120
138
|
downloadTtsResult(jobId: string): Promise<ApickBinaryResult>;
|
|
121
139
|
downloadTtsSubtitles(jobId: string): Promise<ApickBinaryResult>;
|
|
140
|
+
getTtsQuality(jobId: string): Promise<ApickResult<TtsQualityData>>;
|
|
141
|
+
retryTtsJob(jobId: string, utteranceIds: string[], idempotencyKey: string): Promise<ApickResult<TtsJobData>>;
|
|
142
|
+
downloadTtsCandidate(jobId: string, candidateId: string): Promise<ApickBinaryResult>;
|
|
122
143
|
htmlToPdf(html: string, options?: { pagination?: boolean }): Promise<ApickBinaryResult>;
|
|
123
144
|
jsonToExcel(data: unknown[], options?: { sheetName?: string }): Promise<ApickBinaryResult>;
|
|
124
145
|
summarize(text: string): Promise<ApickResult>;
|
|
@@ -133,3 +154,23 @@ export class ApickClient {
|
|
|
133
154
|
}
|
|
134
155
|
|
|
135
156
|
export default ApickClient;
|
|
157
|
+
|
|
158
|
+
export type VideoModel = 'seedance' | 'veo' | 'kling';
|
|
159
|
+
export interface VideoJobOptions {
|
|
160
|
+
version?: string; tier?: string; mode?: 'text' | 'image' | 'reference'; duration?: number;
|
|
161
|
+
aspectRatio?: string; resolution?: string; audio?: boolean; negativePrompt?: string;
|
|
162
|
+
seed?: number; cfgScale?: number; idempotencyKey?: string;
|
|
163
|
+
image?: string | BinaryInput | ArrayBuffer | ArrayBufferView;
|
|
164
|
+
lastImage?: string | BinaryInput | ArrayBuffer | ArrayBufferView;
|
|
165
|
+
referenceImages?: Array<string | BinaryInput | ArrayBuffer | ArrayBufferView>;
|
|
166
|
+
referenceVideos?: Array<string | BinaryInput>;
|
|
167
|
+
referenceAudios?: Array<string | BinaryInput>;
|
|
168
|
+
}
|
|
169
|
+
export interface VideoJobData {
|
|
170
|
+
job_id: string; model: VideoModel; version: string; mode: string; tier: string;
|
|
171
|
+
status: 'waiting' | 'processing' | 'completed' | 'failed' | 'cancelled';
|
|
172
|
+
duration: number; resolution?: string; audio?: boolean; point_per_second?: number;
|
|
173
|
+
charged_point?: number; result_available?: boolean; result_url?: string;
|
|
174
|
+
result_expires_at?: string | null; idempotent_replay?: boolean;
|
|
175
|
+
error?: { code: string; message: string };
|
|
176
|
+
}
|