import Foundationlet url = URL(string: "https://aireiter.com/api/openapi/submit")!let payload: [String: Any] = [ "model": "flow_music_extend", "params": [ "clip_id": "cd984d09-5a77-4a06-9553-e47a55f009b0", "prompt": "더 따뜻한 기타 간주를 이어 붙여줘", "extend_from_s": 8, "extend_s": 12, "version": "lyria-3-pro", ], "out_task_id": "flow_music_extend_123456"]var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(responseString) }}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": "flow_music_extend","params": { "clip_id": "cd984d09-5a77-4a06-9553-e47a55f009b0", "prompt": "더 따뜻한 기타 간주를 이어 붙여줘", "extend_from_s": 8, "extend_s": 12, "version": "lyria-3-pro"},"out_task_id": "flow_music_extend_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); }}
(* Requires cohttp and yojson libraries *)open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://aireiter.com/api/openapi/submit"let payload = {|{"model": "flow_music_extend","params": { "clip_id": "cd984d09-5a77-4a06-9553-e47a55f009b0", "prompt": "더 따뜻한 기타 간주를 이어 붙여줘", "extend_from_s": 8, "extend_s": 12, "version": "lyria-3-pro"},"out_task_id": "flow_music_extend_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_str -> print_endline body_str in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { final url = Uri.parse('https://aireiter.com/api/openapi/submit'); final payload = { model: "flow_music_extend", params: { clip_id: "cd984d09-5a77-4a06-9553-e47a55f009b0", prompt: "더 따뜻한 기타 간주를 이어 붙여줘", extend_from_s: 8, extend_s: 12, version: "lyria-3-pro", }, out_task_id: "flow_music_extend_123456" }; final response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json' }, body: jsonEncode(payload), ); print(response.body);}
library(httr)library(jsonlite)url <- "https://aireiter.com/api/openapi/submit"payload <- list( model = "flow_music_extend", params = list( clip_id = "cd984d09-5a77-4a06-9553-e47a55f009b0", prompt = "더 따뜻한 기타 간주를 이어 붙여줘", extend_from_s = 8, extend_s = 12, version = "lyria-3-pro", ), out_task_id = "flow_music_extend_123456")response <- POST( url, add_headers( Authorization = "Bearer <token>", `Content-Type` = "application/json" ), body = toJSON(payload, auto_unbox = TRUE), encode = "raw")cat(content(response, "text"))
import Foundationlet url = URL(string: "https://aireiter.com/api/openapi/submit")!let payload: [String: Any] = [ "model": "flow_music_extend", "params": [ "clip_id": "cd984d09-5a77-4a06-9553-e47a55f009b0", "prompt": "더 따뜻한 기타 간주를 이어 붙여줘", "extend_from_s": 8, "extend_s": 12, "version": "lyria-3-pro", ], "out_task_id": "flow_music_extend_123456"]var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(responseString) }}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": "flow_music_extend","params": { "clip_id": "cd984d09-5a77-4a06-9553-e47a55f009b0", "prompt": "더 따뜻한 기타 간주를 이어 붙여줘", "extend_from_s": 8, "extend_s": 12, "version": "lyria-3-pro"},"out_task_id": "flow_music_extend_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); }}
(* Requires cohttp and yojson libraries *)open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://aireiter.com/api/openapi/submit"let payload = {|{"model": "flow_music_extend","params": { "clip_id": "cd984d09-5a77-4a06-9553-e47a55f009b0", "prompt": "더 따뜻한 기타 간주를 이어 붙여줘", "extend_from_s": 8, "extend_s": 12, "version": "lyria-3-pro"},"out_task_id": "flow_music_extend_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_str -> print_endline body_str in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { final url = Uri.parse('https://aireiter.com/api/openapi/submit'); final payload = { model: "flow_music_extend", params: { clip_id: "cd984d09-5a77-4a06-9553-e47a55f009b0", prompt: "더 따뜻한 기타 간주를 이어 붙여줘", extend_from_s: 8, extend_s: 12, version: "lyria-3-pro", }, out_task_id: "flow_music_extend_123456" }; final response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json' }, body: jsonEncode(payload), ); print(response.body);}
library(httr)library(jsonlite)url <- "https://aireiter.com/api/openapi/submit"payload <- list( model = "flow_music_extend", params = list( clip_id = "cd984d09-5a77-4a06-9553-e47a55f009b0", prompt = "더 따뜻한 기타 간주를 이어 붙여줘", extend_from_s = 8, extend_s = 12, version = "lyria-3-pro", ), out_task_id = "flow_music_extend_123456")response <- POST( url, add_headers( Authorization = "Bearer <token>", `Content-Type` = "application/json" ), body = toJSON(payload, auto_unbox = TRUE), encode = "raw")cat(content(response, "text"))
{ "error": { "code": 401, "message": "인증에 실패했습니다. API 키를 확인해 주세요" }}
{ "error": { "code": 433, "message": "계정 잔액이 부족합니다. 충전한 후 다시 시도해 주세요" } }
{ "error": { "code": 500, "message": "서버 내부 오류입니다. 잠시 후 다시 시도해 주세요" }}
Flow Music Extend의 AIReiter에서의 모델 이름은 flow_music_extend입니다. clip_id는 성공한 작업의 output[].clip_id에서 가져옵니다.
Authorizations
string
필수
모든 인터페이스는 인증에 Bearer Token을 사용해야 합니다.API Key 가져오기:API Key 관리 페이지에 접속하여 API Key를 받으세요.사용할 때 요청 헤더에 다음을 추가하세요:
Authorization: Bearer YOUR_API_KEY
Body
string
필수
모델 이름, 고정으로 사용:
flow_music_extend
object
필수
모델 매개변수 객체.
표시 params 객체 속성
string
필수
성공한 작업의 clip_id이며, output[].clip_id에서 가져옵니다.generate / extend / replace / cover / upload 성공 후 모두 반환됩니다. stems / download / video는 동일한 clip_id를 재사용하며, 새로 생성하지 않습니다. clip_id가 없고 오디오 파일만 있을 경우, 먼저 flow_music_upload를 호출하세요.
string
필수
이어쓰기 지시문으로, 다음에 어떻게 진행할지 설명합니다.
number
기본값:"0"
원곡의 몇 초부터 이어서 시작할지 지정합니다. 범위는 0부터 240까지입니다.
number
기본값:"30"
이어쓰기 길이, 단위는 초입니다. 범위는 1부터 240까지입니다.
string
기본값:"lyria-3-pro"
Lyria 버전, 가격은 동일합니다:
lyria-3-pro - 기본값
lyria-3.5 - 업데이트된 보컬 모델
string
필수
요청 측 작업 ID.사용자가 정의한 작업 식별자이며, 필수입니다. 영문자, 숫자, 밑줄, 하이픈만 지원하며, 길이는 1-64자입니다. 이후 이 ID로 작업 상태와 결과를 조회할 수 있습니다.
Response
string
요청 측 작업 ID로, 결과 조회에 사용할 수 있습니다.
string
초기 상태로, 일반적으로 "pending"입니다.
string
생성 시간, ISO 형식.
Query Task
Flow Music Extend는 비동기 음악 이어쓰기 모델입니다. 작업을 제출한 후, out_task_id를 사용하여 작업 상태를 조회하세요. 완료되면 output에는 audio, url, title 및 새 clip_id가 포함됩니다.
import Foundationlet url = URL(string: "https://aireiter.com/api/openapi/submit")!let payload: [String: Any] = [ "model": "flow_music_extend", "params": [ "clip_id": "cd984d09-5a77-4a06-9553-e47a55f009b0", "prompt": "더 따뜻한 기타 간주를 이어 붙여줘", "extend_from_s": 8, "extend_s": 12, "version": "lyria-3-pro", ], "out_task_id": "flow_music_extend_123456"]var request = URLRequest(url: url)request.httpMethod = "POST"request.setValue("Bearer <token>", forHTTPHeaderField: "Authorization")request.setValue("application/json", forHTTPHeaderField: "Content-Type")request.httpBody = try? JSONSerialization.data(withJSONObject: payload)let task = URLSession.shared.dataTask(with: request) { data, response, error in if let error = error { print("Error: \(error)") return } if let data = data, let responseString = String(data: data, encoding: .utf8) { print(responseString) }}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": "flow_music_extend","params": { "clip_id": "cd984d09-5a77-4a06-9553-e47a55f009b0", "prompt": "더 따뜻한 기타 간주를 이어 붙여줘", "extend_from_s": 8, "extend_s": 12, "version": "lyria-3-pro"},"out_task_id": "flow_music_extend_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); }}
(* Requires cohttp and yojson libraries *)open Lwtopen Cohttpopen Cohttp_lwt_unixlet url = "https://aireiter.com/api/openapi/submit"let payload = {|{"model": "flow_music_extend","params": { "clip_id": "cd984d09-5a77-4a06-9553-e47a55f009b0", "prompt": "더 따뜻한 기타 간주를 이어 붙여줘", "extend_from_s": 8, "extend_s": 12, "version": "lyria-3-pro"},"out_task_id": "flow_music_extend_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_str -> print_endline body_str in Lwt_main.run response
import 'dart:convert';import 'package:http/http.dart' as http;void main() async { final url = Uri.parse('https://aireiter.com/api/openapi/submit'); final payload = { model: "flow_music_extend", params: { clip_id: "cd984d09-5a77-4a06-9553-e47a55f009b0", prompt: "더 따뜻한 기타 간주를 이어 붙여줘", extend_from_s: 8, extend_s: 12, version: "lyria-3-pro", }, out_task_id: "flow_music_extend_123456" }; final response = await http.post( url, headers: { 'Authorization': 'Bearer <token>', 'Content-Type': 'application/json' }, body: jsonEncode(payload), ); print(response.body);}
library(httr)library(jsonlite)url <- "https://aireiter.com/api/openapi/submit"payload <- list( model = "flow_music_extend", params = list( clip_id = "cd984d09-5a77-4a06-9553-e47a55f009b0", prompt = "더 따뜻한 기타 간주를 이어 붙여줘", extend_from_s = 8, extend_s = 12, version = "lyria-3-pro", ), out_task_id = "flow_music_extend_123456")response <- POST( url, add_headers( Authorization = "Bearer <token>", `Content-Type` = "application/json" ), body = toJSON(payload, auto_unbox = TRUE), encode = "raw")cat(content(response, "text"))