APIMaster.ai

Seedance prompt optimization API

Turn an idea into a prompt for Seedance 2.5.

Seedance prompt optimization API

This APIMaster text service returns a prompt without creating a video task. It is independently implemented using the public Volcengine prompting guide; it is not an official Seedance optimization API and does not bundle or redistribute the official Skill.

POST https://apimaster.ai/v1/video/prompt-optimize

Authenticate with an APIMaster API Key. model selects the billed text model and must have an available route and permission on your Key. target_model selects the video model; only seedance-2.5 is supported. Replace the example text model if it is unavailable to your account.

Quick start

curl --fail-with-body -sS "https://apimaster.ai/v1/video/prompt-optimize" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gemini-3.1-flash-lite",
  "target_model": "seedance-2.5",
  "prompt": "A cat watches raindrops on a window, then turns toward the camera.",
  "language": "en",
  "task": "generate",
  "duration": 5
}'

Parameters

JSON
model Required: paid text model ID used for optimization.
prompt Required: 1–12000 characters. Keep existing reference labels and dialogue.
target_model Optional: defaults to seedance-2.5; this is the only supported value.
language Optional: output language such as zh or en; follows the input if omitted. Maximum 64 bytes.
task Optional: generate (default), edit, or extend.
duration Optional: integer 4–30 or -1. For editing, omit or use -1. Planning context only; does not create a video or set generation parameters.
references Optional: up to 50 text descriptions, each with a unique label (1–64 characters) and description (1–2000 characters). Media is not uploaded, fetched, or analyzed.

Response

The response is standard Chat Completions JSON. Read the optimized prompt from choices[0].message.content and actual token usage from usage. No video task ID is returned. If finish_reason is not stop, especially length, check completeness before submitting a video.

{
  "object": "chat.completion",
  "model": "gemini-3.1-flash-lite",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "A cat sits beside a rain-covered window, watching the drops slide down the glass. It slowly turns its head toward the camera."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 600,
    "completion_tokens": 50,
    "total_tokens": 650
  }
}

Reference descriptions

{
  "model": "gemini-3.1-flash-lite",
  "prompt": "Use @Image1 for the person and @Video1 for the camera movement.",
  "language": "en",
  "references": [
    {
      "label": "@Image1",
      "description": "Person appearance only; ignore the background."
    },
    {
      "label": "@Video1",
      "description": "Slow camera push-in only; ignore the people."
    }
  ]
}

Errors and billing

400: invalid JSON, types, fields, or parameters; 401: invalid Key; 403: permission denied; 413: body exceeds 64 KiB; 415: non-JSON content; 429: rate limited. Upstream errors retain the text relay error format and status.

Token pricing, group rates, balance checks, request logs, and failure settlement follow the selected text model. System instructions and reference descriptions count as input tokens. Optimization incurs no video generation charge; subsequent video generation is billed separately.

Generate a video after reviewing

Pass the complete result as prompt in a video generation request. Submit actual media, duration, and aspect ratio separately. Reference labels must match the media order and responsibilities in that request. This service has not inspected media and cannot guarantee identity consistency, exact subtitles, or frame-level timing.

Seedance 2.5

Limits

Only non-streaming text optimization is supported. Unknown top-level fields, including stream, messages, webhook, and media URL fields, are rejected. Do not include API keys in prompts or descriptions.