curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-omni-flash-preview",
"prompt": "a red apple on a wooden table, short cinematic clip",
"aspect_ratio": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "gemini-omni-flash-preview",
"prompt": "a red apple on a wooden table, short cinematic clip",
"aspect_ratio": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "gemini-omni-flash-preview",
prompt: "a red apple on a wooden table, short cinematic clip",
aspect_ratio: "16:9"
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apimart.ai/v1/videos/generations"
payload := map[string]interface{}{
"model": "gemini-omni-flash-preview",
"prompt": "a red apple on a wooden table, short cinematic clip",
"aspect_ratio": "16:9",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01KS1H7ZYSJWH1N779S2FSHTKA"
}
]
}
{
"error": {
"code": 400,
"message": "요청 파라미터가 올바르지 않습니다",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "인증에 실패했습니다. API 키를 확인하세요",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "계정 잔액이 부족합니다. 충전 후 다시 시도하세요",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "요청이 너무 많습니다. 잠시 후 다시 시도하세요",
"type": "rate_limit_error"
}
}
Gemini Omni Flash
Gemini Omni Flash 비디오 생성
- Google 공식 Gemini Omni Flash 올인원 멀티모달 비디오 생성 모델
- 텍스트-비디오, 이미지-비디오, 비디오-비디오(편집)를 지원하며, 텍스트 + 이미지 + 비디오 입력을 혼합할 수 있습니다
- 720p / 24fps, 3~10초, 오디오 포함 출력. 대화형 다중 턴 편집을 지원합니다
- 비동기 작업 API. 작업을 제출한 뒤 작업 ID로 생성 결과를 조회합니다
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-omni-flash-preview",
"prompt": "a red apple on a wooden table, short cinematic clip",
"aspect_ratio": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "gemini-omni-flash-preview",
"prompt": "a red apple on a wooden table, short cinematic clip",
"aspect_ratio": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "gemini-omni-flash-preview",
prompt: "a red apple on a wooden table, short cinematic clip",
aspect_ratio: "16:9"
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apimart.ai/v1/videos/generations"
payload := map[string]interface{}{
"model": "gemini-omni-flash-preview",
"prompt": "a red apple on a wooden table, short cinematic clip",
"aspect_ratio": "16:9",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01KS1H7ZYSJWH1N779S2FSHTKA"
}
]
}
{
"error": {
"code": 400,
"message": "요청 파라미터가 올바르지 않습니다",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "인증에 실패했습니다. API 키를 확인하세요",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "계정 잔액이 부족합니다. 충전 후 다시 시도하세요",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "요청이 너무 많습니다. 잠시 후 다시 시도하세요",
"type": "rate_limit_error"
}
}
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "gemini-omni-flash-preview",
"prompt": "a red apple on a wooden table, short cinematic clip",
"aspect_ratio": "16:9"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "gemini-omni-flash-preview",
"prompt": "a red apple on a wooden table, short cinematic clip",
"aspect_ratio": "16:9"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "gemini-omni-flash-preview",
prompt: "a red apple on a wooden table, short cinematic clip",
aspect_ratio: "16:9"
};
const headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
)
func main() {
url := "https://api.apimart.ai/v1/videos/generations"
payload := map[string]interface{}{
"model": "gemini-omni-flash-preview",
"prompt": "a red apple on a wooden table, short cinematic clip",
"aspect_ratio": "16:9",
}
jsonData, _ := json.Marshal(payload)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
}
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01KS1H7ZYSJWH1N779S2FSHTKA"
}
]
}
{
"error": {
"code": 400,
"message": "요청 파라미터가 올바르지 않습니다",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "인증에 실패했습니다. API 키를 확인하세요",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "계정 잔액이 부족합니다. 충전 후 다시 시도하세요",
"type": "payment_required"
}
}
{
"error": {
"code": 429,
"message": "요청이 너무 많습니다. 잠시 후 다시 시도하세요",
"type": "rate_limit_error"
}
}
인증
string
필수
모든 요청은 Bearer Token 인증이 필요합니다.API Key 발급:API Key 관리 페이지에서 API Key를 발급받으세요.요청 시 다음 헤더를 추가합니다:
Authorization: Bearer YOUR_API_KEY
요청 파라미터
string
필수
비디오 생성 모델 이름입니다.
gemini-omni-flash-preview로 고정됩니다.string
필수
텍스트 지시문입니다. 텍스트-비디오에서는 장면 설명, 이미지 / 비디오-비디오에서는 동작 / 스타일 / 편집 지시입니다.
prompt와 참조 소재(image_urls / video_urls) 중 최소 하나는 제공해야 합니다.array<string>
참조 이미지로, 최대 16장입니다. 각 항목은
http(s):// URL 형식입니다.JPEG / PNG를 지원합니다. 여러 주체(예: 「고양이 + 털실뭉치」)는 여러 장을 전달하고, prompt에서 이들이 어떻게 상호작용하는지 설명할 수 있습니다.array<string>
참조 / 편집 대상 비디오로, 최대 1개입니다(다중 비디오 참조는 지원하지 않습니다).
http(s):// 직접 링크 또는 data:video/... 형식일 수 있습니다.- 참조 비디오는 1~24초이며, 공식적으로 ≤3초를 권장합니다.
video_urls와extend_from_task_id는 상호 배타적이며, 둘 중 하나만 제공할 수 있고 동시에 전달할 수 없습니다.
string
기본값:"16:9"
비디오 화면 비율로, 실제 출력 화면의 방향을 제어합니다.다음만 지원합니다:
video_urls를 전달하면 aspect_ratio 매개변수가 적용되지 않습니다.16:9- 가로(기본값)9:16- 세로
16:9로 처리됩니다.string
기본값:"720p"
비디오 해상도입니다. 현재
720p만 지원합니다.string
이전 작업 ID입니다. 이전 생성 작업의 **
task_id**를 입력합니다.extend_from_task_id와 video_urls는 상호 배타적이며, 둘 중 하나만 제공할 수 있고 동시에 전달할 수 없습니다.응답
integer
응답 상태 코드입니다. 성공 시
200입니다.array
작업 결과 조회
비디오 생성은 비동기 작업입니다. 제출 후task_id가 반환되며, 작업 상태 조회 API로 생성 진행 상황과 결과를 조회합니다.
성공 결과 예시
{
"code": 200,
"data": {
"id": "task_01KS1H7ZYSJWH1N779S2FSHTKA",
"status": "completed",
"progress": 100,
"created": 1779246294,
"completed": 1779246334,
"actual_time": 40,
"estimated_time": 60,
"cost": 1.0,
"credits_cost": 10,
"result": {
"videos": [
{
"url": ["https://cdn.example.com/gemini_omni_xxx.mp4"],
"expires_at": 1779332760
}
]
}
}
}
사용 사례
시나리오 1: 텍스트-비디오
{
"model": "gemini-omni-flash-preview",
"prompt": "a blue butterfly landing on a flower, macro, soft light",
"aspect_ratio": "9:16"
}
시나리오 2: 이미지-비디오
{
"model": "gemini-omni-flash-preview",
"prompt": "turn this drawing into realistic footage, use it only as a motion guide",
"image_urls": ["https://example.com/sketch.jpg"]
}
시나리오 3: 비디오-비디오
{
"model": "gemini-omni-flash-preview",
"prompt": "when the person touches the mirror, make it ripple like liquid",
"video_urls": ["https://example.com/clip.mp4"]
}
⌘I