Generate

API Reference

The request, configuration, and response models shared by the REST API and the Python client.

These models define the generation request body, its configuration objects, and the status response. They are identical across the REST API and the Python client.

TaskInput

The JSON body of POST /api/v0/generate (and the argument to the client's submit_task). model and task_type are required; the rest depend on the task type.

How is size determined?

For image/video sizing config, VideoConfig and ImageConfig take 3 optional params: width, height and aspect_ratio. The following strategy will be followed:

  1. If both width and height are specified, they take precedence over aspect_ratio.
  2. If aspect_ratio is missing, for image it defaults to 1:1 and for video it defaults to 16:9.
  3. If only height is specified, the width will be calculated based on aspect_ratio (and rounded up if needed).
  4. Other cases are considered invalid and rejected.

Some models accept only a fixed set of explicit width×height sizes and do not use the height + aspect_ratio derivation above; for those, pass one of the model's supported sizes. height is required for all documented image and video task types.

FieldTypeRequiredDefaultDescription
modelstrYes-Model id, e.g. 'MiniMax-H3', 'Kling-v3'.
task_typestrYes-one of:
T2I, I2I (image), T2V, I2V, R2V (video), UPSCALE (image or video based on input type), SHARPEN (video), T2S, T2D, T2SFX, V2SFX, T2M (audio)
promptstrYes-Text prompt driving generation. Unused for T2D, whose text lives in audio_config.turns.
enhance_promptbool | None-NoneEnhance the prompt to get expected output. Most users should leave this in default setting. For new generation of models (LTX, MiniMax-H3 and beyond), turning off prompt enhancement would severely degrade quality. One should only disable for debugging purpose or advanced use cases.
prompt_enhancement_levelLiteral[DEFAULT, FAST, BALANCED, DEEP] | None-None
prompt_enhancerstr | None-NoneWhat prompt enhancer to use.
Options are: default, native. If not specified, the default will be used.

default: use MachGen fine-tuned prompt enhancer for faster, quality output
native: the original enhancer paired with the model (This is slower and should only be used if the default one shows issues.)

If the model does not have one, this option will fallback to the default.
video_configVideoConfig | None-NoneRequired for video task types.
safety_identifierstr | None-NoneStable identifier for safety monitoring. Use a pseudonymous value rather than personal information. Supported by models with safety identifier controls. Seedream accepts up to 64 ASCII characters and stores and echoes the value on the platform; upstream forwarding is not guaranteed.
image_outputImageOutputOptions | None-NoneOptional image rendering controls. Check the model's supported options before submitting.
image_configImageConfig | None-NoneRequired for image task types.
audio_configAudioConfig | None-NoneRequired for audio task types.
upscale_configUpscaleConfig | None-NoneEngine and tuning knobs for UPSCALE.
edit_configEditConfig | None-None
modestr | None-NoneTRAINING only: what to produce. 'LORA' trains an adapter over the frozen base model; 'FULL_MODEL' tunes every weight.
train_configTrainConfig | None-NoneRequired for the TRAINING task type.
seedint | None-NoneSeed for reproducible generation. If not specified, a random seed will be used.
optimization_levelstr | None-NoneSpeed/quality trade-off tier: 'STANDARD/FAST/EXPRESS'. Higher optimization level means more aggressive optimizations, while lower level means more quality details. When not set, default levels are automatically applied.

For GPT Image 2 (T2I and I2I), 'STANDARD' uses high image quality (default), and 'EXPRESS' uses low image quality.
adapterstr | None-NoneLoRA selector for the model, if supported. Omit to use the model's default.

Currently supported on MiniMax-H3-Turbo (T2V, I2V, R2V):
larryvrh_v4_step600_ema - 6 steps.
lightx2v_fl2v_8step_v10_native - 8 steps.
silveroxides_dareties_fro099_v2 - 6 steps.
plaguekind_parasyte_turbo - 6 steps.
silveroxides_4to8_dareties_v2 - 6 steps.
hyperflow - 8 steps.
pika_h3_flex - 6 steps.
src_image_urlslist[str] | None-NoneSource / reference image URLs. For I2V, entry 0 is the start frame and an optional entry 1 is the end frame. For R2V, these are used as references, and subject_to_image_ids must be used if any @ handles are used in the prompt as references to the subjects. Public image URLs or base64 encoded data URLs can be used.
keyframe_indiceslist[Literal[0, -1]] | None-NoneI2V only: where each src_image_urls entry sits in the output, aligned 1:1 with that list. 0 is the first frame and -1 the last frame, so [0], [0, -1] and [-1] are the accepted values. Omitted keeps the positional reading (entry 0 first, entry 1 last). [-1] alone animates towards a single end frame and is honored only by models that declare it (MiniMax-H3).
src_video_urlslist[str] | None-NoneReference video URLs. Public http(s) URLs only. For V2SFX, the single clip to score.
src_audio_urlslist[str] | None-NoneReference audio URLs for R2V surfaces that declare audio-reference support. Limits and whether audio may be sent alone are model-specific and enforced by the synced capability contract.
src_task_idslist[str] | None-NoneThe output artifact (video, image or trained weights) generated from the upstream task(s) will be used as the input together with its input unless overridden in this task. For most tasks (UPSCALE etc.), this should be a singleton list only. For TRAINING, the new training starts from the weights of the upstream training's last checkpoint, with a fresh optimizer. Invalid input will be rejected.
src_file_urlslist[str] | None-NonePublic HTTPS document URLs or local paths for R2V surfaces that declare file input support. This mode may be mutually exclusive with ordinary media references on a given model. Local paths are uploaded by the Python client before submission.
src_webpage_urlslist[str] | None-NonePublicly reachable HTTPS webpage URLs for R2V surfaces that can use a linked page as input. This mode may be mutually exclusive with files and ordinary media references on a given model.
reference_video_operationLiteral[reference, edit, extend] | None-NoneHow the primary reference video is used on R2V surfaces that declare these operations. 'reference' conditions a new video, 'edit' modifies the primary clip while matching its framing and length, and 'extend' continues it with a requested output length. The primary clip is src_video_urls[0]. Omitted preserves legacy provider-classified behavior.
reference_video_start_secslist[float] | None-NoneR2V only: where each reference video starts being read, in seconds from the beginning of the clip, aligned 1:1 with src_video_urls as it stands after src_task_ids routing. Each value is >= 0 and must fall inside the clip; the remaining length is what the model sees and what is billed. Omitted reads every clip from 0. A non-zero start is honored only by models that declare it (MiniMax-H3).
subject_to_image_idsdict[str, list[int]] | None-NoneR2V only: maps a subject name to the indices of its reference images in src_image_urls, e.g. {'alice': [0, 1], 'bob': [2]}. The prompt may address a subject via '@name'. Honored by vendors with named subjects (Vidu reference2video).
subject_to_video_idsdict[str, list[int]] | None-NoneR2V only: subject_to_image_ids for src_video_urls. A name may appear in only one of the three subject maps. Seedance 2.0 family only.
subject_to_audio_idsdict[str, list[int]] | None-NoneR2V only: subject_to_image_ids for src_audio_urls. A name may appear in only one of the three subject maps. Seedance 2.0 family only.
reference_orderlist[ReferenceOrderItem] | None-NoneR2V only: original order across image, video, and audio references. Each entry points to the matching src_*_urls list.
src_mask_urlstr | None-NoneOptional PNG edit mask matching the first reference image. Transparent areas identify the region to edit. Supported only by models that accept masks.
src_markup_urlstr | None-NoneOptional transparent PNG annotation layer matching the first reference image after orientation. Keep the original image separate. Cannot be combined with an edit mask. Supported only by models that accept markup.
continuation_task_idstr | None-NoneOptional completed task ID to continue editing, extending, or upscaling with its prior provider context. The task must belong to you and use the same model. For video editing or extension, explicitly set reference_video_operation to edit or extend. For UPSCALE, use this field to reuse provider context without resending the video; use src_task_ids to submit the completed video as a new input instead. Supported only by models and operations that accept continuation.
moderatebool-TrueWhether this request is screened by content moderation.
webhook_urlstr | None-NoneAsync generate only: https URL on a public host that receives the task's final status as one POST, using the same JSON as GET /tasks/{id} with the task id in the X-Task-Id header. Fires on every terminal state, including failure. Delivery is best-effort if the endpoint returns errors (non-2xx HTTP code). Redirects and private addresses are not followed. Delivery status for each webhook is shown under Webhooks on your profile page.
project_idslist[str] | None-NoneOptional project ids to specify which projects this request belongs to. A request can be placed into multiple projects if needed.

Gemini Omni video quotes

With access to Gemini-Omni-1.2-Flash, send your generation request body to POST /api/v0/generate/quote with your usual API authorization. The response contains cost_micros in millionths of a US dollar. Submission also checks file formats, combined upload size and other generation limits. Use POST /api/v0/upscale/quote for standalone upscaling.

At standard rates, a five-second 720p video costs $0.347520. One reference image brings it to $0.349200. Each second of reference video adds $0.008688, including audio. Edits use the source duration for output. Extensions charge for at most ten seconds of input and only the newly requested output seconds. Standalone upscaling charges only for output. Prompt text and reasoning are included. Your account prices and promotions apply at submission.

VideoConfig

Required for video task types (T2V, I2V, R2V). Set the length with either duration_secs or num_frames - see Set a video's length.

For models with optional audio, set video_config.audio to true or false for each API request. Omitting the field or passing null uses the model default. MCP remembers your last explicit audio choice from an accepted MCP submission.

FieldTypeRequiredDefaultDescription
fpsint | None-NoneVideo frames per second. If omitted the default FPS would be used based on the model.
duration_secsint | None-NoneVideo duration in seconds. Where a surface allows it, -1 asks the model to determine the length from the request, such as matching a reference clip or selecting a smart output duration. Allowed values are enforced by the synced capability contract. Omit when num_frames is set.
num_framesint | None-NoneVideo length as a frame count, an alternative to duration_secs. Send exactly one of the two. The model renders the nearest frame count it supports. Response metadata reports the delivered frame count, which can be smaller when the output is trimmed.
heightint | None-NoneOutput height in pixels. Required for generation (a missing height is rejected at submit). For UPSCALE on a video upscale model this is the target resolution tier - the output's shorter side - and both output dimensions are derived from the source, preserving its aspect ratio.
widthint | None-NoneOutput width in pixels.
aspect_ratiostr | None-NoneOutput aspect ratio. The model capability contract declares the omission default; most models use 16:9, while source-aware models may use adaptive. The width of the output will be updated to match the height based on the aspect ratio, rounded up to the nearest integer.
bitrate_modestr | None-NoneEncode quality for the delivered video: 'standard' or 'high'. Supported for Seedance-2.0 and Seedance-2.0-Fast. Omitted -> the vendor default.
dynamic_rangestr | None-NoneOutput dynamic range for the delivered video: 'sdr' or 'hdr' (10-bit HDR). 'hdr' is supported only on models and resolutions that declare HDR support (such as Kling-v4 at 1080p and 2160p). Omitted -> 'sdr'.
infer_stepsint | None-NoneNumber of denoising / inference steps. Higher values trade more compute for potentially finer detail. This is a best-effort match: if the model does not support it the model default is used.
audiobool | None-NoneWhether the video should include audio. Note: some models do not support audio, or the audio is always on (e.g. Veo 3.1). In those cases this field has no effect.
sharpenbool-FalseSharpens MiniMax-H3 480p/768p/2K videos
guidance_scalelist[float] | None-NoneClassifier-free guidance scale(s). Controls how strongly the output adheres to the prompt: higher values follow the prompt more closely at the cost of diversity. If the model supports multiple guidance scales, these will be applied in a sequence (e.g. per stage or per denoising phase). This is a best-effort match: if the model does not support it, or does not support the number of scales provided, the model default is used.
multi_promptlist[str] | None-NonePer-shot text prompts for Kling Video 3.0 and Omni multi-shot video (shot_type 'customize'). 1-6 shots, paired 1:1 with shot_durations. The top-level prompt is ignored when this is set.
shot_typestr | None-NoneEnables Kling Video 3.0 or Omni multi-shot. 'customize' splits the video into the shots given by multi_prompt + shot_durations; 'intelligence' derives the shots from the single prompt. Omitted -> single-shot.
shot_durationslist[int] | None-NonePer-shot durations in seconds for shot_type 'customize'; one per multi_prompt entry, each >= 1, summing to duration_secs.
negative_promptstr | None-NoneWhat the video should avoid. Kling-v3 only. Omitted -> the vendor default ('blur, distort, and low quality').
element_idslist[int] | None-NoneKling Video 3.0 and Omni only: ordered Kling element library ids (<=3) to include. The prompt references them via @handle (see element_handles), rewritten to Kling's positional \<\<\<element_N>>> at submit.
element_handleslist[str] | None-NoneKling Video 3.0 and Omni only: the @handle for each element_ids entry (same order). Each @handle in the prompt is rewritten to \<\<\<element_N>>> for the vendor while the stored prompt keeps it.

ImageConfig

Required for image task types (T2I, I2I).

FieldTypeRequiredDefaultDescription
resolutionstr | None-NoneResolution tier for automatic framing. Seedream accepts 1K, 1.5K or 2K; omit to use its default, or source-adaptive sizing for layers.
size_modeLiteral[explicit, auto]-'explicit'Use explicit dimensions or let a supported model choose the output size. Auto cannot be combined with width, height or aspect_ratio.
heightint | None-NoneOutput height in pixels. Required for explicit sizing; omit when size_mode is auto.
widthint | None-NoneOutput width in pixels.
aspect_ratiostr | None-NoneOutput aspect ratio. The default is 1:1 if omitted. The width of the output will be updated to match the height based on the aspect ratio, rounded up to the nearest integer.
infer_stepsint | None-NoneNumber of denoising / inference steps. Higher values trade more compute for potentially finer detail. This is a best-effort match: if the model does not support it the model default is used.
guidance_scalelist[float] | None-NoneClassifier-free guidance scale(s). Controls how strongly the output adheres to the prompt: higher values follow the prompt more closely at the cost of diversity. If the model supports multiple guidance scales, these will be applied in a sequence (e.g. per stage or per denoising phase). This is a best-effort match: if the model does not support it, or does not support the number of scales provided, the model default is used.

ImageOutputOptions

Optional image_output controls for image generation and editing. Supported options depend on the model; transparent backgrounds require PNG or WebP. Models with GIF output can also accept frame count and frame delay. Automatic dimensions are selected separately with image_config.size_mode.

FieldTypeRequiredDefaultDescription
partial_imagesint | None-NoneMaximum number of intermediate image previews, from 0 to 3. Supported raster models may return fewer previews. Each generated preview is billed separately from the final image.
svgVectorOutputOptions | None-NoneOptional author settings for SVG output.
layersImageLayerOptions | None-NoneDecompose one reference image into a base image and layers on supported models.
watermarkbool | None-NoneAdd a visible AI-generated watermark on supported models. Seedream defaults to enabled.
frame_countint | None-NoneNumber of frames for animated image output. Omit to use the model default.
frame_duration_msint | None-NoneDelay per animation frame in milliseconds. GIF rounds the delay to the nearest 10 milliseconds.
complexityLiteral[low, medium, high] | None-NonePlanning effort before rendering. Omit to use the model default.
qualityLiteral[auto, low, medium, high, xhigh, max] | None-NoneRendering quality. Supported values depend on the model. Omit to keep its default.
backgroundLiteral[auto, opaque, transparent] | None-NoneBackground appearance. Transparent output requires PNG or WebP.
output_formatLiteral[png, jpeg, webp, svg, gif]-'png'Format of the generated image file.
output_compressionint | None-NoneCompression setting from 0 to 100 for JPEG or WebP. Omit to use the model default.

ImageLayerOptions

FieldTypeRequiredDefaultDescription
max_imagesint-30Output count ceiling, including the base image. Fewer images may be returned.
text_recognitionbool-FalseRequest text and styling for regular text layers.

ImageBoundingBox

FieldTypeRequiredDefaultDescription
absolutetuple[int, int, int, int]Yes-[left, top, right, bottom] in base-image pixels.
normalizedtuple[int, int, int, int]Yes-The same box scaled to integer coordinates from 0 to 1000.

ImageTextStyle

FieldTypeRequiredDefaultDescription
similar_font_familystr | None-NoneEstimated font family, or unknown; an exact match is not guaranteed.
foreground_colorstr | None-NoneText color as #RRGGBB, without alpha.
boldbool-FalseRecognized bold styling.
italicbool-FalseSlanted glyphs, excluding rotation or perspective.
underlinebool-FalseText underline, excluding decorative lines.
strikethroughbool-FalseRecognized strikethrough.
shadowbool-FalseVisible shadow or glow, excluding antialiasing.
translucentbool-FalseBackground shows through the text ink.

ImageTextRun

FieldTypeRequiredDefaultDescription
textstrYes-Text segment with consistent styling.
styleImageTextStyle | None-NoneEstimated visual attributes, not original design-file properties.

ImageTextLine

FieldTypeRequiredDefaultDescription
bounding_boxImageBoundingBoxYes-Line position on the base image.
runslist[ImageTextRun]Yes-Text segments in reading order.

ImageTextRecognition

FieldTypeRequiredDefaultDescription
textstrYes-Combined recognized text.
lineslist[ImageTextLine]Yes-Recognized lines with placement and styles.

ImageLayerMetadata

FieldTypeRequiredDefaultDescription
z_indexintYes-Stacking order; zero identifies the base image.
bounding_boxImageBoundingBox | None-NoneLayer placement relative to the base image.
namestr-''Model-generated layer name.
descriptionstr-''Model-generated layer description.
text_recognitionImageTextRecognition | None-NoneOCR when requested and available for this text layer.

OutputImage

FieldTypeRequiredDefaultDescription
urlstrYes-Authenticated asset URL for this result image.
widthintYes-Delivered width in pixels.
heightintYes-Delivered height in pixels.
output_formatLiteral[png, jpeg, webp, gif, svg]Yes-Inspected file format.
backgroundLiteral[transparent, opaque] | None-NoneWhether raster pixels contain any transparency; omitted when not inspected.
layerImageLayerMetadata | None-NoneLayer placement and optional recognized text.

VectorOutputOptions

The image_output.svg author settings for supported vector output.

FieldTypeRequiredDefaultDescription
modelstrYes-Model used to author the SVG from the generated reference image.
reasoningImageReasoningOptions | None-NoneOptional reasoning settings for the vector author.

ImageReasoningOptions

Reasoning settings for the vector author, separate from image complexity.

FieldTypeRequiredDefaultDescription
effortLiteral[none, minimal, low, medium, high, xhigh, max] | None-NoneReasoning effort for the vector author. Omit to use its default.

AudioConfig

Required for audio task types (T2S speech, T2D dialogue, T2SFX sound effects, V2SFX sound scored to a video, T2M music). Each field belongs to exactly one surface, named in its description.

FieldTypeRequiredDefaultDescription
lyricsstr | None-NoneT2M models that accept separate lyrics: the words to sing, with section labels such as [Verse] and [Chorus]. Required for YuE2; provide the musical style in TaskInput.prompt. Omit for models that do not support separate lyrics.
voice_idstr | None-NoneT2S only: the voice to speak the prompt.
turnslist[DialogueTurn] | None-NoneT2D only: ordered speaker turns. The prompt is unused for T2D - all spoken text lives here.
duration_secsfloat | None-NoneT2SFX and T2M models that support a requested duration: target audio length in seconds. Accepted ranges and defaults depend on the model. Omit for YuE2, which generates variable-length audio and does not accept a requested duration. Not accepted for V2SFX, where the length follows the clip.
stabilityfloat | None-NoneT2S and T2D: 0-1. Lower is more emotionally variable, higher is more consistent. eleven_v3 accepts only 0.0, 0.5, or 1.0. Omitted uses the model default.
speedfloat | None-NoneT2S only: speaking rate multiplier. Omitted uses the model default.
similarity_boostfloat | None-NoneT2S and T2D models that support similarity: 0-1. How closely the output tracks the original voice. Omitted uses the model default.
stylefloat | None-NoneT2S only: 0-1. Style exaggeration. Higher values cost more latency. Omitted uses the model default.
use_speaker_boostbool | None-NoneT2S only: boost similarity to the original speaker.
output_formatstr | None-NoneAudio encoding; supported values and defaults depend on the model. YuE2 supports only flac, which is also its default, and produces a .flac file. ElevenLabs T2S, T2D and T2SFX support mp3_22050_32, mp3_24000_48, mp3_44100_32, mp3_44100_64, mp3_44100_96, mp3_44100_128, mp3_44100_192, opus_48000_32, opus_48000_64, opus_48000_96, opus_48000_128 and opus_48000_192. ElevenLabs T2M also supports mp3_48000_128, mp3_48000_192, mp3_48000_240 and mp3_48000_320. ElevenLabs defaults to mp3_44100_128. Mirelo T2SFX supports wav, flac, mp3_128, mp3_192, mp3_256 and mp3_320, all 48 kHz mono, and defaults to wav. MP3 is stored as .mp3, Opus as .ogg, WAV as .wav and FLAC as .flac. The model list shows each model's output_formats and default_output_format.
apply_text_normalizationstr | None-NoneT2S and T2D: 'auto' (default), 'on', or 'off'. Controls whether numbers, dates, and abbreviations are spelled out before synthesis.
prompt_influencefloat | None-NoneT2SFX models that support prompt influence, such as Eleven-SFX-v2: 0-1. How literally the sound follows the prompt. Omitted uses the model default.
loopbool | None-NoneT2SFX models that support looping, such as Eleven-SFX-v2: generate a seamlessly looping clip.
force_instrumentalbool | None-NoneT2M only: generate without vocals.
scorestr | None-NoneT2M models that accept sheet music: a score for the song to follow, as uncompressed MusicXML or ABC in the model's own format. Vocal songs still need lyrics. The size limit depends on the model. Omit to let the model write the music.
composition_planCompositionPlan | None-NoneT2M only: build the track segment by segment instead of from a prompt. Mutually exclusive with prompt, and the track length is the sum of the segment durations rather than duration_secs.

For accounts with access to YuE2-3B, use prompt for the musical style and audio_config.lyrics for 400 to 10,000 characters of lyrics when generating a vocal song. Requests outside these bounds are rejected before generation. To generate an instrumental track, set audio_config.force_instrumental=true. Lyrics are optional in this mode: you can provide lyrics or section tags such as [Intro], [Verse], and [Chorus] to help shape the track's flow and duration. Lyrics are used only to plan the music. There is no minimum length, but the 10,000-character maximum still applies. Omitting lyrics or leaving it blank uses the default intro, verse, chorus, and outro sections for planning. Tempo in the style prompt and section tags guide the arrangement, but exact duration and section order are not guaranteed.

Instrumental mode does not guarantee the absence of vocals. Generated tracks may still include singing or wordless vocalizations, such as humming. Keep prompt focused on the musical style and place any planning lyrics in audio_config.lyrics.

{
  "model": "YuE2-3B",
  "task_type": "T2M",
  "prompt": "Warm solo piano, gentle melody, 80 BPM",
  "audio_config": {
    "force_instrumental": true,
    "lyrics": "[Intro]\n[Verse]\n[Chorus]\n[Bridge]\n[Chorus]\n[Outro]"
  }
}

Both modes return stereo FLAC audio, capped at approximately 6 minutes. Tracks that reach this limit are truncated and returned successfully; the remaining lyrics or musical ending are cut off. Use shorter lyrics to help the song finish within the limit. The duration is determined by the song; do not set duration_secs.

If YuE2 reaches its score limit before producing audio, the task ends with status="FAILED" and no audio output. The status response's error_msg is:

Score limit reached. Try a different music style or lyrics to shorten the generated score.

Change the musical style in prompt or revise audio_config.lyrics, then submit a new request.

CompositionPlan

T2M only: build a track segment by segment instead of from a prompt. Mutually exclusive with prompt, and the segment durations are the track length.

FieldTypeRequiredDefaultDescription
chunkslist[MusicChunk]Yes-Ordered segments of the track.

MusicChunk

One segment of a CompositionPlan.

FieldTypeRequiredDefaultDescription
textstr-''Sung or spoken text for this segment. Empty for instrumental.
duration_msintYes-Segment length in milliseconds.
positive_styleslist[str] | None-NoneStyles this segment should have.
negative_styleslist[str] | None-NoneStyles this segment should avoid.
context_adherencestr | None-NoneHow closely this segment follows the surrounding ones: 'low', 'medium', or 'high'. Omitted uses the model default.

DialogueTurn

One speaker turn in a T2D request. All spoken text lives in these turns, not in prompt.

FieldTypeRequiredDefaultDescription
voice_idstrYes-Voice speaking this turn.
textstrYes-What this speaker says.

TaskStatusResponse

Returned by GET /api/v0/tasks/{task_id} (and by the client's get_task_state and wait).

FieldTypeRequiredDefaultDescription
output_imageslist[OutputImage] | None-NoneCompleted image results in delivery order. For decomposition, index zero is the base image and subsequent entries are layers.
usagedict[str, Any] | None-NoneImage and token counts when available. Seedream usage is calculated from delivered images, with source=calculated; output_tokens and total_tokens equal total output pixels divided by 256, rounded down. This is not a provider-reported billing receipt.
safety_identifierstr | None-NoneEcho of the request's pseudonymous end-user identifier. Seedream stores this on the platform; upstream forwarding is not guaranteed.
task_idstrYes-Server-assigned id; poll status and download the asset with it.
metadataTaskMetadataYes-Resolved task parameters and output metadata. Trimmed video lengths describe the delivered clip.
task_outputdict[TaskOutputType, str] | None-NonePer output-type asset locators, as they become available.
moderationModerationResult | None-NoneStructured moderation verdict when the task failed or was blocked by moderation.
image_previewslist[ImagePreview]-[]Intermediate images available while a supported image task renders. These are previews, not completed outputs.
statusTaskStatusYes-Current task status.
error_msgstr | None-NoneFailure reason, set when status is FAILED.
generation_time_secsfloat | None-NoneThe executor's measured generation duration once COMPLETED.
active_generation_time_secsfloat | None-NoneCurrent wall-clock elapsed duration for the active RUNNING attempt; unset outside RUNNING.
upload_time_secsfloat | None-NoneTime spent uploading the asset after generation.
queue_time_secsfloat | None-NoneCurrent queue elapsed time while PENDING; the final queue wait through the control-plane trial insert after generation begins.
execution_providerstr | None-NoneWho ran the execution - "machgen" whenever any stage of the task ran on MachGen GPUs, otherwise "partner".
overflow_convertedbool-FalseWhether long queuing moved this task off self-hosted capacity to an on-demand provider. Readable before the task finishes.
progressTaskProgress | None-NoneStep progress while a TRAINING task is RUNNING; unset for task types that do not report it.
live_configdict[str, Any] | None-NoneLivestream related configs, if applicable

ImagePreview

A task's intermediate image. Its URL requires the same authentication as the task.

FieldTypeRequiredDefaultDescription
idstrYes-Unique preview identifier within the task.
partial_image_indexintYes-Zero-based preview index within the current attempt.
urlstrYes-Authenticated URL for this intermediate image.
output_formatstrYes-File format of the preview.

TaskBillingResponse

Returned by GET /api/v0/tasks/{task_id}/billing (and by the client's get_task_billing), once the task has finished.

FieldTypeRequiredDefaultDescription
task_idstrYes-ID of the task.
generation_cost_microsintYes-The cost for this generation (in microdollars).
generation_credit_microsintYes-The credit returned for this generation (in microdollars).
net_cost_microsintYes-Cost minus Generation Credit, in microdollars. The amount this task actually cost you.

AccountResponse

Returned by GET /api/v0/billing/account (and by the client's get_account).

FieldTypeRequiredDefaultDescription
account_idstrYes-ID of this account
balance_microsintYes-Balance of this account (in microdollars)
autoreload_enabledbool-FalseIf auto-reload is enabled on this account
pending_tasksint | None-NoneCurrent number of scheduled but not running tasks under this account
running_tasksint | None-NoneCurrent number of running tasks under this account