Felo API PlatformFelo API Platform
v0.3.0
OpenAPI 3.1.0

Submit a video generation task

伺服器:https://openapi.felo.ai
用戶端程式庫

Submit a video generation task

​

Creates an async video generation task and returns a task_id immediately (HTTP 202). Poll GET /api/v1/videos/generations/{task_id} until it succeeds. The request body can be provided either flattened ({model, prompt, ...}) or nested ({model, input: {prompt, ...}}); the input object takes precedence when present. callback fields (callBackUrl / callback_url / callbackUrl) are ignored.

Three mutually exclusive input modes:

  • text-to-video: prompt only;
  • image-to-video (first/last frame): first_frame_url (+ optional last_frame_url);
  • omni-reference: reference_image_urls / reference_video_urls / reference_audio_urls. Mixing first/last-frame with any multimodal reference input returns 400 invalid_request_error.
請求標頭
  • X-Request-Id
    類型: string

    Optional caller request ID echoed back for diagnostics.

請求本文·VideoGenerationRequest
必填
application/json

Video generation input. Either flattened ({model, prompt, ...}) or nested ({model, input: {...}}). input takes precedence. Exactly one input mode must be used; mixing first/last-frame with multimodal reference inputs is rejected.

  • model
    類型: string
    必填

    Felo-facing model name, e.g. seedance-2.0-mini.

  • aspect_ratio
    類型: string 列舉
    值
    • 16:9
    • 9:16
    • 1:1
    • 4:3
    • 3:4
    • 21:9
    • adaptive
  • duration
    類型: integer
    最小值:  
    4
    最大值:  
    15

    Integer numbers.

  • first_frame_url
    類型: string 格式: uri
  • generate_audio
    類型: boolean
  • input
    類型: object

    Optional nested input object; when present, its fields take precedence over sibling fields.

    • aspect_ratio
      類型: string 列舉

      Output aspect ratio; adaptive follows the input image ratio.

      值
      • 16:9
      • 9:16
      • 1:1
      • 4:3
      • 3:4
      • 21:9
      • adaptive
    • duration
      類型: integer
      最小值:  
      4
      最大值:  
      15

      Output duration in seconds.

    • first_frame_url
      類型: string 格式: uri

      First frame image URL (image-to-video mode).

    • generate_audio
      類型: boolean

      Whether to generate a synchronized audio track.

    • last_frame_url
      類型: string 格式: uri

      Last frame image URL; must be used together with first_frame_url.

    • prompt
      類型: string
      最大長度:  
      2000

      Prompt. Required for text-to-video and omni-reference modes.

    • reference_audio_urls
      類型: array string[] …3格式: uri

      Omni-reference audio clips.

    • reference_image_urls
      類型: array string[] …9格式: uri

      Omni-reference images. Mutually exclusive with first/last-frame.

    • reference_video_urls
      類型: array string[] …3格式: uri

      Omni-reference videos. Mutually exclusive with first/last-frame. Supplying video changes the billing unit price and adds input duration to the token count.

    • resolution
      類型: string 列舉

      Output resolution. Higher resolution consumes more tokens and costs more.

      值
      • 480p
      • 720p
      • 1080p
      • 4k
  • last_frame_url
    類型: string 格式: uri
  • prompt
    類型: string
    最大長度:  
    2000
  • reference_audio_urls
    類型: array string[] …3格式: uri
  • reference_image_urls
    類型: array string[] …9格式: uri
  • reference_video_urls
    類型: array string[] …3格式: uri
  • resolution
    類型: string 列舉
    值
    • 480p
    • 720p
    • 1080p
    • 4k
回應
  • 202
    類型: object · VideoGenerationAccepted

    Task accepted

    • kind
      列舉
      常數:  
      video
      必填
      值
      • video
    • outputs
      類型: array string[]
      必填

      Empty until the task succeeds.

    • status
      列舉
      常數:  
      queued
      必填
      值
      • queued
    • task_id
      類型: string
      必填

      Task id to use for polling.

    application/json
  • 400
    類型: object · GenerationError

    Invalid request (unknown model, mixed input modes, invalid fields)

    OpenAI-compatible error envelope.

    • error
      類型: object
      • message
        類型: string
        必填
      • type
        類型: string 列舉
        必填
        值
        • invalid_request_error
        • server_error
      • code
        類型: string
      • param
        類型: string 可為 null
    application/json
  • 401
    類型: object · GenerationError

    Invalid or missing Felo API key

    OpenAI-compatible error envelope.

    • error
      類型: object
      • message
        類型: string
        必填
      • type
        類型: string 列舉
        必填
        值
        • invalid_request_error
        • server_error
      • code
        類型: string
      • param
        類型: string 可為 null
    application/json
  • 402
    類型: object · GenerationError

    Insufficient balance / billing requirement not met

    OpenAI-compatible error envelope.

    • error
      類型: object
      • message
        類型: string
        必填
      • type
        類型: string 列舉
        必填
        值
        • invalid_request_error
        • server_error
      • code
        類型: string
      • param
        類型: string 可為 null
    application/json
  • 403
    類型: object · GenerationError

    Account not permitted (subscription required or user banned). Disabled models are also rejected before upstream calls. Existing accepted requests and tasks continue.

    OpenAI-compatible error envelope.

    • error
      類型: object
      • message
        類型: string
        必填
      • type
        類型: string 列舉
        必填
        值
        • invalid_request_error
        • server_error
      • code
        類型: string
      • param
        類型: string 可為 null
    application/json
  • 429
    類型: object · GenerationError

    Request or spending limit reached

    OpenAI-compatible error envelope.

    • error
      類型: object
      • message
        類型: string
        必填
      • type
        類型: string 列舉
        必填
        值
        • invalid_request_error
        • server_error
      • code
        類型: string
      • param
        類型: string 可為 null
    application/json
  • 502
    類型: object · GenerationError

    Upstream provider failed

    OpenAI-compatible error envelope.

    • error
      類型: object
      • message
        類型: string
        必填
      • type
        類型: string 列舉
        必填
        值
        • invalid_request_error
        • server_error
      • code
        類型: string
      • param
        類型: string 可為 null
    application/json
  • 503
    類型: object · GenerationError

    Generation service or billing service temporarily unavailable

    OpenAI-compatible error envelope.

    • error
      類型: object
      • message
        類型: string
        必填
      • type
        類型: string 列舉
        必填
        值
        • invalid_request_error
        • server_error
      • code
        類型: string
      • param
        類型: string 可為 null
    application/json
Request Example for post/api/v1/videos/generations
curl https://openapi.felo.ai/api/v1/videos/generations \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "model": "seedance-2.0-mini",
  "prompt": "a cinematic trailer shot, 720p",
  "resolution": "720p",
  "duration": 5,
  "generate_audio": true
}'
{
  "task_id": "string",
  "status": "queued",
  "kind": "video",
  "outputs": [
    "string"
  ]
}
Submit a video generation task