# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamina-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "A small red boat on a calm lake at dawn"
}
],
"ratio": "16:9",
"duration": 5,
"generate_audio": true,
"watermark": false
}'curl --request POST \
--url https://api.aisa.one/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "dreamina-seedance-2-0-260128"
}
'import requests
url = "https://api.aisa.one/v1/video/generations"
payload = { "model": "dreamina-seedance-2-0-260128" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'dreamina-seedance-2-0-260128'})
};
fetch('https://api.aisa.one/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'dreamina-seedance-2-0-260128'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"dreamina-seedance-2-0-260128\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"dreamina-seedance-2-0-260128\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"dreamina-seedance-2-0-260128\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": 123,
"id": "<string>",
"model": "<string>",
"object": "video.generation",
"progress": "<string>",
"status": "queued",
"completed_at": 123,
"customer_cost_micros_usd": 1,
"error": {
"message": "<string>"
},
"result": "<unknown>"
}{
"code": "video_submission_pending",
"error": "<string>",
"id": "<string>"
}Create a video generation task
Starts an asynchronous video generation task. A video usually takes one to three minutes; poll the task with the returned id until its status is completed, failed or cancelled.
Starts an asynchronous video generation task and returns it with status queued. The gateway requires model; the remaining fields are the selected model’s own request fields and are forwarded to it. A video usually takes one to three minutes: poll retrieveVideoGeneration with the returned id until status is completed, failed or cancelled. Only a 503 whose code is video_submission_pending, with a non-empty id, means the task and its charge authorization were kept: retrieve it with that id and do not submit a replacement. Any other 503 means the service or the provider was unavailable and no task is pending; retry later. With X-AISA-Cost-Mode: quote the route returns a cost_estimate instead and creates no task.
# Fixed reference example. Playground inputs do not update this sample.
curl --request POST \
--url https://api.aisa.one/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "dreamina-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "A small red boat on a calm lake at dawn"
}
],
"ratio": "16:9",
"duration": 5,
"generate_audio": true,
"watermark": false
}'curl --request POST \
--url https://api.aisa.one/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "dreamina-seedance-2-0-260128"
}
'import requests
url = "https://api.aisa.one/v1/video/generations"
payload = { "model": "dreamina-seedance-2-0-260128" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: 'dreamina-seedance-2-0-260128'})
};
fetch('https://api.aisa.one/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.aisa.one/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'dreamina-seedance-2-0-260128'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.aisa.one/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"dreamina-seedance-2-0-260128\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.aisa.one/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"dreamina-seedance-2-0-260128\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.aisa.one/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"dreamina-seedance-2-0-260128\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": 123,
"id": "<string>",
"model": "<string>",
"object": "video.generation",
"progress": "<string>",
"status": "queued",
"completed_at": 123,
"customer_cost_micros_usd": 1,
"error": {
"message": "<string>"
},
"result": "<unknown>"
}{
"code": "video_submission_pending",
"error": "<string>",
"id": "<string>"
}Request contract
- Method and path: POST /v1/video/generations
- Availability: enabled
- Request URL template:
https://api.aisa.one/v1/video/generations - X-AISA-Cost-Mode: header; optional
{
"operationId": "createVideoGeneration",
"method": "POST",
"path": "/v1/video/generations",
"servers": [
{
"url": "https://api.aisa.one"
}
],
"parameters": [
{
"description": "Return a free, read-only cost quote for this caller and payload instead of generating.",
"in": "header",
"name": "X-AISA-Cost-Mode",
"schema": {
"enum": [
"quote"
],
"type": "string"
}
}
],
"security": [
{
"bearerAuth": []
}
],
"requestBody": {
"content": {
"application/json": {
"example": {
"content": [
{
"text": "A small red boat on a calm lake at dawn",
"type": "text"
}
],
"duration": 5,
"generate_audio": true,
"model": "dreamina-seedance-2-0-260128",
"ratio": "16:9",
"watermark": false
},
"schema": {
"additionalProperties": true,
"properties": {
"content": {
"description": "Prompt and reference media, for Seedance models.",
"items": {
"additionalProperties": true,
"properties": {
"image_url": {
"properties": {
"url": {
"type": "string"
}
},
"type": "object"
},
"role": {
"description": "For images: first_frame, last_frame or reference_image; for videos: reference_video.",
"type": "string"
},
"text": {
"type": "string"
},
"type": {
"description": "text, image_url or video_url.",
"type": "string"
},
"video_url": {
"properties": {
"url": {
"type": "string"
}
},
"type": "object"
}
},
"required": [
"type"
],
"type": "object"
},
"type": "array"
},
"duration": {
"description": "Output length in seconds; part of the price.",
"minimum": 1,
"type": "integer"
},
"generate_audio": {
"type": "boolean"
},
"model": {
"description": "A video model from GET /v1/models, for example dreamina-seedance-2-0-260128 or wan2.7-t2v.",
"minLength": 1,
"type": "string"
},
"prompt": {
"description": "Text prompt, for models that take a plain prompt.",
"type": "string"
},
"ratio": {
"description": "Aspect ratio, for example 16:9, 9:16 or 1:1.",
"type": "string"
},
"resolution": {
"description": "For example 720p or 1080p; part of the price.",
"type": "string"
},
"watermark": {
"type": "boolean"
}
},
"required": [
"model"
],
"type": "object"
}
}
},
"required": true
},
"x-aisa-status": "enabled",
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
Price depends on the model, resolution and duration; the selected model is billed per second, per request or by token usage. The charge is held at submission and settled when the task ends. Your account price may differ; use a request quote where supported.Authorizations
Headers
Body
Response
The task was created.