Reference example
# 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,
"error": {
"message": "<string>"
},
"result": "<unknown>"
}{
"code": "video_submission_pending",
"error": "<string>",
"id": "<string>"
}Media Generation
Create a video generation task
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.
<!-- aisa-pricing:start -->
A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->
POST
https://api.aisa.one
/
v1
/
video
/
generations
Reference example
# 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,
"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
- Runtime facts: b05bd10c1f65804d1365e16e8d0787c01638f0abdea53ee0e7f966e42df0f0b5
{
"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",
"x-aisa-pricing": {
"description": "Charged at the selected model's catalog price, which can depend on the requested resolution and duration and is listed per second, per request or by tokens. The charge is held at submission and settled when the task ends. A quote for the caller and payload says whether its amount is exact or an estimate.",
"estimate_source": "unavailable",
"estimate_unavailable_reason": "model_dependent_price",
"kind": "model_catalog"
},
"components": {
"securitySchemes": {
"bearerAuth": {
"scheme": "bearer",
"type": "http"
}
}
}
}
Cost and request rules
A request reference price is not currently available; use a request quote where supported. Account-specific pricing and final settlement may differ. Published reference values are not an account-specific quote or a settled charge. For endpoints supporting X-AISA-Cost-Mode: quote, obtain a free quote for your exact request before execution; reconcile the settled cost with response metadata and Usage Logs. USD amounts use 1,000,000 integer micro-USD per dollar.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Return a free, read-only cost quote for this caller and payload instead of generating.
Available options:
quote Body
application/json
A video model from GET /v1/models, for example dreamina-seedance-2-0-260128 or wan2.7-t2v.
Minimum string length:
1Prompt and reference media, for Seedance models.
Show child attributes
Show child attributes
Output length in seconds; part of the price.
Required range:
x >= 1Text prompt, for models that take a plain prompt.
Aspect ratio, for example 16:9, 9:16 or 1:1.
For example 720p or 1080p; part of the price.
Response
The task was created.
Unix seconds.
Allowed value:
"video.generation"For example 0% or 100%.
Available options:
queued, in_progress, completed, failed, cancelled, unknown Unix seconds; present once the task has ended.
Show child attributes
Show child attributes
The model's output once completed, including the video URL (video_url or url).