{
  "openapi": "3.1.0",
  "info": {
    "title": "Seedance 2.5 API Integration Contract",
    "version": "0.1.0",
    "description": "Provider-neutral request contract for agents and developers preparing a Seedance 2.5 video generation integration. Verify provider-specific fields before live calls."
  },
  "servers": [
    {
      "url": "https://api.evolink.ai/v1",
      "description": "Recommended provider route. Requires a human-created API key."
    }
  ],
  "externalDocs": {
    "description": "Agent integration guide",
    "url": "https://seedance25api.io/agent"
  },
  "paths": {
    "/videos/generations": {
      "post": {
        "operationId": "createVideoGeneration",
        "summary": "Create an async Seedance 2.5 video generation job",
        "description": "Submit a Seedance 2.5 video generation request. The model is pre-release; verify provider support before live calls. Do not call without a provider API key supplied by the human user.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateVideoGenerationRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Generation job created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationJob"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request settings"
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "429": {
            "description": "Rate limited"
          },
          "503": {
            "description": "Model unavailable or not enabled for the account"
          }
        }
      }
    },
    "/task-detail": {
      "get": {
        "operationId": "getTaskDetail",
        "summary": "Poll a video generation job by id",
        "description": "Query job status and progress with the id returned by the create call.",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current job state",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationJob"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Use EVOLINK_API_KEY or another provider key created by the human user."
      }
    },
    "schemas": {
      "CreateVideoGenerationRequest": {
        "type": "object",
        "required": [
          "model",
          "prompt"
        ],
        "properties": {
          "model": {
            "type": "string",
            "description": "Seedance 2.5 model ID (pre-release). Keep this configurable. A prompt-only call to the reference-to-video model behaves as text-to-video.",
            "default": "seedance-2.5-reference-to-video",
            "examples": [
              "seedance-2.5-reference-to-video"
            ]
          },
          "prompt": {
            "type": "string",
            "minLength": 1,
            "description": "Prompt describing the shot, motion, subject, style, and constraints. Max ~10,000 tokens; Chinese and English supported."
          },
          "duration": {
            "type": "integer",
            "minimum": 4,
            "maximum": 30,
            "default": 5,
            "description": "Output duration in seconds."
          },
          "quality": {
            "type": "string",
            "enum": [
              "480p",
              "720p"
            ],
            "default": "720p",
            "description": "Output resolution tier. Treat 1080p and 4K as pending until provider docs confirm support."
          },
          "aspect_ratio": {
            "type": "string",
            "enum": [
              "16:9",
              "9:16",
              "1:1",
              "4:3",
              "3:4",
              "21:9",
              "adaptive"
            ],
            "default": "16:9"
          },
          "generate_audio": {
            "type": "boolean",
            "default": true,
            "description": "Generate synchronized native audio. Included at no extra charge."
          },
          "content_filter": {
            "type": "boolean",
            "default": true,
            "description": "Leave on (free). Setting false applies a 1.1x cost multiplier."
          },
          "image_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "maxItems": 30,
            "description": "0–30 image references. .jpeg/.png/.webp, 300–6000px, <=30MB each."
          },
          "video_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "maxItems": 10,
            "description": "0–10 video references. .mp4/.mov, 2–30s per clip, <=50MB each."
          },
          "audio_urls": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            },
            "maxItems": 10,
            "description": "0–10 audio references. .wav/.mp3, 2–30s per clip, <=15MB each."
          },
          "callback_url": {
            "type": "string",
            "format": "uri",
            "description": "Optional HTTPS webhook for async completion. Max 2048 chars; retried up to 3x."
          }
        }
      },
      "GenerationJob": {
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Job id, e.g. task-unified-1774857405-abc123."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed"
            ],
            "description": "Job lifecycle state. Rate limiting and model-unavailability surface as HTTP 429 and 503 responses, not as job statuses."
          },
          "progress": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "output_url": {
            "type": "string",
            "format": "uri"
          },
          "usage": {
            "type": "object",
            "properties": {
              "credits_reserved": {
                "type": "number",
                "description": "Estimated credit consumption reserved for the job."
              }
            }
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}