@runapi.ai/seedance 0.2.1 → 0.2.4

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.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, ClientOptions } from '@runapi.ai/core';
2
2
  export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TaskFailedError, TaskTimeoutError, TimeoutError, ValidationError } from '@runapi.ai/core';
3
3
 
4
- type SeedanceModel = 'seedance-1.5-pro' | 'seedance-2' | 'seedance-2-fast' | 'seedance-v1-lite' | 'seedance-v1-pro' | 'seedance-v1-pro-fast';
5
- type SeedanceModel2 = 'seedance-2' | 'seedance-2-fast';
4
+ type SeedanceModel = 'seedance-1.5-pro' | 'seedance-2.0' | 'seedance-2.0-fast' | 'seedance-v1-lite' | 'seedance-v1-pro' | 'seedance-v1-pro-fast';
5
+ type SeedanceModel2 = 'seedance-2.0' | 'seedance-2.0-fast';
6
6
  type SeedanceModelV1 = 'seedance-v1-lite' | 'seedance-v1-pro' | 'seedance-v1-pro-fast';
7
7
  type AspectRatio15Pro = '1:1' | '4:3' | '3:4' | '16:9' | '9:16' | '21:9';
8
8
  type AspectRatio2 = AspectRatio15Pro | 'auto';
@@ -50,13 +50,13 @@ interface Generation2BaseParams extends GenerationCommonParams {
50
50
  web_search?: boolean;
51
51
  }
52
52
  /**
53
- * seedance-2/2-fast text-to-video mode.
53
+ * seedance-2.0/2-fast text-to-video mode.
54
54
  * Pure text prompt, no image/reference inputs.
55
55
  */
56
56
  interface Generation2TextParams extends Generation2BaseParams {
57
57
  }
58
58
  /**
59
- * seedance-2/2-fast frame mode.
59
+ * seedance-2.0/2-fast frame mode.
60
60
  * Guide generation with first (required) and optional last frame images.
61
61
  * Mutually exclusive with reference mode.
62
62
  */
@@ -67,7 +67,7 @@ interface Generation2FrameParams extends Generation2BaseParams {
67
67
  last_frame_url?: string;
68
68
  }
69
69
  /**
70
- * seedance-2/2-fast reference mode.
70
+ * seedance-2.0/2-fast reference mode.
71
71
  * Guide generation with reference images, videos, or audio.
72
72
  * Mutually exclusive with frame mode.
73
73
  */
@@ -171,7 +171,7 @@ declare class TextToVideo {
171
171
  * });
172
172
  *
173
173
  * const result = await client.textToVideo.run({
174
- * model: 'seedance-2',
174
+ * model: 'seedance-2.0',
175
175
  * prompt: 'A cat walking through a garden',
176
176
  * });
177
177
  * ```
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { AsyncTaskStatus, HttpClient, RequestOptions, PollingOptions, ClientOptions } from '@runapi.ai/core';
2
2
  export { AuthenticationError, InsufficientCreditsError, NetworkError, NotFoundError, RateLimitError, RunApiError, ServiceUnavailableError, TaskFailedError, TaskTimeoutError, TimeoutError, ValidationError } from '@runapi.ai/core';
3
3
 
4
- type SeedanceModel = 'seedance-1.5-pro' | 'seedance-2' | 'seedance-2-fast' | 'seedance-v1-lite' | 'seedance-v1-pro' | 'seedance-v1-pro-fast';
5
- type SeedanceModel2 = 'seedance-2' | 'seedance-2-fast';
4
+ type SeedanceModel = 'seedance-1.5-pro' | 'seedance-2.0' | 'seedance-2.0-fast' | 'seedance-v1-lite' | 'seedance-v1-pro' | 'seedance-v1-pro-fast';
5
+ type SeedanceModel2 = 'seedance-2.0' | 'seedance-2.0-fast';
6
6
  type SeedanceModelV1 = 'seedance-v1-lite' | 'seedance-v1-pro' | 'seedance-v1-pro-fast';
7
7
  type AspectRatio15Pro = '1:1' | '4:3' | '3:4' | '16:9' | '9:16' | '21:9';
8
8
  type AspectRatio2 = AspectRatio15Pro | 'auto';
@@ -50,13 +50,13 @@ interface Generation2BaseParams extends GenerationCommonParams {
50
50
  web_search?: boolean;
51
51
  }
52
52
  /**
53
- * seedance-2/2-fast text-to-video mode.
53
+ * seedance-2.0/2-fast text-to-video mode.
54
54
  * Pure text prompt, no image/reference inputs.
55
55
  */
56
56
  interface Generation2TextParams extends Generation2BaseParams {
57
57
  }
58
58
  /**
59
- * seedance-2/2-fast frame mode.
59
+ * seedance-2.0/2-fast frame mode.
60
60
  * Guide generation with first (required) and optional last frame images.
61
61
  * Mutually exclusive with reference mode.
62
62
  */
@@ -67,7 +67,7 @@ interface Generation2FrameParams extends Generation2BaseParams {
67
67
  last_frame_url?: string;
68
68
  }
69
69
  /**
70
- * seedance-2/2-fast reference mode.
70
+ * seedance-2.0/2-fast reference mode.
71
71
  * Guide generation with reference images, videos, or audio.
72
72
  * Mutually exclusive with frame mode.
73
73
  */
@@ -171,7 +171,7 @@ declare class TextToVideo {
171
171
  * });
172
172
  *
173
173
  * const result = await client.textToVideo.run({
174
- * model: 'seedance-2',
174
+ * model: 'seedance-2.0',
175
175
  * prompt: 'A cat walking through a garden',
176
176
  * });
177
177
  * ```
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/resources/text-to-video.ts"],"sourcesContent":["export { SeedanceClient } from './client';\nexport * from './types';\n\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n TaskTimeoutError,\n TaskFailedError,\n} from '@runapi.ai/core';\n","import { createHttpClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToVideo } from './resources/text-to-video';\n\n/**\n * Seedance video API client.\n *\n * @example\n * ```typescript\n * const client = new SeedanceClient({\n * apiKey: 'your-api-key',\n * baseUrl: 'https://runapi.ai',\n * });\n *\n * const result = await client.textToVideo.run({\n * model: 'seedance-2',\n * prompt: 'A cat walking through a garden',\n * });\n * ```\n */\nexport class SeedanceClient {\n /** Video generation operations. */\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n const http = createHttpClient(options);\n this.textToVideo = new TextToVideo(http);\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport type {\n CompletedTextToVideoResponse,\n TextToVideoParams,\n TextToVideoResponse,\n TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/seedance/text_to_video';\n\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\n\n async run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse> {\n const { id } = await this.create(params, options);\n const response = await pollUntilComplete<TextToVideoResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n return response as CompletedTextToVideoResponse;\n }\n\n async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\n\n async get(id: string, options?: RequestOptions): Promise<TextToVideoResponse> {\n return this.http.request<TextToVideoResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,eAAqD;;;ACCrD,kBAA8B;AAC9B,sBAAkC;AAQlC,IAAM,WAAW;AAEV,IAAM,cAAN,MAAkB;AAAA,EACvB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA2B,SAAkF;AACrH,UAAM,EAAE,GAAG,IAAI,MAAM,KAAK,OAAO,QAAQ,OAAO;AAChD,UAAM,WAAW,UAAM,mCAAuC,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG;AAAA,MACzF,WAAW,SAAS;AAAA,MACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AACD,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,OAAO,QAA2B,SAAuD;AAC7F,WAAO,KAAK,KAAK,QAA4B,QAAQ,UAAU;AAAA,MAC7D,UAAM,2BAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,IAAI,IAAY,SAAwD;AAC5E,WAAO,KAAK,KAAK,QAA6B,OAAO,GAAG,QAAQ,IAAI,EAAE,IAAI;AAAA,MACxE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;ADjBO,IAAM,iBAAN,MAAqB;AAAA;AAAA,EAEV;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,WAAO,+BAAiB,OAAO;AACrC,SAAK,cAAc,IAAI,YAAY,IAAI;AAAA,EACzC;AACF;;;ADxBA,IAAAC,eAYO;","names":["import_core","import_core"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/client.ts","../src/resources/text-to-video.ts"],"sourcesContent":["export { SeedanceClient } from './client';\nexport * from './types';\n\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n TaskTimeoutError,\n TaskFailedError,\n} from '@runapi.ai/core';\n","import { createHttpClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToVideo } from './resources/text-to-video';\n\n/**\n * Seedance video API client.\n *\n * @example\n * ```typescript\n * const client = new SeedanceClient({\n * apiKey: 'your-api-key',\n * baseUrl: 'https://runapi.ai',\n * });\n *\n * const result = await client.textToVideo.run({\n * model: 'seedance-2.0',\n * prompt: 'A cat walking through a garden',\n * });\n * ```\n */\nexport class SeedanceClient {\n /** Video generation operations. */\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n const http = createHttpClient(options);\n this.textToVideo = new TextToVideo(http);\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport type {\n CompletedTextToVideoResponse,\n TextToVideoParams,\n TextToVideoResponse,\n TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/seedance/text_to_video';\n\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\n\n async run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse> {\n const { id } = await this.create(params, options);\n const response = await pollUntilComplete<TextToVideoResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n return response as CompletedTextToVideoResponse;\n }\n\n async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\n\n async get(id: string, options?: RequestOptions): Promise<TextToVideoResponse> {\n return this.http.request<TextToVideoResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,eAAqD;;;ACCrD,kBAA8B;AAC9B,sBAAkC;AAQlC,IAAM,WAAW;AAEV,IAAM,cAAN,MAAkB;AAAA,EACvB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA2B,SAAkF;AACrH,UAAM,EAAE,GAAG,IAAI,MAAM,KAAK,OAAO,QAAQ,OAAO;AAChD,UAAM,WAAW,UAAM,mCAAuC,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG;AAAA,MACzF,WAAW,SAAS;AAAA,MACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AACD,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,OAAO,QAA2B,SAAuD;AAC7F,WAAO,KAAK,KAAK,QAA4B,QAAQ,UAAU;AAAA,MAC7D,UAAM,2BAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,IAAI,IAAY,SAAwD;AAC5E,WAAO,KAAK,KAAK,QAA6B,OAAO,GAAG,QAAQ,IAAI,EAAE,IAAI;AAAA,MACxE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;ADjBO,IAAM,iBAAN,MAAqB;AAAA;AAAA,EAEV;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,WAAO,+BAAiB,OAAO;AACrC,SAAK,cAAc,IAAI,YAAY,IAAI;AAAA,EACzC;AACF;;;ADxBA,IAAAC,eAYO;","names":["import_core","import_core"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/client.ts","../src/resources/text-to-video.ts","../src/index.ts"],"sourcesContent":["import { createHttpClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToVideo } from './resources/text-to-video';\n\n/**\n * Seedance video API client.\n *\n * @example\n * ```typescript\n * const client = new SeedanceClient({\n * apiKey: 'your-api-key',\n * baseUrl: 'https://runapi.ai',\n * });\n *\n * const result = await client.textToVideo.run({\n * model: 'seedance-2',\n * prompt: 'A cat walking through a garden',\n * });\n * ```\n */\nexport class SeedanceClient {\n /** Video generation operations. */\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n const http = createHttpClient(options);\n this.textToVideo = new TextToVideo(http);\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport type {\n CompletedTextToVideoResponse,\n TextToVideoParams,\n TextToVideoResponse,\n TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/seedance/text_to_video';\n\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\n\n async run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse> {\n const { id } = await this.create(params, options);\n const response = await pollUntilComplete<TextToVideoResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n return response as CompletedTextToVideoResponse;\n }\n\n async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\n\n async get(id: string, options?: RequestOptions): Promise<TextToVideoResponse> {\n return this.http.request<TextToVideoResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export { SeedanceClient } from './client';\nexport * from './types';\n\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n TaskTimeoutError,\n TaskFailedError,\n} from '@runapi.ai/core';\n"],"mappings":";AAAA,SAAS,wBAA4C;;;ACCrD,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAQlC,IAAM,WAAW;AAEV,IAAM,cAAN,MAAkB;AAAA,EACvB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA2B,SAAkF;AACrH,UAAM,EAAE,GAAG,IAAI,MAAM,KAAK,OAAO,QAAQ,OAAO;AAChD,UAAM,WAAW,MAAM,kBAAuC,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG;AAAA,MACzF,WAAW,SAAS;AAAA,MACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AACD,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,OAAO,QAA2B,SAAuD;AAC7F,WAAO,KAAK,KAAK,QAA4B,QAAQ,UAAU;AAAA,MAC7D,MAAM,cAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,IAAI,IAAY,SAAwD;AAC5E,WAAO,KAAK,KAAK,QAA6B,OAAO,GAAG,QAAQ,IAAI,EAAE,IAAI;AAAA,MACxE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;ADjBO,IAAM,iBAAN,MAAqB;AAAA;AAAA,EAEV;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO,iBAAiB,OAAO;AACrC,SAAK,cAAc,IAAI,YAAY,IAAI;AAAA,EACzC;AACF;;;AExBA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
1
+ {"version":3,"sources":["../src/client.ts","../src/resources/text-to-video.ts","../src/index.ts"],"sourcesContent":["import { createHttpClient, type ClientOptions } from '@runapi.ai/core';\nimport { TextToVideo } from './resources/text-to-video';\n\n/**\n * Seedance video API client.\n *\n * @example\n * ```typescript\n * const client = new SeedanceClient({\n * apiKey: 'your-api-key',\n * baseUrl: 'https://runapi.ai',\n * });\n *\n * const result = await client.textToVideo.run({\n * model: 'seedance-2.0',\n * prompt: 'A cat walking through a garden',\n * });\n * ```\n */\nexport class SeedanceClient {\n /** Video generation operations. */\n public readonly textToVideo: TextToVideo;\n\n constructor(options: ClientOptions = {}) {\n const http = createHttpClient(options);\n this.textToVideo = new TextToVideo(http);\n }\n}\n","import type { HttpClient, RequestOptions, PollingOptions } from '@runapi.ai/core';\nimport { compactParams } from '@runapi.ai/core';\nimport { pollUntilComplete } from '@runapi.ai/core/internal';\nimport type {\n CompletedTextToVideoResponse,\n TextToVideoParams,\n TextToVideoResponse,\n TaskCreateResponse,\n} from '../types';\n\nconst ENDPOINT = '/api/v1/seedance/text_to_video';\n\nexport class TextToVideo {\n constructor(private readonly http: HttpClient) {}\n\n async run(params: TextToVideoParams, options?: RequestOptions & PollingOptions): Promise<CompletedTextToVideoResponse> {\n const { id } = await this.create(params, options);\n const response = await pollUntilComplete<TextToVideoResponse>(() => this.get(id, options), {\n maxWaitMs: options?.maxWaitMs,\n pollIntervalMs: options?.pollIntervalMs,\n });\n return response as CompletedTextToVideoResponse;\n }\n\n async create(params: TextToVideoParams, options?: RequestOptions): Promise<TaskCreateResponse> {\n return this.http.request<TaskCreateResponse>('POST', ENDPOINT, {\n body: compactParams(params),\n ...options,\n });\n }\n\n async get(id: string, options?: RequestOptions): Promise<TextToVideoResponse> {\n return this.http.request<TextToVideoResponse>('GET', `${ENDPOINT}/${id}`, {\n ...options,\n });\n }\n}\n","export { SeedanceClient } from './client';\nexport * from './types';\n\nexport {\n RunApiError,\n AuthenticationError,\n InsufficientCreditsError,\n NotFoundError,\n ValidationError,\n RateLimitError,\n ServiceUnavailableError,\n NetworkError,\n TimeoutError,\n TaskTimeoutError,\n TaskFailedError,\n} from '@runapi.ai/core';\n"],"mappings":";AAAA,SAAS,wBAA4C;;;ACCrD,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAQlC,IAAM,WAAW;AAEV,IAAM,cAAN,MAAkB;AAAA,EACvB,YAA6B,MAAkB;AAAlB;AAAA,EAAmB;AAAA,EAAnB;AAAA,EAE7B,MAAM,IAAI,QAA2B,SAAkF;AACrH,UAAM,EAAE,GAAG,IAAI,MAAM,KAAK,OAAO,QAAQ,OAAO;AAChD,UAAM,WAAW,MAAM,kBAAuC,MAAM,KAAK,IAAI,IAAI,OAAO,GAAG;AAAA,MACzF,WAAW,SAAS;AAAA,MACpB,gBAAgB,SAAS;AAAA,IAC3B,CAAC;AACD,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,OAAO,QAA2B,SAAuD;AAC7F,WAAO,KAAK,KAAK,QAA4B,QAAQ,UAAU;AAAA,MAC7D,MAAM,cAAc,MAAM;AAAA,MAC1B,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AAAA,EAEA,MAAM,IAAI,IAAY,SAAwD;AAC5E,WAAO,KAAK,KAAK,QAA6B,OAAO,GAAG,QAAQ,IAAI,EAAE,IAAI;AAAA,MACxE,GAAG;AAAA,IACL,CAAC;AAAA,EACH;AACF;;;ADjBO,IAAM,iBAAN,MAAqB;AAAA;AAAA,EAEV;AAAA,EAEhB,YAAY,UAAyB,CAAC,GAAG;AACvC,UAAM,OAAO,iBAAiB,OAAO;AACrC,SAAK,cAAc,IAAI,YAAY,IAAI;AAAA,EACzC;AACF;;;AExBA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@runapi.ai/seedance",
3
- "version": "0.2.1",
3
+ "version": "0.2.4",
4
4
  "description": "RunAPI Seedance SDK for JavaScript, Ruby, and Go",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -30,7 +30,7 @@
30
30
  "test:manual": "pnpm run test:text2video"
31
31
  },
32
32
  "dependencies": {
33
- "@runapi.ai/core": "^0.2.1"
33
+ "@runapi.ai/core": "^0.2.4"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/node": "^20.0.0",
@@ -1,4 +1,25 @@
1
- # Seedance API Skill for RunAPI
1
+ <p align="center">
2
+ <a href="https://github.com/runapi-ai/seedance">
3
+ <h3 align="center">Seedance API Skill for RunAPI</h3>
4
+ </a>
5
+ </p>
6
+
7
+ <p align="center">
8
+ Install this agent skill, inspect Seedance fields, then run jobs through the RunAPI CLI.
9
+ </p>
10
+
11
+ <p align="center">
12
+ <a href="https://runapi.ai/models/seedance"><strong>Model Reference</strong></a> · <a href="https://github.com/runapi-ai/cli"><strong>CLI</strong></a> · <a href="https://github.com/runapi-ai/seedance-sdk"><strong>SDK</strong></a>
13
+ </p>
14
+
15
+ <div align="center">
16
+
17
+ [![skills.sh](https://www.skills.sh/b/runapi-ai/seedance)](https://www.skills.sh/runapi-ai/seedance/seedance)
18
+ [![ClawHub](https://img.shields.io/badge/ClawHub-runapi--seedance-111827)](https://clawhub.ai/runapi-ai/runapi-seedance)
19
+ [![License](https://img.shields.io/github/license/runapi-ai/seedance)](https://github.com/runapi-ai/seedance/blob/main/LICENSE)
20
+
21
+ </div>
22
+ <br/>
2
23
 
3
24
  Generate video with Seedance 1.5 Pro, 2.0, and 2.0 Fast text-to-video and image-to-video. This skill helps Claude Code, Codex, Gemini CLI, Cursor, and 50+ agents integrate Seedance through RunAPI.
4
25
 
@@ -10,7 +31,18 @@ The canonical agent file is `skills/seedance/SKILL.md`.
10
31
  npx skills add runapi-ai/seedance -g
11
32
  ```
12
33
 
13
- Or manually: clone this repo and copy `skills/seedance/` into your agent's skills directory.
34
+ Or paste this prompt to your AI agent:
35
+
36
+ ```text
37
+ Install the seedance skill for me:
38
+
39
+ 1. Clone https://github.com/runapi-ai/seedance
40
+ 2. Copy the skills/seedance/ directory into your
41
+ user-level skills directory (e.g. ~/.claude/skills/
42
+ for Claude Code, ~/.codex/skills/ for Codex).
43
+ 3. Verify that SKILL.md is present.
44
+ 4. Confirm the install path when done.
45
+ ```
14
46
 
15
47
  ## Quick example
16
48
 
@@ -1,211 +1,81 @@
1
1
  ---
2
2
  name: seedance
3
- description: Generate videos (Seedance 1.5 Pro, Seedance 2 / 2-fast text-to-video, image-to-video, frame mode, reference mode) through RunAPI.ai using the @runapi.ai/seedance Node/TypeScript SDK. Use when the user asks to add Seedance video generation, or writes against @runapi.ai/seedance. Triggers on "seedance", "即梦视频", "video generation", "生成视频", "@runapi.ai/seedance".
4
- documentation: https://runapi.ai/models/seedance
5
- provider_page: https://runapi.ai/providers/bytedance
6
- catalog: https://runapi.ai/models
3
+ description: Generate and edit video with Seedance through RunAPI. Use when the user asks an agent to create, edit, or transform video with Seedance. Default to the RunAPI CLI for one-off generation; use SDKs only when the user is integrating RunAPI into an app or backend.
4
+ documentation: https://runapi.ai/models/seedance.md
5
+ provider_page: https://runapi.ai/providers/bytedance.md
6
+ catalog: https://runapi.ai/models.md
7
+ metadata:
8
+ openclaw:
9
+ homepage: https://runapi.ai/models/seedance
10
+ requires:
11
+ bins:
12
+ - runapi
13
+ install:
14
+ - kind: brew
15
+ formula: runapi-ai/tap/runapi
16
+ bins:
17
+ - runapi
18
+ envVars:
19
+ - name: RUNAPI_API_KEY
20
+ required: false
21
+ description: Optional RunAPI API key; agents should prefer environment auth or saved CLI config. Browser login is interactive fallback only.
7
22
  ---
8
- # @runapi.ai/seedance — RunAPI.ai Seedance video generation
9
23
 
10
- Build Node / TypeScript integrations that generate Seedance video through RunAPI.ai.
24
+ # Seedance on RunAPI
11
25
 
12
- ## Setup
26
+ Generate and edit video with Seedance through RunAPI. The default path for one-off agent tasks is the `runapi` CLI; SDKs are for application integration.
13
27
 
14
- Requires **Node 18+** (global `fetch`).
28
+ ## Routing decision
15
29
 
16
- ```bash
17
- npm install @runapi.ai/seedance
18
- ```
30
+ - One-off generation, editing, or transformation for the user → use the **CLI path** with the `runapi` binary.
31
+ - Building an app, backend, worker, library, or production codebase → use the **SDK integration path**.
19
32
 
20
- Set your API key in the environment:
33
+ ## CLI path
21
34
 
22
- ```dotenv
23
- # .env
24
- RUNAPI_API_KEY=runapi_xxx # get one at https://runapi.ai/settings/api_keys
25
- ```
35
+ The `runapi` binary is the runtime dependency. Run `runapi auth status` first. For agents and headless runs, prefer `RUNAPI_API_KEY` or import it into saved config with `printf '%s' "$RUNAPI_API_KEY" | runapi auth import-token --token -`. Use `runapi login` only when the user explicitly wants interactive browser auth.
26
36
 
27
- ```ts
28
- import { SeedanceClient } from '@runapi.ai/seedance';
37
+ Inspect the available actions and request fields with CLI help:
29
38
 
30
- // The SDK reads RUNAPI_API_KEY from the environment automatically.
31
- const client = new SeedanceClient();
39
+ ```shell
40
+ runapi seedance --help
41
+ runapi seedance text-to-video --help
32
42
  ```
33
43
 
34
- Pass `{ apiKey }` explicitly if you manage secrets differently. `baseUrl` defaults to `https://runapi.ai`; override only for local development.
35
-
36
- ## Core recipe — text to video
44
+ Run a one-off task (synchronous polls until the task completes):
37
45
 
38
- ```ts
39
- const result = await client.textToVideo.run({
40
- model: 'seedance-2',
41
- prompt: 'A drone shot over mountains at sunset',
42
- aspect_ratio: '16:9',
43
- duration: 8,
44
- });
45
-
46
- const url = result.videos[0].url;
46
+ ```shell
47
+ runapi seedance text-to-video --input-file request.json
47
48
  ```
48
49
 
49
- `run()` creates the task, auto-polls, and resolves only when the task completes — `videos[0].url` is guaranteed on the resolved value. On failure it throws `TaskFailedError`; on polling timeout it throws `TaskTimeoutError`. Use `run()` for scripts and short-lived processes. For request handlers, split it:
50
+ Submit asynchronously and poll separately:
50
51
 
51
- ```ts
52
- const { id } = await client.textToVideo.create({ model: 'seedance-2', prompt: '...' });
53
- // return 202 immediately; fetch later:
54
- const status = await client.textToVideo.get(id);
55
- if (status.status === 'completed') { /* ... */ }
52
+ ```shell
53
+ runapi seedance text-to-video --async --input-file request.json
54
+ runapi wait <task-id> --service seedance --action text-to-video
56
55
  ```
57
56
 
58
- Do not hold a web worker open waiting on `run()`. Split + webhook is the production pattern.
59
-
60
- `run()` polls every 2 s for up to 15 min by default. Tune when needed:
61
-
62
- ```ts
63
- await client.textToVideo.run(params, { maxWaitMs: 30 * 60_000, pollIntervalMs: 5_000 });
64
- ```
65
-
66
- If `TaskTimeoutError` fires, the task is still running server-side — resume with `textToVideo.get(id)` or finish via webhook.
67
-
68
- ## Image-to-video (seedance-1.5-pro)
69
-
70
- ```ts
71
- await client.textToVideo.run({
72
- model: 'seedance-1.5-pro',
73
- prompt: 'The flower blooms and petals scatter',
74
- aspect_ratio: '16:9',
75
- input_urls: ['https://cdn.example.com/flower.jpg'],
76
- resolution: '1080p',
77
- duration: 8,
78
- lock_camera: true, // lock camera movement
79
- });
80
- ```
81
-
82
- ## Frame mode (seedance-2 / 2-fast)
83
-
84
- Guide with first (required) and optional last frame. **Mutually exclusive with reference mode.**
85
-
86
- ```ts
87
- await client.textToVideo.run({
88
- model: 'seedance-2',
89
- prompt: 'A sunrise over the ocean',
90
- first_frame_url: 'https://cdn.example.com/start.jpg',
91
- last_frame_url: 'https://cdn.example.com/end.jpg',
92
- });
93
- ```
94
-
95
- ## Reference mode (seedance-2 / 2-fast)
96
-
97
- Guide with reference images, videos, or audio. **Mutually exclusive with frame mode.**
98
-
99
- ```ts
100
- await client.textToVideo.run({
101
- model: 'seedance-2',
102
- prompt: 'A person dancing in the same style',
103
- reference_video_urls: ['https://cdn.example.com/dance.mp4'],
104
- reference_audio_urls: ['https://cdn.example.com/beat.mp3'],
105
- });
106
- ```
107
-
108
- ## Models
109
-
110
- | `model` | Modes | Notes |
111
- |---|---|---|
112
- | `seedance-1.5-pro` | text-to-video, image-to-video (`input_urls`), `lock_camera` | `aspect_ratio` required. `resolution`: `480p` / `720p` / `1080p`. `duration`: 4 / 8 / 12. |
113
- | `seedance-2` | text / frame / reference | `resolution`: `480p` / `720p` / `1080p`. `duration`: integer 4–15. |
114
- | `seedance-2-fast` | text / frame / reference | Faster, cheaper variant of `seedance-2`. `resolution`: `480p` / `720p`. |
115
- | `seedance-v1-lite` | text-to-video, image-to-video (auto-detected via `input_urls`) | `aspect_ratio` required in text mode (`…, 9:21`). `resolution`: `480p` / `720p` / `1080p`. `duration`: `"5"` or `"10"`. Image mode supports `last_frame_url`. Extras: `seed`, `enable_safety_checker`, `lock_camera`. |
116
- | `seedance-v1-pro` | text-to-video, image-to-video (auto-detected via `input_urls`) | Same as v1-lite but `aspect_ratio` set is `…, 21:9`. No `last_frame_url`. |
117
- | `seedance-v1-pro-fast` | image-to-video only | `input_urls` required. `resolution`: `720p` / `1080p`. `duration`: `"5"` or `"10"`. Narrow param set — no `aspect_ratio` / `lock_camera` / `seed` / `enable_safety_checker`. |
118
-
119
- Exact credit costs per model are shown at https://runapi.ai/pricing and in the dashboard — do not hardcode prices in application code.
120
-
121
- ## Callbacks (webhooks)
122
-
123
- Pass `callback_url` on `create()` (or any `run()` call) and RunAPI will POST the final payload to you:
124
-
125
- ```ts
126
- await client.textToVideo.create({
127
- model: 'seedance-2',
128
- prompt: '...',
129
- callback_url: 'https://your.app/webhooks/runapi/seedance',
130
- });
131
- ```
132
-
133
- Payload shape:
134
-
135
- ```ts
136
- { id: string; status: 'completed' | 'failed'; videos?: { url: string }[]; last_frame_url?: string; error?: string }
137
- ```
138
-
139
- **Always verify the signature before trusting the body.** RunAPI signs every callback with your account's Callback Secret (rotate at `/accounts/callback_secret`). Headers:
140
-
141
- - `X-Callback-Id` — UUID, store to make handler idempotent
142
- - `X-Callback-Timestamp` — unix seconds, reject if `|now - ts| > 300`
143
- - `X-Callback-Signature` — base64 HMAC-SHA256 over `` `${id}.${ts}.${rawBody}` `` using the base64-decoded secret
144
-
145
- ```ts
146
- import crypto from 'node:crypto';
147
-
148
- function verify(raw: string, id: string, ts: string, sig: string, secret: string) {
149
- const key = Buffer.from(secret, 'base64');
150
- const mac = crypto.createHmac('sha256', key)
151
- .update(`${id}.${ts}.${raw}`)
152
- .digest('base64');
153
- return crypto.timingSafeEqual(Buffer.from(mac), Buffer.from(sig));
154
- }
155
- ```
156
-
157
- Reply `2xx` within 10s; any non-2xx triggers retries.
158
-
159
- ## Errors
160
-
161
- All errors are re-exported from `@runapi.ai/core`. Always `instanceof` — never string-match messages.
162
-
163
- | Error | Status | Action |
164
- |---|---|---|
165
- | `AuthenticationError` | 401 | abort; surface "reconnect your API key" |
166
- | `InsufficientCreditsError` | 402 | prompt user to top up at runapi.ai/billing |
167
- | `ValidationError` | 400 / 422 | fix params; do not retry |
168
- | `RateLimitError` | 429 | sleep `err.retryAfterMs`, then retry |
169
- | `ServiceUnavailableError` | 503 / 455 | retry with backoff; transient service issue |
170
- | `TaskFailedError` | — | show `err.details` to user; do not auto-retry |
171
- | `TaskTimeoutError` | — | re-poll with `textToVideo.get(id)` |
172
-
173
- ```ts
174
- import { InsufficientCreditsError, TaskFailedError } from '@runapi.ai/seedance';
175
-
176
- try {
177
- await client.textToVideo.run({ model: 'seedance-2', prompt: '...' });
178
- } catch (err) {
179
- if (err instanceof InsufficientCreditsError) { /* surface top-up CTA */ }
180
- else if (err instanceof TaskFailedError) { /* show err.details */ }
181
- else throw err;
182
- }
183
- ```
57
+ Available actions: `text-to-video`.
184
58
 
185
- ## Gotchas
59
+ ## SDK integration path
186
60
 
187
- - `model` is required on every call.
188
- - For `seedance-1.5-pro`, `aspect_ratio` is required and `resolution`/`duration` use a different set of values than the 2.x models.
189
- - For `seedance-2` / `seedance-2-fast`, **frame mode and reference mode are mutually exclusive** — do not send both `first_frame_url` and `reference_*_urls` in the same request.
190
- - `aspect_ratio: 'auto'` is 2.x-only (useful with frame mode to inherit dimensions from the reference frame).
191
- - `reference_audio_urls` requires at least one `reference_image_urls` or `reference_video_urls` to be set.
192
- - `last_frame_url` is optional in the response and may be absent.
193
- - `callback_url` must be reachable from the public internet. `localhost` / `127.0.0.1` URLs will never fire — use a tunnel (cloudflared, ngrok, tailscale funnel) when developing locally.
61
+ When integrating Seedance into an app, backend, worker, or library — not for one-off tasks use a RunAPI SDK package:
194
62
 
195
- ## Dig deeper
63
+ - JavaScript / TypeScript: `@runapi.ai/seedance`
64
+ - Ruby: `runapi-seedance`
65
+ - Go: `github.com/runapi-ai/seedance-sdk/go`
196
66
 
197
- Package README (full API surface, all params): `node_modules/@runapi.ai/seedance/README.md`. Types: `@runapi.ai/seedance/dist/types.d.ts`. Product docs: https://runapi.ai/docs.
67
+ ## References
198
68
 
199
- ## RunAPI public routing
69
+ - Model overview, pricing, and rate limits: https://runapi.ai/models/seedance.md
70
+ - Provider comparison: https://runapi.ai/providers/bytedance.md
71
+ - Full model catalog: https://runapi.ai/models.md
200
72
 
201
- seedance api public links use the API-379 catalog route map. The main seedance api page is https://runapi.ai/models/seedance. SDK docs live at https://runapi.ai/docs#sdk-seedance and product docs live at https://runapi.ai/docs#seedance.
73
+ ## Variants
202
74
 
203
- Pricing, rate limits, and commercial usage for seedance api should point to the most specific variant page:
204
- - [v1 lite](https://runapi.ai/models/seedance/v1-lite)
205
- - [v1 pro](https://runapi.ai/models/seedance/v1-pro)
206
- - [v1 pro fast](https://runapi.ai/models/seedance/v1-pro-fast)
207
- - [1.5 pro](https://runapi.ai/models/seedance/1.5-pro)
208
- - [2.0](https://runapi.ai/models/seedance/2.0)
209
- - [2.0 fast](https://runapi.ai/models/seedance/2.0-fast)
75
+ - [v1 lite](https://runapi.ai/models/seedance/v1-lite.md)
76
+ - [v1 pro](https://runapi.ai/models/seedance/v1-pro.md)
77
+ - [v1 pro fast](https://runapi.ai/models/seedance/v1-pro-fast.md)
78
+ - [1.5 pro](https://runapi.ai/models/seedance/1.5-pro.md)
79
+ - [2.0](https://runapi.ai/models/seedance/2.0.md)
80
+ - [2.0 fast](https://runapi.ai/models/seedance/2.0-fast.md)
210
81
 
211
- Compare Seedance with other Bytedance models at https://runapi.ai/providers/bytedance. Browse every RunAPI model and skill at https://runapi.ai/models. SDK repository: https://github.com/runapi-ai/seedance-sdk. Skill repository: https://github.com/runapi-ai/seedance.