Migration guide

Plan beyond Sora 2

Keep your product stable with a provider-neutral request contract, stored outputs, and tested fallback models.

A provider-neutral request shape
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>;
}

Separate your product from the model

Normalize inputs, statuses, errors, and result URLs before provider-specific code reaches your application.

Sora 2 + Stable + Pro

Pick the model string that matches your quality and cost needs: sora-2, sora-2-stable, or sora-2-pro.

Transparent billing

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.

Predictable polling

Create a task, then poll the check-result endpoint to keep status and progress in sync without SSE.

Recommended integration flow

Migration deadline

OpenAI plans to retire Sora 2 models and the Videos API on September 24, 2026. Validate a fallback before launch.

Create the task

Send the Tikdek API request with your prompt, then store the returned taskId.

Track progress

Call the check-result endpoint until the status becomes succeeded or failed.

Deliver the video

Use the storage-backed URLs in result_url/result_urls to serve or download the generated video.

Frequently asked questions

How do I authenticate my requests?

Create an API key in the console, then include it as Authorization: Bearer YOUR_API_KEY. Keys can be rotated at any time.

How should I poll for results?

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.

How are credits handled for failures?

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.

Make the next model swap routine

Use stable application endpoints and keep provider selection inside a replaceable adapter.