DeerAPI icon

DeerAPI

调用 DeerAPI 进行文字、图像、Sora 2 视频生成及向量嵌入

DeerAPI

AI-generated

Summary

DeerAPI node – text, image, video generation and embeddings

Inputs

  • mode (required) — Selects the operation category: text generation, image generation, video operations, or embeddings. Determines which other parameters are shown. Default: text.
  • userPrompt (required) — Prompt used for text, image, or video generation. Shown for modes text, image, and video.
  • modelId (required) — Model ID for text generation. Shown when mode is text. Default: gemini-3-pro-preview.
  • systemPrompt — System prompt for text generation. Shown when mode is text. Default: 你是一个专业的助手。
  • imageModel — Model used for image generation. Shown when mode is image. Options: gemini-3-pro-image, gemini-2.5-flash-image, doubao-seedream-4-5-251128. Default: gemini-3-pro-image.
  • aspectRatio — Aspect ratio for Gemini image models (gemini-3-pro-image, gemini-2.5-flash-image). Shown when mode is image and imageModel is one of the Gemini models. Default: 1:1.
  • imageSize — Size of the generated image. For gemini-3-pro-image options are 1K, 2K, 4K; for doubao-seedream-4-5-251128 options are 2K, 4K. Shown when mode is image and the corresponding imageModel is selected.
  • videoModel — Model used for video creation. Shown when mode is video and videoOperation is create. Options: sora-2-all, sora-2-pro-all. Default: sora-2-all.
  • videoOperation — Specific video operation to perform. Shown when mode is video. Options: create, remix, retrieve, download, list. Default: create.
  • storyboardMode — When enabled, video creation uses a storyboard (list of shots) instead of a single prompt. Shown when mode is video and videoOperation is create. Default: false.
  • storyboardShots — List of shots when storyboardMode is enabled. Each shot contains a prompt and a duration (seconds). Shown when mode is video, videoOperation is create, and storyboardMode is true.
  • videoPrompt — Prompt for video creation or remix. Ignored when storyboardMode is true. Shown when mode is video and videoOperation is create or remix, and storyboardMode is false.
  • videoSize — Resolution of the generated video. Shown when mode is video and videoOperation is create. Options: 720x1280 (9:16), 1280x720 (16:9), 1024x1792 (9:16), 1792x1024 (16:9). Default: 720x1280.
  • videoId — ID of an existing video. Required for video operations remix, retrieve, download, and list. Shown when mode is video and videoOperation is one of those.
  • smartWait — When enabled, the node polls the video status every 15 seconds until it completes or fails (up to 10 minutes). Shown when mode is video and videoOperation is retrieve. Default: true.
  • embeddingModel — Model used for generating embeddings. Shown when mode is embeddings. Options: text-embedding-3-large, text-embedding-3-small. Default: text-embedding-3-large.
  • embeddingInput (required) — Text content to be embedded. Shown when mode is embeddings.
  • binarySourceMode — Determines where binary image data is read from: current node input or a specified node. Shown for modes text, image, and video (except video operations remix, retrieve, download, list). Default: current.
  • sourceNodeNames — Comma‑separated list of node names to read binary data from when binarySourceMode is specified. Shown when binarySourceMode is specified.
  • binaryPropertyName — Binary property names to consider as image references (e.g., data, file, attachment). Shown for modes text, image, and video (except video operations remix, retrieve, download, list). Default: data, data0, data1, data2, file, attachment.

Output shape

array

Each input item produces one output item in the returned array. Depending on the selected mode and operation the output contains a JSON field and optionally a binary field: • Text mode – JSON contains the DeerAPI chat completion response. • Image mode – JSON contains { status: 'success' } and binary contains the generated image as a PNG buffer. • Video create – JSON contains the response from the Sora video creation endpoint. • Video download – JSON contains { status: 'success' } and binary contains the video file as an MP4 buffer. • Video remix / retrieve / list – JSON contains the response from the respective Sora endpoint. • Embeddings – JSON contains the embedding response from DeerAPI.

Examples

Example 1: Generate an image with a reference picture

mode=image; imageModel=gemini-3-pro-image; userPrompt=A futuristic city; imageSize=2K; aspectRatio=16:9; binarySourceMode=current (assuming a previous node supplied an image in its binary data).

Example 2: Create a video from a storyboard

mode=video; videoOperation=create; storyboardMode=true; storyboardShots=[{shotPrompt:‘A car drives through a tunnel’, duration:4},{shotPrompt:‘The car exits into daylight’, duration:4}]; videoModel=sora-2-all; videoSize=1280x720.

Example 3: Retrieve the status of a video

mode=video; videoOperation=retrieve; videoId=<video‑id>; smartWait=true.

Links

Discussion