Sora2 API'sini kendi uygulamalarınızda kullanmak için aşağıdaki endpoint'leri kullanabilirsiniz.
https://sora-api.codefast.app
API key'inizin geçerli olup olmadığını kontrol edin.
X-API-Key: your_api_key_here
{ "message": "Video Generator API", "status": "running" }
Yeni bir video oluşturmak için kullanın.
X-API-Key: your_api_key_here
Content-Type: application/json
{
"prompt": "A beautiful sunset over mountains",
"aspect_ratio": "16:9",
"model": "sora-2-landscape"
}
X-API-Key: your_api_key_here
Content-Type: application/json
{
"messages": [
{
"role": "user",
"content": [
{
"type": "image_url",
"image_url": {
"url": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
}
},
{
"type": "text",
"text": "Make this image come to life with gentle movement"
}
]
}
],
"aspect_ratio": "16:9",
"model": "sora-2-landscape"
}
{
"job_id": "2949a83f-ac0c-46a3-a3a2-aad86d2d577d",
"status": "queued",
"queue_position": 1,
"total_in_queue": 1,
"aspect_ratio": "16:9",
"model": "sora-2-landscape",
"daily_limit": 20,
"daily_limit_remaining": 18
}
Video oluşturma durumunu kontrol edin.
X-API-Key: your_api_key_here
{
"job_id": "2949a83f-ac0c-46a3-a3a2-aad86d2d577d",
"status": "processing",
"queue_position": 0,
"total_in_queue": 0,
"aspect_ratio": "16:9",
"model": "sora_video2-landscape-hd",
"video_url": "",
"error": "",
"created_at": "20.09.2025 03:07:58",
"started_at": "20.09.2025 03:07:59",
"completed_at": "",
"daily_limit": 20,
"daily_limit_remaining": 18
}
{
"job_id": "2949a83f-ac0c-46a3-a3a2-aad86d2d577d",
"status": "completed",
"aspect_ratio": "16:9",
"model": "sora_video2-landscape-hd",
"video_url": "https://f003.backblazeb2.com/file/veo3videos/2949a83f-ac0c-46a3-a3a2-aad86d2d577d.mp4",
"completed_at": "20.09.2025 03:09:06"
}
Tüm oluşturduğunuz videoları listeleyin.
X-API-Key: your_api_key_here
{
"count": 4,
"videos": [
{
"job_id": "9343595a-479e-41d7-a34a-88df5ceffa5f",
"video_url": "https://iframe.mediadelivery.net/play/491799/224feb1d-...",
"created_at": "20.09.2025 03:05:30"
}
],
"daily_limit": 20,
"daily_limit_remaining": 18
}
// Sadece prompt ile video oluştur
const response = await fetch('https://sora-api.codefast.app/generate', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'A beautiful sunset over mountains',
aspect_ratio: '16:9',
model: 'sora-2-landscape'
})
});
const data = await response.json();
// Görselden video oluştur
const fileInput = document.getElementById('imageInput');
const file = fileInput.files[0];
// Görseli base64'e çevir
const reader = new FileReader();
reader.onload = async (e) => {
const imageBase64 = e.target.result;
const response = await fetch('https://sora-api.codefast.app/generate', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key_here',
'Content-Type': 'application/json'
},
body: JSON.stringify({
messages: [{
role: 'user',
content: [
{
type: 'image_url',
image_url: { url: imageBase64 }
},
{
type: 'text',
text: 'Make this image come to life'
}
]
}],
aspect_ratio: '16:9',
model: 'sora-2-landscape'
})
});
const data = await response.json();
};
reader.readAsDataURL(file);
import requests
response = requests.post(
'https://sora-api.codefast.app/generate',
headers={'X-API-Key': 'your_api_key_here'},
json={
'prompt': 'A beautiful sunset over mountains',
'aspect_ratio': '16:9',
'model': 'sora-2-landscape'
}
)
data = response.json()
import requests
import base64
# Görseli base64'e çevir
with open('image.jpg', 'rb') as f:
image_data = base64.b64encode(f.read()).decode()
image_base64 = f'data:image/jpeg;base64,{image_data}'
response = requests.post(
'https://sora-api.codefast.app/generate',
headers={'X-API-Key': 'your_api_key_here'},
json={
'messages': [{
'role': 'user',
'content': [
{
'type': 'image_url',
'image_url': {'url': image_base64}
},
{
'type': 'text',
'text': 'Make this image come to life'
}
]
}],
'aspect_ratio': '16:9',
'model': 'sora-2-landscape'
}
)
data = response.json()