Flux Context
AgenteExplorarBiblioteca

Crear

Todas las herramientasTodos los modelos

Flujos de trabajo

Publicidad con IARecrear vídeos viralesNuevo
APIMejorar plan ahora
AgenteBiblioteca

Cargando...

Puedes seguir esperando o actualizar esta página.

Recargar páginaIr al inicioContactar a soporte

    API

    Manage your API access and requests.

    OverviewAPI KeyAPI LogsDocs

    Getting started

    QuickstartAuthenticationPoll & downloadErrors & limits

    Image models

    Seedream 5.5Seedream 5.0 ProSeedream 5.0 LiteNano Banana 2GPT Image 2Seedream 4.5

    Video models

    Seedance 2.0Seedance 2.0 MiniSeedance 2.0 FastSeedance 2.5Wan 3.0
    Seedance 2.5 · Documentation

    Getting started

    QuickstartAuthenticationPoll & downloadErrors & limits

    Image models

    Seedream 5.5Seedream 5.0 ProSeedream 5.0 LiteNano Banana 2GPT Image 2Seedream 4.5

    Video models

    Seedance 2.0Seedance 2.0 MiniSeedance 2.0 FastSeedance 2.5Wan 3.0
    Docs Models

    Seedance 2.5

    Generate videos from text, frames, or multimodal references.

    POST
    /api/v1/generations

    Example request

    Set your FLUX_API_KEY before running. See the parameters below for supported settings.

    cURL
    curl https://api.flux-context.org/api/v1/generations \
      -H "Authorization: Bearer $FLUX_API_KEY" \
      -H "Content-Type: application/json" \
      --data '{
      "model": "seedance-2-5",
      "input": {
        "mode": "text-to-video",
        "prompt": "A calm seaside sunrise with gentle camera movement",
        "resolution": "480p",
        "duration": 4,
        "sound": false,
        "aspect_ratio": "16:9"
      }
    }'

    Parameters

    Set model to seedance-2-5. These fields belong inside input.

    ParameterDescription
    draft_task_id
    string · Optional
    Flux generation ID of your successful API preview. This is a separate request branch; omit all inherited generation fields.
    resolution
    string · Optional
    Output resolution tier. Values are case-sensitive.
    480p720p1080p
    output_format
    string · Optional
    Output file format.
    mp4
    Default: mp4
    watermark
    boolean · Optional
    Whether to request a watermark.
    Default: false
    aspect_ratio
    string · Optional
    Output proportions; see mode constraints below.
    auto1:13:44:39:1616:921:9
    Default: auto
    sound
    boolean · Optional
    Generate sound with the video. This is not a reference audio input.
    Default: true
    mode
    string · Optional
    Choose a supported generation mode.
    text-to-videofirst_and_last_framesomni_reference
    prompt
    string · Optional
    Describe the desired output. Minimum 1 characters. Maximum 5,000 characters.
    draft
    boolean · Optional
    Create a 480p preview. Omit for direct generation.
    image_urls
    string[] · Optional
    Public HTTPS reference images. Video image order and count depend on mode. Up to 30 items.
    video_urls
    string[] · Optional
    Public HTTPS MP4 or MOV references. Flux measures duration before charging. Maximum file size 200 MiB. Up to 10 items.
    audio_urls
    string[] · Optional
    Public HTTPS MP3, WAV or M4A references. Flux measures duration before charging. Maximum file size 15 MiB. Audio is not billed separately. Up to 10 items.
    reference_intent
    string · Optional
    Generate new content or edit a reference video. See model constraints for duration behavior.
    generateedit
    Default: generate
    duration
    integer · Optional
    Output duration in seconds. See model constraints for editing and automatic duration. Range: 4–30. Additional values (see constraints):
    -1
    Default: 5

    Reference media

    Use your own publicly accessible HTTPS media URLs. Links must remain valid throughout queueing and generation. Base64 and file upload bodies are not supported by this endpoint.

    first_and_last_frames

    cURL
    curl https://api.flux-context.org/api/v1/generations \
      -H "Authorization: Bearer $FLUX_API_KEY" \
      -H "Content-Type: application/json" \
      --data '{
      "model": "seedance-2-5",
      "input": {
        "mode": "first_and_last_frames",
        "prompt": "A calm seaside sunrise with gentle camera movement",
        "resolution": "480p",
        "duration": 4,
        "sound": false,
        "aspect_ratio": "auto",
        "image_urls": [
          "https://example.com/front.jpg",
          "https://example.com/back.jpg"
        ]
      }
    }'

    omni_reference

    cURL
    curl https://api.flux-context.org/api/v1/generations \
      -H "Authorization: Bearer $FLUX_API_KEY" \
      -H "Content-Type: application/json" \
      --data '{
      "model": "seedance-2-5",
      "input": {
        "mode": "omni_reference",
        "prompt": "A calm seaside sunrise with gentle camera movement",
        "resolution": "480p",
        "duration": 4,
        "sound": false,
        "aspect_ratio": "auto",
        "image_urls": [
          "https://example.com/front.jpg",
          "https://example.com/back.jpg"
        ]
      }
    }'

    Video and audio references

    cURL
    curl https://api.flux-context.org/api/v1/generations \
      -H "Authorization: Bearer $FLUX_API_KEY" \
      -H "Content-Type: application/json" \
      --data '{
      "model": "seedance-2-5",
      "input": {
        "mode": "omni_reference",
        "prompt": "A calm seaside sunrise with gentle camera movement",
        "resolution": "480p",
        "duration": 4,
        "sound": false,
        "aspect_ratio": "auto",
        "image_urls": [
          "https://example.com/front.jpg"
        ],
        "video_urls": [
          "https://example.com/reference.mp4"
        ],
        "audio_urls": [
          "https://example.com/reference.mp3"
        ]
      }
    }'

    Edit a video

    cURL
    curl https://api.flux-context.org/api/v1/generations \
      -H "Authorization: Bearer $FLUX_API_KEY" \
      -H "Content-Type: application/json" \
      --data '{
      "model": "seedance-2-5",
      "input": {
        "mode": "omni_reference",
        "prompt": "Edit the video to use a warm sunset background",
        "resolution": "480p",
        "duration": -1,
        "sound": false,
        "aspect_ratio": "auto",
        "image_urls": [
          "https://example.com/front.jpg"
        ],
        "video_urls": [
          "https://example.com/reference.mp4"
        ],
        "audio_urls": [
          "https://example.com/reference.mp3"
        ],
        "reference_intent": "edit"
      }
    }'

    480p preview (charged separately)

    cURL
    curl https://api.flux-context.org/api/v1/generations \
      -H "Authorization: Bearer $FLUX_API_KEY" \
      -H "Content-Type: application/json" \
      --data '{
      "model": "seedance-2-5",
      "input": {
        "mode": "text-to-video",
        "prompt": "A calm seaside sunrise with gentle camera movement",
        "resolution": "480p",
        "duration": 4,
        "sound": false,
        "aspect_ratio": "16:9",
        "draft": true
      }
    }'

    1080p final from a successful preview — replace the Flux generation ID

    cURL
    curl https://api.flux-context.org/api/v1/generations \
      -H "Authorization: Bearer $FLUX_API_KEY" \
      -H "Content-Type: application/json" \
      --data '{
      "model": "seedance-2-5",
      "input": {
        "draft_task_id": "00000000-0000-4000-8000-000000000000"
      }
    }'

    Credits

    ResolutionWithout video / secondWith video / second
    480p159
    720p3320
    1080p8250

    Video reference seconds are included in the billable duration. See the model-specific rounding and editing rules below. Sound does not change the price. Confirmed failed requests are refunded.

    Without video references, credits = ceil(output seconds × rate). With video references, new tasks cost ceil((output seconds + max(measured total input video seconds, ceil(output seconds × 2/3))) × rate). Images and audio add no billable seconds.

    Editing reserves ceil((max(input video seconds, 20) + 30 + 1) × rate). The extra second is a Flux settlement reserve, not provider output. Final cost uses ceil(final total billable seconds × the saved rate); the difference is returned or charged. Historical tasks retain their saved rule. If final billing is unavailable, the precharge is retained and results are delivered; billing is marked for review. If the available balance cannot cover an additional charge, only the available credits are charged and results are delivered.

    Constraints

    Set draft: true for a 480p preview at the normal 480p price. Then submit only draft_task_id (the Flux generation id, not provider_task_id) to create a separately billed 1080p final. The source must be your successful API preview, created within 7 days. Inherited fields must be omitted. Each new Idempotency-Key creates independent paid work.

    Normal generation and preview inputs require a prompt and retain the ordinary mode rules. A final request inherits prompt, references, duration and sound from its source; do not send those fields.

    Preview: 15 credits/second without video references, 9 with video references. Final: 82 credits/second without video references, 50 with video references. New video-reference tasks bill output seconds + max(actual total reference seconds, ceil(output seconds × 2/3)); apply the minimum once and round total credits up. A new final uses the original actual reference duration, even from an older preview. Preview charges are not deducted from final charges. A dynamic source needs authoritative final billing; DRAFT_BILLING_PENDING means check again later.

    Responses include workflow.stage (draft or final), workflow.sourceId for a final, workflow.expiresAt for a preview, and workflow.can_finalize. A website creation cannot be used as an API source. A source is reusable for multiple independent paid finals; retries of one operation must reuse its Idempotency-Key.

    First/last frames use 1–2 images and aspect_ratio auto. Omni reference supports up to 30 images, 10 videos and 10 audio files.

    Each video/audio reference must be 2–30 seconds; video total and audio total must each be at most 30 seconds.

    For explicit editing use reference_intent edit, duration -1 and aspect_ratio auto. Other requests use a fixed duration of 4–30 seconds.

    Use returned dimensions when available. Unverified video dimensions are null. Videos are delivered as MP4. Reference and editing rules depend on the model.

    Response

    A successful submission returns HTTP 202 and a request ID. Response excerpt:

    JSON
    {
      "id": "REQUEST_ID",
      "model": "seedance-2-5",
      "status": "processing"
    }
    Continue readingPoll & download