curl --request GET \
--url https://api.newapi.si/v1beta/{operation_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.newapi.si/v1beta/{operation_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.newapi.si/v1beta/{operation_name}', 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.newapi.si/v1beta/{operation_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.newapi.si/v1beta/{operation_name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.newapi.si/v1beta/{operation_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.newapi.si/v1beta/{operation_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "models/veo3.1-fast/operations/abc123",
"done": true,
"response": {
"generatedVideos": [
{
"video": {
"uri": "https://example.com/generated-video.mp4"
}
}
]
}
}Truy vấn tác vụ (định dạng Omni và Veo)
Dòng này hỗ trợ định dạng tạo video OpenAI (xem chi tiết tại liên kết Định dạng tương thích với Sora tạo video).
Trang chuyên đề của API này dùng để giải thích định dạng truy vấn liên quan đến Omni và Veo, cũng như trạng thái dự phòng của giao thức truy vấn nguyên bản của Veo.
Với dòng Veo hiện tại, vui lòng dùng giao diện thống nhất /v1/videos để tạo và truy vấn.
Cấu trúc truy vấn operation_name dưới đây chỉ được giữ lại dưới dạng giải thích giao thức dự phòng, hiện chưa hỗ trợ gọi thực tế.
Lưu ý: gemini-omni Điểm cuối mà mô hình hỗ trợ là định dạng tương thích Sora POST /v1/videos hoặc định dạng Seedance POST /api/v3/contents/generations/tasks; không hỗ trợ điểm cuối Google gốc Veo predictLongRunning trên trang này.
curl --request GET \
--url https://api.newapi.si/v1beta/{operation_name} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.newapi.si/v1beta/{operation_name}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.newapi.si/v1beta/{operation_name}', 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.newapi.si/v1beta/{operation_name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.newapi.si/v1beta/{operation_name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.newapi.si/v1beta/{operation_name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.newapi.si/v1beta/{operation_name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"name": "models/veo3.1-fast/operations/abc123",
"done": true,
"response": {
"generatedVideos": [
{
"video": {
"uri": "https://example.com/generated-video.mp4"
}
}
]
}
}Ủy quyền
Tham số đường dẫn
Phản hồi
Cấu trúc phản hồi truy vấn đang được dự phòng. Hiện tại chỉ dùng để mô tả giao thức, chưa hỗ trợ gọi thực tế.
