import Foundationlet url = URL(string: "https://aireiter.com/api/openapi/submit")!var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")let payload: [String: Any] = [ "model": "kling_3_0", "params": [ "prompt": "A cat focused on painting in a bright rehearsal room", "image_url": "https://example.com/first-frame.jpg", "resolution": "1080p", "video_length": 5, "generate_audio": true, "aspect_ratio": "16:9" ], "out_task_id": "my_task_123456"]request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let data = data { print(String(data: data, encoding: .utf8) ?? "") }}task.resume()
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;class Program{ static async Task Main(string[] args) { var url = "https://aireiter.com/api/openapi/submit"; var payload = "{\"model\":\"kling_3_0\",\"params\":{\"prompt\":\"A cat focused on painting in a bright rehearsal room\",\"image_url\":\"https://example.com/first-frame.jpg\",\"resolution\":\"1080p\",\"video_length\":5,\"generate_audio\":true,\"aspect_ratio\":\"16:9\"},\"out_task_id\":\"my_task_123456\"}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); var content = new StringContent(payload, Encoding.UTF8, "application/json"); var response = await client.PostAsync(url, content); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); } }}
open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://aireiter.com/api/openapi/submit"let payload = {|{"model":"kling_3_0","params":{"prompt":"A cat focused on painting in a bright rehearsal room","image_url":"https://example.com/first-frame.jpg","resolution":"1080p","video_length":5,"generate_audio":true,"aspect_ratio":"16:9"},"out_task_id":"my_task_123456"}|}let () = let headers = Header.init () |> fun h -> Header.add h "Authorization" "Bearer <token>" |> fun h -> Header.add h "Content-Type" "application/json" in let body = Cohttp_lwt.Body.of_string payload in let response = Client.post ~headers ~body (Uri.of_string url) >>= fun (resp, body) -> body |> Cohttp_lwt.Body.to_string >|= fun body -> print_endline body in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { var url = Uri.parse('https://aireiter.com/api/openapi/submit'); var payload = { 'model': 'kling_3_0', 'params': { 'prompt': 'A cat focused on painting in a bright rehearsal room', 'image_url': 'https://example.com/first-frame.jpg', 'resolution': '1080p', 'video_length': 5, 'generate_audio': true, 'aspect_ratio': '16:9' }, 'out_task_id': 'my_task_123456' }; var response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json', }, body: jsonEncode(payload), ); print(response.body);}
import Foundationlet url = URL(string: "https://aireiter.com/api/openapi/submit")!var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")let payload: [String: Any] = [ "model": "kling_3_0", "params": [ "prompt": "A cat focused on painting in a bright rehearsal room", "image_url": "https://example.com/first-frame.jpg", "resolution": "1080p", "video_length": 5, "generate_audio": true, "aspect_ratio": "16:9" ], "out_task_id": "my_task_123456"]request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let data = data { print(String(data: data, encoding: .utf8) ?? "") }}task.resume()
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;class Program{ static async Task Main(string[] args) { var url = "https://aireiter.com/api/openapi/submit"; var payload = "{\"model\":\"kling_3_0\",\"params\":{\"prompt\":\"A cat focused on painting in a bright rehearsal room\",\"image_url\":\"https://example.com/first-frame.jpg\",\"resolution\":\"1080p\",\"video_length\":5,\"generate_audio\":true,\"aspect_ratio\":\"16:9\"},\"out_task_id\":\"my_task_123456\"}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); var content = new StringContent(payload, Encoding.UTF8, "application/json"); var response = await client.PostAsync(url, content); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); } }}
open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://aireiter.com/api/openapi/submit"let payload = {|{"model":"kling_3_0","params":{"prompt":"A cat focused on painting in a bright rehearsal room","image_url":"https://example.com/first-frame.jpg","resolution":"1080p","video_length":5,"generate_audio":true,"aspect_ratio":"16:9"},"out_task_id":"my_task_123456"}|}let () = let headers = Header.init () |> fun h -> Header.add h "Authorization" "Bearer <token>" |> fun h -> Header.add h "Content-Type" "application/json" in let body = Cohttp_lwt.Body.of_string payload in let response = Client.post ~headers ~body (Uri.of_string url) >>= fun (resp, body) -> body |> Cohttp_lwt.Body.to_string >|= fun body -> print_endline body in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { var url = Uri.parse('https://aireiter.com/api/openapi/submit'); var payload = { 'model': 'kling_3_0', 'params': { 'prompt': 'A cat focused on painting in a bright rehearsal room', 'image_url': 'https://example.com/first-frame.jpg', 'resolution': '1080p', 'video_length': 5, 'generate_audio': true, 'aspect_ratio': '16:9' }, 'out_task_id': 'my_task_123456' }; var response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json', }, body: jsonEncode(payload), ); print(response.body);}
{ "error": { "code": 500, "message": "Internal server error, please try again later" }}
Authorizations
string
required
All endpoints require authentication using a Bearer Token.Get your API Key:Visit the API Key Management Page to obtain your API Key.Include in the request header:
Authorization: Bearer YOUR_API_KEY
Body
string
required
Model Name:
"kling_3_0" - Default
object
required
Model Parameters Object
Show params Object Properties
string
required
Text description for video generation
Required
string
URL of the reference image for image-to-video (first frame)
Supports only a single image
Supports publicly accessible URLs
string
URL of the reference image for the last frame
Supports only a single image
Must be used together with the first frame image_url
Supports publicly accessible URLs
string
default:"1080p"
Video resolution
720p - Standard Definition
1080p - High Definition (default)
4K - Ultra High Definition
integer
default:"5"
Video length (seconds)
Range: 3 to 15 (integer)
boolean
default:"true"
Whether to generate AI audio synchronized with the video
true - Generate audio (default)
false - Do not generate audio
No extra charge for audio at 4K resolution
string
default:"16:9"
Video aspect ratio
16:9 - Landscape (default)
9:16 - Portrait
1:1 - Square
Can be omitted if a reference image is provided; the system will automatically adapt based on the image
import Foundationlet url = URL(string: "https://aireiter.com/api/openapi/submit")!var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")let payload: [String: Any] = [ "model": "kling_3_0", "params": [ "prompt": "A cat focused on painting in a bright rehearsal room", "image_url": "https://example.com/first-frame.jpg", "resolution": "1080p", "video_length": 5, "generate_audio": true, "aspect_ratio": "16:9" ], "out_task_id": "my_task_123456"]request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let data = data { print(String(data: data, encoding: .utf8) ?? "") }}task.resume()
using System;using System.Net.Http;using System.Text;using System.Threading.Tasks;class Program{ static async Task Main(string[] args) { var url = "https://aireiter.com/api/openapi/submit"; var payload = "{\"model\":\"kling_3_0\",\"params\":{\"prompt\":\"A cat focused on painting in a bright rehearsal room\",\"image_url\":\"https://example.com/first-frame.jpg\",\"resolution\":\"1080p\",\"video_length\":5,\"generate_audio\":true,\"aspect_ratio\":\"16:9\"},\"out_task_id\":\"my_task_123456\"}"; using (var client = new HttpClient()) { client.DefaultRequestHeaders.Add("Authorization", "Bearer <token>"); var content = new StringContent(payload, Encoding.UTF8, "application/json"); var response = await client.PostAsync(url, content); var result = await response.Content.ReadAsStringAsync(); Console.WriteLine(result); } }}
open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://aireiter.com/api/openapi/submit"let payload = {|{"model":"kling_3_0","params":{"prompt":"A cat focused on painting in a bright rehearsal room","image_url":"https://example.com/first-frame.jpg","resolution":"1080p","video_length":5,"generate_audio":true,"aspect_ratio":"16:9"},"out_task_id":"my_task_123456"}|}let () = let headers = Header.init () |> fun h -> Header.add h "Authorization" "Bearer <token>" |> fun h -> Header.add h "Content-Type" "application/json" in let body = Cohttp_lwt.Body.of_string payload in let response = Client.post ~headers ~body (Uri.of_string url) >>= fun (resp, body) -> body |> Cohttp_lwt.Body.to_string >|= fun body -> print_endline body in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { var url = Uri.parse('https://aireiter.com/api/openapi/submit'); var payload = { 'model': 'kling_3_0', 'params': { 'prompt': 'A cat focused on painting in a bright rehearsal room', 'image_url': 'https://example.com/first-frame.jpg', 'resolution': '1080p', 'video_length': 5, 'generate_audio': true, 'aspect_ratio': '16:9' }, 'out_task_id': 'my_task_123456' }; var response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json', }, body: jsonEncode(payload), ); print(response.body);}