beatraドキュメント

既存動画を延長

元の動画の前か後を延長する非同期タスクを作ります。`duration` は必須で、常に最終的に返る動画の長さを意味します。信頼できる元動画の長さより長くする必要があります。

POST
/v1/videos/extend

Request Body

application/jsonRequired
metadataMetadata

Caller-supplied metadata; ≤16 keys, key ≤64 chars, value ≤512 chars

callback_urlCallback Url

HTTPS URL Beatra will POST the final Task envelope to when the Task reaches a terminal state

callback_signing_key_idCallback Signing Key Id

Optional standalone callback signing key. Omit for unsigned callback delivery; requires callback_url when provided.

modelModel

Use auto for request-dependent selection from the ordered live candidates. A concrete model is evaluated exactly as requested and is never substituted.

Default: "auto"Value in: "auto" | "wan3.0-video" | "wan3.0-video-prime" | "wan2.7-i2v" | "seedance-2" | "seedance-2-fast" | "seedance-2-mini" | "seedance-2.5"
negative_promptNegative Prompt

Content or qualities to avoid when supported by the selected model.

duration
Required
Duration

Required final returned-video duration in integer seconds. It must exceed the trusted source-video duration; model-specific admission may narrow the range.

Minimum: 2Maximum: 30
aspect_ratioAspect Ratio

Explicit output ratio when the selected model accepts it. Omit for a declared model default, source-derived ratio, or fixed model behavior.

resolutionResolution

Requested model-defined output resolution tier. Omit to use the selected model's declared default; unsupported tiers are rejected rather than coerced.

seedSeed
enhance_promptEnhance Prompt

Ask the selected model to rewrite the prompt before generation. Omit or use null to keep the prompt exactly as written.

watermarkWatermark

Whether generated video should include the model watermark.

generate_audioGenerate Audio

Whether the selected model should generate synchronized audio.

web_searchWeb Search

Whether the selected model may use web search during generation.

return_last_frameReturn Last Frame

Whether to return the generated video's last frame as an image artifact.

output_formatOutput Format

Optional output container. Omit or use mp4 for the existing default; models that advertise mov can return MOV without transcoding.

video
Required
Video

The single source video to continue.

direction
Required
Direction

Generate new content immediately before or after the source video's content.

Value in: "before" | "after"
instruction
Required
Instruction

Required instruction describing how the source video should continue.

Minimum length: 1Maximum length: 20000
referencesReferences

Optional ordered image, video, or audio references. The selected model must support every supplied reference kind and count.

Header Parameters

X-Request-Idstring

Optional client request id echoed in the response.

Idempotency-Key
Required
Idempotency-Key
Minimum length: 1Maximum length: 128
Authorization
Required
string

Bearer API key.

curl -X POST "https://api.beatra.ai/v1/videos/extend" \
  -H "X-Request-Id: string" \
  -H "Idempotency-Key: string" \
  -H "Authorization: string" \
  -H "Content-Type: application/json" \
  -d '{
    "metadata": {
      "property1": "string",
      "property2": "string"
    },
    "callback_url": "string",
    "callback_signing_key_id": "string",
    "model": "auto",
    "negative_prompt": "string",
    "duration": 2,
    "aspect_ratio": "16:9",
    "resolution": "480p",
    "seed": 2147483647,
    "enhance_prompt": true,
    "watermark": true,
    "generate_audio": true,
    "web_search": true,
    "return_last_frame": true,
    "output_format": "mp4",
    "video": {
      "type": "url",
      "url": "string"
    },
    "direction": "before",
    "instruction": "string",
    "references": [
      {
        "kind": "image",
        "media": {
          "type": "url",
          "url": "string"
        },
        "role": "subject",
        "reference_voice": {
          "type": "url",
          "url": "string"
        }
      }
    ]
  }'

Task accepted

{
  "object": "task",
  "task_id": "string",
  "status": "queued",
  "capability": "string",
  "workload_type": "model",
  "model": "string",
  "resolved_model": "string",
  "model_selection_reason": null,
  "social": {
    "platform": "string",
    "operation_key": "string",
    "operation_name": "string",
    "schema_hash": "string"
  },
  "metadata": {
    "property1": "string",
    "property2": "string"
  },
  "input": {},
  "progress": {
    "percent": 100,
    "stage": "string",
    "message": "string"
  },
  "output": {},
  "warnings": [
    {
      "code": "string",
      "message": "string",
      "field": "string"
    }
  ],
  "error": {
    "code": "string",
    "type": "string",
    "message": "string",
    "retryable": true,
    "param": "string",
    "details": {},
    "request_id": "string"
  },
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "cache_read_tokens": 0,
    "cache_creation_tokens": 0,
    "reasoning_tokens": 0,
    "image_count": 0,
    "image_pixels": 0,
    "video_seconds": 0,
    "input_video_seconds": 0,
    "output_video_seconds": 0,
    "audio_seconds": 0,
    "characters": 0,
    "lines": [
      {
        "meter": "string",
        "quantity": "string",
        "unit": "string",
        "billed_amount_credits": "string"
      }
    ],
    "credits": "string"
  },
  "billing": {
    "charged_credits": "string",
    "refunded_credits": "string",
    "granted_credits": "string",
    "grant_source": "string",
    "net_charged_credits": "string"
  },
  "callback": {
    "url": "string",
    "status": "pending",
    "attempt_count": 0,
    "delivered_at": "2019-08-24T14:15:22Z",
    "last_error": "string"
  },
  "created_at": "2019-08-24T14:15:22Z",
  "started_at": "2019-08-24T14:15:22Z",
  "deadline_at": "2019-08-24T14:15:22Z",
  "completed_at": "2019-08-24T14:15:22Z",
  "cancel_requested_at": "2019-08-24T14:15:22Z",
  "links": {
    "self": "string",
    "cancel": "string",
    "assets": "string"
  }
}

最終更新