curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720"
}'
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Vidu-q2",
"prompt": "赛博朋克城市夜景,镜头缓慢推进",
"seconds": "5",
"size": "1280x720"
}'
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Vidu-q2-pro",
"prompt": "让人物向前走并微笑",
"image": "https://example.com/character.png",
"seconds": "5",
"size": "720x1280"
}'
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Kling-3.0-Omni",
"prompt": "参考多张图片中的人物和场景风格生成视频",
"images": [
"https://example.com/ref-1.png",
"https://example.com/ref-2.png"
],
"seconds": "6",
"size": "1280x720"
}'
import requests
resp = requests.post(
"https://td.geeknow.top/v1/videos",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720",
},
timeout=60,
)
print(resp.json())
const response = await fetch("https://td.geeknow.top/v1/videos", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "Kling-3.0-Omni",
prompt: "死寂系统空间中,角色被蓝色面板照亮",
seconds: "15",
size: "1280x720",
}),
});
console.log(await response.json());
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload := map[string]interface{}{
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720",
}
body, err := json.Marshal(payload)
if err != nil {
panic(err)
}
req, err := http.NewRequest("POST", "https://td.geeknow.top/v1/videos", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(respBody))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String json = """
{
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://td.geeknow.top/v1/videos"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$ch = curl_init('https://td.geeknow.top/v1/videos');
$payload = [
'model' => 'Kling-3.0-Omni',
'prompt' => '死寂系统空间中,角色被蓝色面板照亮',
'seconds' => '15',
'size' => '1280x720',
];
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
echo $response;
require "net/http"
require "uri"
require "json"
uri = URI("https://td.geeknow.top/v1/videos")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
request["Content-Type"] = "application/json"
request.body = JSON.generate({
model: "Kling-3.0-Omni",
prompt: "死寂系统空间中,角色被蓝色面板照亮",
seconds: "15",
size: "1280x720"
})
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
import Foundation
let url = URL(string: "https://td.geeknow.top/v1/videos")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_API_KEY", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720"
]
request.httpBody = try JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, _, error in
if let error {
print(error)
return
}
if let data, let text = String(data: data, encoding: .utf8) {
print(text)
}
}
task.resume()
RunLoop.main.run()
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
using var client = new HttpClient();
var payload = new
{
model = "Kling-3.0-Omni",
prompt = "死寂系统空间中,角色被蓝色面板照亮",
seconds = "15",
size = "1280x720"
};
using var request = new HttpRequestMessage(HttpMethod.Post, "https://td.geeknow.top/v1/videos");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");
request.Content = new StringContent(
JsonSerializer.Serialize(payload),
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<void> main() async {
final payload = {
'model': 'Kling-3.0-Omni',
'prompt': '死寂系统空间中,角色被蓝色面板照亮',
'seconds': '15',
'size': '1280x720',
};
final response = await http.post(
Uri.parse('https://td.geeknow.top/v1/videos'),
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: jsonEncode(payload),
);
print(response.body);
}
国产视频模型
国产视频模型生成
使用 POST /v1/videos 提交国产视频模型任务,覆盖文生、图生、参考图、参考视频、首尾帧、动作控制、数字人、对口型和模板特效。
POST
https://td.geeknow.top
/
v1
/
videos
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720"
}'
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Vidu-q2",
"prompt": "赛博朋克城市夜景,镜头缓慢推进",
"seconds": "5",
"size": "1280x720"
}'
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Vidu-q2-pro",
"prompt": "让人物向前走并微笑",
"image": "https://example.com/character.png",
"seconds": "5",
"size": "720x1280"
}'
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Kling-3.0-Omni",
"prompt": "参考多张图片中的人物和场景风格生成视频",
"images": [
"https://example.com/ref-1.png",
"https://example.com/ref-2.png"
],
"seconds": "6",
"size": "1280x720"
}'
import requests
resp = requests.post(
"https://td.geeknow.top/v1/videos",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720",
},
timeout=60,
)
print(resp.json())
const response = await fetch("https://td.geeknow.top/v1/videos", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "Kling-3.0-Omni",
prompt: "死寂系统空间中,角色被蓝色面板照亮",
seconds: "15",
size: "1280x720",
}),
});
console.log(await response.json());
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload := map[string]interface{}{
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720",
}
body, err := json.Marshal(payload)
if err != nil {
panic(err)
}
req, err := http.NewRequest("POST", "https://td.geeknow.top/v1/videos", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(respBody))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String json = """
{
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://td.geeknow.top/v1/videos"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$ch = curl_init('https://td.geeknow.top/v1/videos');
$payload = [
'model' => 'Kling-3.0-Omni',
'prompt' => '死寂系统空间中,角色被蓝色面板照亮',
'seconds' => '15',
'size' => '1280x720',
];
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
echo $response;
require "net/http"
require "uri"
require "json"
uri = URI("https://td.geeknow.top/v1/videos")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
request["Content-Type"] = "application/json"
request.body = JSON.generate({
model: "Kling-3.0-Omni",
prompt: "死寂系统空间中,角色被蓝色面板照亮",
seconds: "15",
size: "1280x720"
})
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
import Foundation
let url = URL(string: "https://td.geeknow.top/v1/videos")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_API_KEY", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720"
]
request.httpBody = try JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, _, error in
if let error {
print(error)
return
}
if let data, let text = String(data: data, encoding: .utf8) {
print(text)
}
}
task.resume()
RunLoop.main.run()
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
using var client = new HttpClient();
var payload = new
{
model = "Kling-3.0-Omni",
prompt = "死寂系统空间中,角色被蓝色面板照亮",
seconds = "15",
size = "1280x720"
};
using var request = new HttpRequestMessage(HttpMethod.Post, "https://td.geeknow.top/v1/videos");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");
request.Content = new StringContent(
JsonSerializer.Serialize(payload),
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<void> main() async {
final payload = {
'model': 'Kling-3.0-Omni',
'prompt': '死寂系统空间中,角色被蓝色面板照亮',
'seconds': '15',
'size': '1280x720',
};
final response = await http.post(
Uri.parse('https://td.geeknow.top/v1/videos'),
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: jsonEncode(payload),
);
print(response.body);
}
国产视频模型生成
国产视频模型统一使用 Geeknow 视频接口提交任务。请求时传入基础模型或组合计费模型,接口会根据模型、分辨率、场景和音频等参数应用对应生成配置与计费规则。方法与路径
POST /v1/videos
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720"
}'
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Vidu-q2",
"prompt": "赛博朋克城市夜景,镜头缓慢推进",
"seconds": "5",
"size": "1280x720"
}'
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Vidu-q2-pro",
"prompt": "让人物向前走并微笑",
"image": "https://example.com/character.png",
"seconds": "5",
"size": "720x1280"
}'
curl -X POST https://td.geeknow.top/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Kling-3.0-Omni",
"prompt": "参考多张图片中的人物和场景风格生成视频",
"images": [
"https://example.com/ref-1.png",
"https://example.com/ref-2.png"
],
"seconds": "6",
"size": "1280x720"
}'
import requests
resp = requests.post(
"https://td.geeknow.top/v1/videos",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720",
},
timeout=60,
)
print(resp.json())
const response = await fetch("https://td.geeknow.top/v1/videos", {
method: "POST",
headers: {
Authorization: "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "Kling-3.0-Omni",
prompt: "死寂系统空间中,角色被蓝色面板照亮",
seconds: "15",
size: "1280x720",
}),
});
console.log(await response.json());
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"net/http"
)
func main() {
payload := map[string]interface{}{
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720",
}
body, err := json.Marshal(payload)
if err != nil {
panic(err)
}
req, err := http.NewRequest("POST", "https://td.geeknow.top/v1/videos", bytes.NewReader(body))
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, err := io.ReadAll(resp.Body)
if err != nil {
panic(err)
}
fmt.Println(string(respBody))
}
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String json = """
{
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720"
}
""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://td.geeknow.top/v1/videos"))
.header("Authorization", "Bearer YOUR_API_KEY")
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
<?php
$ch = curl_init('https://td.geeknow.top/v1/videos');
$payload = [
'model' => 'Kling-3.0-Omni',
'prompt' => '死寂系统空间中,角色被蓝色面板照亮',
'seconds' => '15',
'size' => '1280x720',
];
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
curl_close($ch);
echo $response;
require "net/http"
require "uri"
require "json"
uri = URI("https://td.geeknow.top/v1/videos")
request = Net::HTTP::Post.new(uri)
request["Authorization"] = "Bearer YOUR_API_KEY"
request["Content-Type"] = "application/json"
request.body = JSON.generate({
model: "Kling-3.0-Omni",
prompt: "死寂系统空间中,角色被蓝色面板照亮",
seconds: "15",
size: "1280x720"
})
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts response.body
import Foundation
let url = URL(string: "https://td.geeknow.top/v1/videos")!
var request = URLRequest(url: url)
request.httpMethod = "POST"
request.setValue("Bearer YOUR_API_KEY", forHTTPHeaderField: "Authorization")
request.setValue("application/json", forHTTPHeaderField: "Content-Type")
let payload: [String: Any] = [
"model": "Kling-3.0-Omni",
"prompt": "死寂系统空间中,角色被蓝色面板照亮",
"seconds": "15",
"size": "1280x720"
]
request.httpBody = try JSONSerialization.data(withJSONObject: payload)
let task = URLSession.shared.dataTask(with: request) { data, _, error in
if let error {
print(error)
return
}
if let data, let text = String(data: data, encoding: .utf8) {
print(text)
}
}
task.resume()
RunLoop.main.run()
using System.Net.Http.Headers;
using System.Text;
using System.Text.Json;
using var client = new HttpClient();
var payload = new
{
model = "Kling-3.0-Omni",
prompt = "死寂系统空间中,角色被蓝色面板照亮",
seconds = "15",
size = "1280x720"
};
using var request = new HttpRequestMessage(HttpMethod.Post, "https://td.geeknow.top/v1/videos");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", "YOUR_API_KEY");
request.Content = new StringContent(
JsonSerializer.Serialize(payload),
Encoding.UTF8,
"application/json"
);
using var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<void> main() async {
final payload = {
'model': 'Kling-3.0-Omni',
'prompt': '死寂系统空间中,角色被蓝色面板照亮',
'seconds': '15',
'size': '1280x720',
};
final response = await http.post(
Uri.parse('https://td.geeknow.top/v1/videos'),
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: jsonEncode(payload),
);
print(response.body);
}
请求字段
string
required
模型名称。推荐传基础模型,例如
Kling-2.6、Vidu-q2-pro、GV-3.1-fast;也可以直接传组合计费模型,例如 kling-3.0-omni-1080p-ref-audio、vidu-q2-pro-reference-1080p-offpeak。string
required
提示词。文生视频必须传;图生、参考图、动作控制等场景也建议传清楚运动、镜头、主体和风格。
string | integer
生成时长。顶层
seconds 优先级最高,例如 "seconds": "5"。integer
时长兼容字段。优先级低于顶层
seconds。string
快速尺寸字段,支持
720P / 1080P,也支持 WxH,例如 720x1280。string
单张参考图或首帧图。当前支持可访问的
http(s) 图片 URL 或文件 ID;不支持 data:image/...;base64,... 这类 base64 data URI。array<string>
多张参考图。每张图会作为图片素材处理;最多 3 张。
string | array<string>
参考图兼容字段。国产模型侧建议优先使用
image / images。参数优先级
时长优先级:- 顶层
seconds - 顶层
duration - 默认
5
- 顶层
size - 模型默认值
- 有
image、images或input_reference这类参考输入时,按图生或参考输入场景处理。 - 没有参考输入时,按文生视频处理。
场景字段
| 场景 | 关键字段 |
|---|---|
| 文生视频 | model + prompt + seconds + size |
| 图生视频 | image / images / input_reference |
| 多图参考 | images |
| 首尾帧 | 支持的模型可按顺序传入 images |
size 规则
- 顶层
size支持720P/1080P,也支持WxH。 - 当只传
size=WxH时,接口会推导分辨率和宽高比。
size=720x1280+model=Kling-3.0-Omni会推导为竖屏视频。size=1280x720+model=Kling-3.0-Omni会推导为横屏视频。
相关页面
⌘I