Tài liệu API
API xóa logo video Sora - Cung cấp video không watermark chất lượng cao
Lưu ý: Bạn cần đăng ký tài khoản để nhận API key và sử dụng dịch vụ.
Base URL: https://sora-api.zdata.vn
URL Format
✅ SEO-Friendly URLs (Khuyến nghị):
/api/video/v1/remove-logo/api/video/v1/drafts/api/video/v1/user/api/video/v1/api-keys
Tất cả các API endpoints sử dụng format SEO-friendly URLs ngắn gọn và dễ đọc.
Tính năng
- • Xóa logo watermark từ video Sora
- • Lấy danh sách video drafts từ tài khoản Sora
- • Trả về video gốc chất lượng cao
- • Hỗ trợ rate limiting
- • API key authentication
Bảo mật
- • API key required
- • Rate limiting per user
- • HTTPS only
- • CORS enabled
Xác thực
Tất cả các request API cần có API key trong header X-API-Key
Header Parameters
| Tên | Loại | Bắt buộc | Mô tả |
|---|---|---|---|
| X-API-Key | string | Bắt buộc | API key của bạn (lấy từ Dashboard) |
| Content-Type | string | Tùy chọn | application/json |
Ví dụ
X-API-Key: sk_live_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz567890abcdefghijklmnopqrstuvwxyz
Xóa Logo Video
https://sora-api.zdata.vn/api/video/v1/remove-logo
URL SEO-friendly: URL ngắn gọn và dễ đọc!
Mô tả
API này cho phép bạn xóa logo watermark từ video Sora và nhận về video gốc không watermark.
Lưu ý: API sử dụng chat completion format tương thích với OpenAI. Model: sora_url
Tham số yêu cầu
Tham số Body
application/json Bắt buộcmodel
string
Bắt buộc
Mô hình phân tích
Giá trị: sora_url
messages
array[object]
Bắt buộc
Định dạng chat
role
string
Bắt buộc
Giá trị: user
content
string
Bắt buộc
Địa chỉ bài đăng - URL video Sora cần xóa logo
Ví dụ
{
"model": "sora_url",
"messages": [
{
"role": "user",
"content": "https://sora.chatgpt.com/p/s_68f6140d88a88191a6b5c803d4e47b6c"
}
]
}
Phản hồi trả về
id
string
Bắt buộc
Chat completion ID
object
string
Bắt buộc
Object type: "chat.completion"
created
integer
Bắt buộc
Timestamp khi tạo response
model
string
Bắt buộc
Model được sử dụng: "sora_url"
links
object
Bắt buộc
Object chứa các URL video, GIF, thumbnail
mp4
- string: URL video không watermark (CDN)
mp4_wm
- string: URL video có watermark (CDN)
mp4_source
- string: URL video không watermark (source)
mp4_wm_source
- string: URL video có watermark (source)
gif
- string: URL GIF preview (CDN)
gif_source
- string: URL GIF preview (source)
thumbnail
- string: URL thumbnail (CDN)
thumbnail_source
- string: URL thumbnail (source)
md
- string: URL markdown (CDN, optional)
md_source
- string: URL markdown (source, optional)
id
- string: Video ID (optional)
text
- string: Mô tả video (optional)
post_id
string
Tùy chọn
ID của post Sora (ví dụ: s_691d3cebe84c819186b4b0284a6a4677)
original_input
string
Tùy chọn
URL gốc được gửi vào API
post_info
object
Tùy chọn
Thông tin về post Sora
title
- string: Tiêu đề/mô tả video
view_count
- integer: Số lượt xem
like_count
- integer: Số lượt thích
attachments_count
- integer: Số file đính kèm
choices
array
Bắt buộc
Array chứa message từ assistant
message.role
- string: "assistant"
message.content
- string: Text message (không phải JSON)
finish_reason
- string: "stop"
index
- integer: 0
usage
object
Bắt buộc
Thông tin sử dụng tokens
prompt_tokens
- integer: Số tokens trong prompt
completion_tokens
- integer: Số tokens trong completion
total_tokens
- integer: Tổng số tokens
Ví dụ phản hồi
{
"usage": {
"completion_tokens": 6321,
"total_tokens": 6382,
"prompt_tokens": 61
},
"links": {
"mp4": "https://videos-us3.ss2.life/az/files/00000000-736c-7285-99fa-f7a5656c1a05%2Fraw?...",
"mp4_wm": "https://videos-us3.ss2.life/az/files/00000000-cad8-7282-9000-40bd87750efa%2Fraw?...",
"mp4_source": "https://videos.openai.com/az/files/00000000-736c-7285-99fa-f7a5656c1a05%2Fraw?...",
"mp4_wm_source": "https://videos.openai.com/az/files/00000000-cad8-7282-9000-40bd87750efa%2Fraw?...",
"gif": "https://videos-us3.ss2.life/az/files/d6c5cd51167d10c_00000000-736c-7285-99fa-f7a5656c1a05%2Fdrvs%2Fgif%2Fraw?...",
"gif_source": "https://videos.openai.com/az/files/d6c5cd51167d10c_00000000-736c-7285-99fa-f7a5656c1a05%2Fdrvs%2Fgif%2Fraw?...",
"thumbnail": "https://videos-us3.ss2.life/az/files/bfa83200288d280_00000000-736c-7285-99fa-f7a5656c1a05%2Fdrvs%2Fthumbnail%2Fraw?...",
"thumbnail_source": "https://videos.openai.com/az/files/bfa83200288d280_00000000-736c-7285-99fa-f7a5656c1a05%2Fdrvs%2Fthumbnail%2Fraw?...",
"md": "https://videos-us3.ss2.life/az/files/f8e64af62f2201d_00000000-736c-7285-99fa-f7a5656c1a05%2Fdrvs%2Fmd%2Fraw?...",
"md_source": "https://videos.openai.com/az/files/f8e64af62f2201d_00000000-736c-7285-99fa-f7a5656c1a05%2Fdrvs%2Fmd%2Fraw?...",
"id": "s_691d3cebe84c819186b4b0284a6a4677",
"text": "@daithinh76 Early morning in Quảng Ngãi, Vietnam..."
},
"post_id": "s_691d3cebe84c819186b4b0284a6a4677",
"original_input": "https://sora.chatgpt.com/p/s_691d3cebe84c819186b4b0284a6a4677",
"object": "chat.completion",
"id": "chatcmpl-sora-1763532535",
"created": 1763532536,
"model": "sora_url",
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "Phân tích thành công ✅\nLink video:\nhttps://videos-us3.ss2.life/az/files/00000000-736c-7285-99fa-f7a5656c1a05%2Fraw?..."
},
"index": 0
}
],
"post_info": {
"title": "@daithinh76 Early morning in Quảng Ngãi, Vietnam...",
"view_count": 1,
"like_count": 0,
"attachments_count": 1
}
}
Ví dụ yêu cầu
cURL
curl --location --request POST 'https://sora-api.zdata.vn/api/video/v1/remove-logo' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "sora_url",
"messages": [
{
"role": "user",
"content": "https://sora.chatgpt.com/p/s_68f6140d88a88191a6b5c803d4e47b6c"
}
]
}'
JavaScript
fetch('https://sora-api.zdata.vn/api/video/v1/remove-logo', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
body: JSON.stringify({
model: 'sora_url',
messages: [
{
role: 'user',
content: 'https://sora.chatgpt.com/p/s_68f6140d88a88191a6b5c803d4e47b6c'
}
]
})
})
.then(response => response.json())
.then(data => {
// Response format: links, post_id, post_info, usage at top level
console.log('Video URL (CDN):', data.links.mp4);
console.log('Video URL (Source):', data.links.mp4_source);
console.log('Video with Watermark (CDN):', data.links.mp4_wm);
console.log('Video with Watermark (Source):', data.links.mp4_wm_source);
console.log('GIF (CDN):', data.links.gif);
console.log('GIF (Source):', data.links.gif_source);
console.log('Thumbnail (CDN):', data.links.thumbnail);
console.log('Thumbnail (Source):', data.links.thumbnail_source);
console.log('Post ID:', data.post_id);
console.log('Post Info:', data.post_info);
console.log('Usage:', data.usage);
console.log('Message Content:', data.choices[0].message.content);
})
.catch(error => console.error('Error:', error));
PHP
$ch = curl_init('https://sora-api.zdata.vn/api/video/v1/remove-logo');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-Key: YOUR_API_KEY'
],
CURLOPT_POSTFIELDS => json_encode([
'model' => 'sora_url',
'messages' => [
[
'role' => 'user',
'content' => 'https://sora.chatgpt.com/p/s_68f6140d88a88191a6b5c803d4e47b6c'
]
]
])
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
// Response format: links, post_id, post_info, usage at top level
if (isset($data['links'])) {
echo "Video URL (CDN): " . $data['links']['mp4'] . "\n";
echo "Video URL (Source): " . $data['links']['mp4_source'] . "\n";
echo "GIF (CDN): " . ($data['links']['gif'] ?? 'N/A') . "\n";
echo "Thumbnail (CDN): " . ($data['links']['thumbnail'] ?? 'N/A') . "\n";
echo "Post ID: " . ($data['post_id'] ?? 'N/A') . "\n";
}
curl_close($ch);
Python
import requests
url = 'https://sora-api.zdata.vn/api/video/v1/remove-logo'
headers = {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
}
data = {
'model': 'sora_url',
'messages': [
{
'role': 'user',
'content': 'https://sora.chatgpt.com/p/s_68f6140d88a88191a6b5c803d4e47b6c'
}
]
}
response = requests.post(url, json=data, headers=headers)
result = response.json()
# Response format: links, post_id, post_info, usage at top level
if 'links' in result:
print('Video URL (CDN):', result['links']['mp4'])
print('Video URL (Source):', result['links']['mp4_source'])
print('GIF (CDN):', result['links'].get('gif'))
print('Thumbnail (CDN):', result['links'].get('thumbnail'))
print('Post ID:', result.get('post_id'))
print('Post Info:', result.get('post_info'))
Java
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String json = "{\"model\":\"sora_url\",\"messages\":[{\"role\":\"user\",\"content\":\"https://sora.chatgpt.com/p/s_68f6140d88a88191a6b5c803d4e47b6c\"}]}";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://sora-api.zdata.vn/api/video/v1/remove-logo"))
.header("Content-Type", "application/json")
.header("X-API-Key", "YOUR_API_KEY")
.POST(HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Lấy Video Drafts từ Sora
https://sora-api.zdata.vn/api/video/v1/drafts
Documentation: https://6ibmqmipvf.apifox.cn/368663635e0
Mô tả
API này cho phép bạn lấy danh sách tất cả video drafts từ tài khoản Sora của bạn thông qua access token.
Lưu ý: Bạn cần lấy access token từ https://sora.chatgpt.com/api/auth/session sau khi đăng nhập vào tài khoản Sora.
Tham số yêu cầu
Tham số Body
application/json Bắt buộcaccess_token
string
Bắt buộc
Access token từ Sora (lấy từ https://sora.chatgpt.com/api/auth/session)
Hoặc sử dụng format messages:
messages
array[object]
Tùy chọn
Format tương thích OpenAI
role: "user"
content: "access_token"
Ví dụ Request
{
"access_token": "eyJhbGciOiJSUzI1NiIs..."
}
Phản hồi trả về
choices
array
Thông tin phân tích từ API
data
array
Mảng các video drafts, mỗi item chứa:
videos
- array: Các file video với URLs (source_path, thumbnail_path, gif_path, mp3_path, md_path, etc.)
id
- string: Task ID của video draft
prompt
- string: Prompt được sử dụng để tạo video
total
integer
Tổng số video drafts tìm thấy
usage
object
Token usage statistics
Ví dụ phản hồi
{
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "✅ 解析成功\n\n📹 共找到 16 个视频草稿"
}
}
],
"usage": {
"completion_tokens": 75992,
"total_tokens": 77708,
"prompt_tokens": 1716
},
"object": "chat.completion",
"data": [
{
"videos": [
{
"source_path": "https://videos-us3.ss2.life/az/files/...",
"source_path_source": "https://videos.openai.com/az/files/...",
"thumbnail_path": "https://videos-us3.ss2.life/az/files/...",
"gif_path": "https://videos-us3.ss2.life/az/files/...",
"mp3_path": "https://videos-us3.ss2.life/az/files/...",
"md_path": "https://videos-us3.ss2.life/az/files/..."
}
],
"id": "task_01kb451mdsf2h99kx1fwsmfxrc",
"prompt": "Tạo một video quảng cáo chuyên nghiệp..."
}
],
"created": 1764695034,
"model": "sora-drafts-url",
"id": "chatcmpl-drafts-1764695027",
"total": 16
}
Ví dụ yêu cầu
cURL
curl --location --request POST 'https://sora-api.zdata.vn/api/video/v1/drafts' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"access_token": "eyJhbGciOiJSUzI1NiIs..."
}'
JavaScript
fetch('https://sora-api.zdata.vn/api/video/v1/drafts', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
body: JSON.stringify({
access_token: 'eyJhbGciOiJSUzI1NiIs...'
})
})
.then(response => response.json())
.then(data => {
console.log('Total drafts:', data.total);
data.data.forEach(draft => {
console.log('Task ID:', draft.id);
console.log('Prompt:', draft.prompt);
draft.videos.forEach(video => {
console.log('Video URL:', video.source_path);
console.log('Thumbnail:', video.thumbnail_path);
});
});
})
.catch(error => console.error('Error:', error));
PHP
$ch = curl_init('https://sora-api.zdata.vn/api/video/v1/drafts');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-Key: YOUR_API_KEY'
],
CURLOPT_POSTFIELDS => json_encode([
'access_token' => 'eyJhbGciOiJSUzI1NiIs...'
])
]);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo "Total drafts: " . $data['total'] . "\n";
foreach ($data['data'] as $draft) {
echo "Task ID: " . $draft['id'] . "\n";
echo "Prompt: " . $draft['prompt'] . "\n";
foreach ($draft['videos'] as $video) {
echo "Video URL: " . $video['source_path'] . "\n";
}
}
curl_close($ch);
Python
import requests
url = 'https://sora-api.zdata.vn/api/video/v1/drafts'
headers = {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
}
data = {
'access_token': 'eyJhbGciOiJSUzI1NiIs...'
}
response = requests.post(url, json=data, headers=headers)
result = response.json()
print(f"Total drafts: {result['total']}")
for draft in result['data']:
print(f"Task ID: {draft['id']}")
print(f"Prompt: {draft['prompt']}")
for video in draft['videos']:
print(f"Video URL: {video['source_path']}")
print(f"Thumbnail: {video['thumbnail_path']}")
Cách lấy Access Token
Bước 1: Đăng nhập Sora
Truy cập https://sora.chatgpt.com và đăng nhập tài khoản của bạn.
Bước 2: Lấy Access Token
Sau khi đăng nhập, mở Developer Console (F12) và chạy lệnh sau hoặc truy cập trực tiếp:
https://sora.chatgpt.com/api/auth/session
Bước 3: Copy Access Token
Response sẽ có dạng JSON, copy giá trị accessToken để sử dụng trong API request.
{
"user": {...},
"expires": "...",
"accessToken": "eyJhbGciOiJSUzI1NiIs..." ← Copy giá trị này
}
Thông tin User
https://sora-api.zdata.vn/api/video/v1/user
Lấy thông tin user hiện tại (yêu cầu authentication)
Response Example
{
"id": 1,
"username": "user123",
"email": "user@example.com",
"full_name": "User Name",
"created_at": "2025-01-01 00:00:00"
}
Quản lý API Keys
GET /api/video/v1/api-keys
Lấy danh sách API keys của user
https://sora-api.zdata.vn/api/video/v1/api-keys
POST /api/video/v1/api-keys
Tạo API key mới
https://sora-api.zdata.vn/api/video/v1/api-keys
Request Body
{
"name": "My API Key"
}
Mã lỗi
| Mã | Mô tả |
|---|---|
| 400 | Bad Request - Dữ liệu request không hợp lệ |
| 401 | Unauthorized - API key không hợp lệ hoặc thiếu |
| 429 | Too Many Requests - Vượt quá rate limit |
| 500 | Internal Server Error - Lỗi server |