Sora 2 + Stable + Pro
Pick the model string that matches your quality and cost needs: sora-2, sora-2-stable, or sora-2-pro.
Keep your product stable with a provider-neutral request contract, stored outputs, and tested fallback models.
type VideoGenerationRequest = {
prompt: string;
imageUrl?: string;
aspectRatio: "16:9" | "9:16";
durationSeconds: number;
quality: "standard" | "high";
callbackUrl?: string;
};
type VideoGenerationResult = {
id: string;
status: "queued" | "running" | "succeeded" | "failed";
progress: number;
outputUrl?: string;
errorCode?: string;
};
interface VideoProvider {
create(input: VideoGenerationRequest): Promise<{ id: string }>;
retrieve(id: string): Promise<VideoGenerationResult>;
}Normalize inputs, statuses, errors, and result URLs before provider-specific code reaches your application.
Pick the model string that matches your quality and cost needs: sora-2, sora-2-stable, or sora-2-pro.
Each call costs 100 credits for 10s sora-2/sora-2-stable, 150 credits for 15s sora-2/sora-2-stable, or 150 credits for sora-2-pro, with automatic refunds when a generation fails.
Create a task, then poll the check-result endpoint to keep status and progress in sync without SSE.
Migration deadline
OpenAI plans to retire Sora 2 models and the Videos API on September 24, 2026. Validate a fallback before launch.
Send the Tikdek API request with your prompt, then store the returned taskId.
Call the check-result endpoint until the status becomes succeeded or failed.
Use the storage-backed URLs in result_url/result_urls to serve or download the generated video.
Create an API key in the console, then include it as Authorization: Bearer YOUR_API_KEY. Keys can be rotated at any time.
After calling create, store the taskId. Call /api/video-generations/check-result every 3-5 seconds until status is succeeded or failed, then use result_url/result_urls.
We automatically refund credits when a task fails and return refund_trans_no plus credits_refunded=true in the check-result payload for audit trails.
Use stable application endpoints and keep provider selection inside a replaceable adapter.