ByteDance
The ByteDance provider contains support for the Seedance family of video generation models and the Seedream family of image generation models through the BytePlus ModelArk platform. Seedance provides high-quality text-to-video and image-to-video generation capabilities, including audio-video synchronization, first-and-last frame control, and multi-reference image generation (see the video generation API). Seedream provides text-to-image and image-to-image generation, including multi-image blending and batch image generation (see the image generation API).
You can use ByteDance models through AI Gateway (recommended) or connect directly with @ai-sdk/bytedance.
Using AI Gateway
The AI SDK uses AI Gateway by default for model strings. Gateway provides access to models across providers through a single API key, with usage and cost tracking. Install ai:
$ pnpm add ai
$ npm install ai
$ yarn add ai
$ bun add ai
Set an AI Gateway API key in your environment:
Vercel deployments can also use OIDC authentication. See the AI Gateway provider documentation for configuration and the model catalog for available models.
Gateway feature and provider-option support depends on the model and the provider serving the request. See Gateway provider options.
Using @ai-sdk/bytedance
For direct access to ByteDance, install ai and @ai-sdk/bytedance:
$ pnpm add ai @ai-sdk/bytedance
$ npm install ai @ai-sdk/bytedance
$ yarn add ai @ai-sdk/bytedance
$ bun add ai @ai-sdk/bytedance
Set your ByteDance API credential in the ARK_API_KEY environment variable:
AI Gateway does not expose every API in @ai-sdk/bytedance. Use the direct provider for provider-specific APIs or custom connection settings.
The following sections document the direct @ai-sdk/bytedance provider,
including its model factories and settings. Gateway model and feature
availability can differ.
Provider Instance
You can import the default provider instance byteDance from @ai-sdk/bytedance:
If you need a customized setup, you can import createByteDance and create a provider instance with your settings:
You can use the following optional settings to customize the ByteDance provider instance:
-
baseURL string
Use a different URL prefix for API calls, e.g. to use proxy servers. The default prefix is
https://ark.ap-southeast.bytepluses.com/api/v3. -
apiKey string | PromiseLike<string> | (() => string | PromiseLike<string>)
Pass a function to resolve credentials before each request, including when keys rotate. The function can return a string or a promise. Credential caching and refresh are managed by the function.
API key that is being sent using the
Authorizationheader. It defaults to theARK_API_KEYenvironment variable. You can obtain an API key from the BytePlus console. -
headers Record<string,string>
Custom headers to include in the requests.
-
fetch (input: RequestInfo, init?: RequestInit) => Promise<Response>
Custom fetch implementation. You can use it as a middleware to intercept requests, or to provide a custom fetch implementation for e.g. testing.
Image Models
You can create ByteDance Seedream image models using the .image() factory method.
For more on image generation with the AI SDK see generateImage().
Text-to-Image
Generate images from text prompts:
ByteDance identifies Seedream models by their ModelArk model id (e.g.
seedream-5-0-260128) or an account-specific endpoint id (e.g. ep-...). The
size parameter accepts pixel dimensions ({width}x{height}); resolution
levels such as 2K can be passed via providerOptions.bytedance.size.
Image Editing
Pass input images via prompt.images to transform an existing image
(image-to-image):
You can also pass multiple images to blend styles and elements from several references into a single output (multi-image blending). Images may be provided as binary data, base64 strings, or URLs:
Seedream does not support mask-based inpainting. Describe the edit in the
prompt, optionally with markers drawn on the input image (interactive editing,
supported by dola-seedream-5-0-pro-260628).
Image Model Options
The following options are available via providerOptions.bytedance. You can
type them with ByteDanceImageModelOptions.
-
watermark boolean
Whether to add an "AI generated" watermark to the bottom-right corner of the output image.
-
outputFormat 'png' | 'jpeg'
Format of the generated image file. Supported by
seedream-5-0anddola-seedream-5-0-pro;seedream-4-5/seedream-4-0always returnjpeg. -
size string
A resolution level (e.g.
1K,2K,3K,4K) as an alternative to passing pixel dimensions via the top-levelsizeparameter. When set, this overrides the top-levelsize. Available levels vary by model. -
sequentialImageGeneration 'auto' | 'disabled'
Set to
'auto'to generate a batch of related images (e.g. storyboards or brand visuals). Defaults to'disabled'(single image). -
maxImages number
Maximum number of images to generate when
sequentialImageGenerationis'auto'. The number of input reference images plus generated images must not exceed the model's limit. -
optimizePromptMode 'standard' | 'fast'
Prompt optimization mode.
seedream-4-0supports bothstandardandfast; other models supportstandardonly.
Additional ModelArk fields can also be passed through
providerOptions.bytedance and are validated by ModelArk.
Image Model Capabilities
| Model | Name | Capabilities | Image Editing | Mask Input | Max Images Per Call |
|---|---|---|---|---|---|
dola-seedream-5-0-pro-260628 | Seedream 5.0 Pro | Text-to-image, single/multi image-to-image, interactive editing (markers). Sizes: 1K, 2K. Formats: png, jpeg. Up to 10 references. | 1 | ||
seedream-5-0-260128 | Seedream 5.0 Lite | Text-to-image, single/multi image-to-image, batch generation. Sizes: 2K, 3K, 4K. Formats: png, jpeg. Up to 14 references. | 1 | ||
seedream-5-0-lite-260128 | Seedream 5.0 Lite | Text-to-image, single/multi image-to-image, batch generation. Sizes: 2K, 3K, 4K. Formats: png, jpeg. Up to 14 references. | 1 | ||
seedream-4-5-251128 | Seedream 4.5 | Text-to-image, single/multi image-to-image, batch generation. Sizes: 2K, 4K. Format: jpeg. Up to 14 references. | 1 | ||
seedream-4-0-250828 | Seedream 4.0 | Text-to-image, single/multi image-to-image, batch generation, fast prompt mode. Sizes: 1K, 2K, 4K. Format: jpeg. Up to 14 references. | 1 |
You can also pass any model or endpoint id string if needed, e.g. for future models not yet listed here. Streaming image output is not currently supported through the AI SDK integration.
Video Models
You can create ByteDance video models using the .video() factory method.
For more on video generation with the AI SDK see generateVideo().
Text-to-Video
Generate videos from text prompts:
Image-to-Video
Generate videos from a first-frame image with an optional text prompt:
When the output ratio is dictated by an input — first-frame or
first-and-last-frame image-to-video, video editing, and video extension — pass
aspectRatio: 'adaptive' or omit aspectRatio entirely. Newer Seedance
models reject an explicit ratio on those paths, because the output inherits
the ratio of the input media.
Image-to-Video with Audio
Seedance 1.5 Pro supports generating synchronized audio alongside the video:
First-and-Last Frame Video
Generate smooth transitions between a starting and ending keyframe image:
Multi-Reference Image-to-Video
Using the Seedance 1.0 Lite I2V model, you can provide multiple reference images (1-4) that the model uses to faithfully reproduce object shapes, colors, and textures:
Reference Video
Seedance 2.0 supports reference videos that guide the style, motion, or composition of the generated video:
Reference Audio
Seedance 2.0 supports reference audio that is used as background music or sound for the generated video:
Caller-Managed Callbacks
Use experimental_startVideo({ model, prompt, webhookUrl }) to register an
application-owned callback receiver. The SDK forwards webhookUrl as
callback_url, taking precedence over providerOptions.bytedance.callback_url.
When webhookUrl is omitted, a raw callback_url is passed through unchanged.
The BytePlus callback protocol
sends progress notifications ('queued' or 'running') as well as terminal
notifications ('succeeded', 'failed', or 'expired'). Your receiver must
filter progress notifications and correlate callbacks with the task. Use
experimental_getVideoStatus(model, { operation }) with the operation returned
by experimental_startVideo to check status and retrieve the result after a
terminal notification. Expired tasks return an error status with the provider's
diagnostic details.
These models deliberately do not expose handleWebhookOption because their
callback protocol requires a progress-aware receiver. Core
generateVideo({ webhook })
falls back to polling without calling the webhook factory. Plain
generateVideo() also polls. Workflow's existing native webhook capability
check rejects these direct provider models for webhook-based generation;
use the explicit start/status flow for caller-managed callbacks.
Video Model Options
The following options are available via providerOptions.bytedance. You can
type them with ByteDanceVideoModelOptions.
Generation Options
-
watermark boolean
Whether to add a watermark to the generated video.
-
generateAudio boolean
Whether to generate synchronized audio for the video. Supported by Seedance 1.5 Pro and Seedance 2.0.
-
cameraFixed boolean
Whether to fix the camera during generation.
-
returnLastFrame boolean
Whether to return the last frame of the generated video. Useful for chaining consecutive videos.
-
serviceTier 'default' | 'flex'
Inference tier.
'default'for online inference.'flex'for offline inference at 50% of the price, with higher latency (response times on the order of hours). -
draft boolean
Enable draft sample mode for low-cost preview generation. Only supported by Seedance 1.5 Pro. Generates a 480p preview video for rapid iteration before committing to a full-quality generation.
Image Input Options
-
lastFrameImage string
URL of the last frame image for first-and-last frame video generation. The model generates smooth transitions between the first frame (provided via the
imageprompt) and this last frame. Supported by Seedance 1.5 Pro, 1.0 Pro, and 1.0 Lite I2V. -
referenceImages string[]
Array of reference image URLs for multi-reference image-to-video generation. The model extracts key features from each image and reproduces them in the video. Use
[Image 1],[Image 2], etc. in your prompt to reference specific images.
Media Reference Options
-
referenceVideos string[]
Array of reference video URLs (up to 3 videos, max 15 seconds each) for reference-guided video generation. The model uses the referenced videos to guide style, motion, or composition. Supported by Seedance 2.0.
-
referenceAudio string[]
Array of reference audio URLs (up to 3, max 15 seconds each) for audio-guided video generation. The model uses the referenced audio as background music or synchronized sound. Supports data URIs (e.g.,
data:audio/wav;base64,...). Supported by Seedance 2.0.
Polling Options
ByteDance video generation is task-based: the provider creates a task and the AI
SDK polls it until it completes. Configure polling with the top-level poll
option of generateVideo():
The configured ByteDance API origin is trusted for the first status request, while every redirect to another origin is validated before it is followed.
The pollIntervalMs and pollTimeoutMs provider options are deprecated and
ignored. Passing either emits a warning. Video generation can take several
minutes, so raise poll.timeoutMs above the 10 minute default for long jobs.
Video Model Capabilities
| Model | Name | Capabilities | Image Input | First Frame | Last Frame | Reference Images | Reference Video | Audio | Aspect Ratio | Resolution | Duration | FPS | Seed |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dreamina-seedance-2-0-fast-260128 | Seedance 2.0 Fast | T2V, I2V, reference videos (up to 3), reference audio (up to 3), audio-video sync. Optimized for speed. Duration: 4-15s. Resolution: 480p, 720p. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires a model supporting first and last frames. | Conditional: Requires a model supporting reference images. | Conditional: Requires Seedance 2.0. | Conditional: Requires an audio-capable Seedance model. | |||||
dreamina-seedance-2-0-260128 | Seedance 2.0 | T2V, I2V, reference videos (up to 3), reference audio (up to 3), audio-video sync. Duration: 4-15s. Resolution: 480p, 720p. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires a model supporting first and last frames. | Conditional: Requires a model supporting reference images. | Conditional: Requires Seedance 2.0. | Conditional: Requires an audio-capable Seedance model. | |||||
seedance-1-5-pro-251215 | Seedance 1.5 Pro | T2V, I2V (first frame), I2V (first+last frame), audio-video sync, draft mode. Duration: 4-12s. Resolution: 480p, 720p, 1080p. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires a model supporting first and last frames. | Conditional: Requires a model supporting reference images. | Conditional: Requires Seedance 2.0. | Conditional: Requires an audio-capable Seedance model. | |||||
seedance-1-0-pro-250528 | Seedance 1.0 Pro | T2V, I2V (first frame), I2V (first+last frame). Duration: 2-12s. Resolution: 480p, 720p, 1080p. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires a model supporting first and last frames. | Conditional: Requires a model supporting reference images. | Conditional: Requires Seedance 2.0. | Conditional: Requires an audio-capable Seedance model. | |||||
seedance-1-0-pro-fast-251015 | Seedance 1.0 Pro Fast | T2V, I2V (first frame). Optimized for speed and cost. Duration: 2-12s. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires a model supporting first and last frames. | Conditional: Requires a model supporting reference images. | Conditional: Requires Seedance 2.0. | Conditional: Requires an audio-capable Seedance model. | |||||
seedance-1-0-lite-t2v-250428 | Seedance 1.0 Lite (T2V) | Text-to-video only. Duration: 2-12s. Resolution: 480p, 720p, 1080p. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires a model supporting first and last frames. | Conditional: Requires a model supporting reference images. | Conditional: Requires Seedance 2.0. | Conditional: Requires an audio-capable Seedance model. | |||||
seedance-1-0-lite-i2v-250428 | Seedance 1.0 Lite (I2V) | I2V (first frame), I2V (first+last frame), multi-reference images (1-4). Duration: 2-12s. Resolution: 480p, 720p. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires an image-capable Seedance model. | Conditional: Requires a model supporting first and last frames. | Conditional: Requires a model supporting reference images. | Conditional: Requires Seedance 2.0. | Conditional: Requires an audio-capable Seedance model. |
Supported aspect ratios: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive (image-to-video only).
All models output MP4 video at 24 fps.
You can also pass any model ID string if needed, e.g. for future models not yet listed here.
Provider Option Reference
The following option definitions are generated from the provider catalog.
| Operation | Option | Description |
|---|---|---|
| image | watermark | Whether to add an "AI generated" watermark to the bottom-right corner of the output image. |
| image | outputFormat | Format of the generated image file. Supported by seedream-5-0 and dola-seedream-5-0-pro; seedream-4-5 / seedream-4-0 always return jpeg. |
| image | size | A resolution level (e.g. 1K, 2K, 3K, 4K) as an alternative to passing pixel dimensions via the top-level size parameter. When set, this overrides the top-level size. Available levels vary by model. |
| image | sequentialImageGeneration | Set to 'auto' to generate a batch of related images (e.g. storyboards or brand visuals). Defaults to 'disabled' (single image). |
| image | maxImages | Maximum number of images to generate when sequentialImageGeneration is 'auto'. The number of input reference images plus generated images must not exceed the model's limit. |
| image | optimizePromptMode | Prompt optimization mode. seedream-4-0 supports both 'standard' and 'fast'; other models support 'standard' only. |
| video | watermark | watermark |
| video | generateAudio | generateAudio |
| video | cameraFixed | cameraFixed |
| video | returnLastFrame | returnLastFrame |
| video | serviceTier | serviceTier |
| video | draft | draft |
| video | lastFrameImage | lastFrameImage |
| video | referenceImages | referenceImages |
| video | referenceVideos | referenceVideos |
| video | referenceAudio | referenceAudio |
| video | pollIntervalMs | pollIntervalMs |
| video | pollTimeoutMs | pollTimeoutMs |