Implement computer vision solutions 3.1 Design and implement image- and video-generation solutions

You integrate Sora video generation into a web app.

Study guide skill: Implement a solution that generates videos from text prompts and reference media

Question B1-032

You integrate Sora video generation into a web app. How should the app get the generated video?

Select one answer.

  • A Call the image generation endpoint with n set to the number of frames
  • B Subscribe to a WebRTC session that renders frames in real time
  • C Call a synchronous endpoint that streams the finished MP4 in the HTTP response
  • D Create a video generation job, poll the job status until it completes, then download the video from the returned location ✓ Correct answer

Answer: D

Video generation is asynchronous: you create a job with the prompt and format settings, check its status while it runs in the background, and retrieve the finished video through a download URL. There's no synchronous MP4 response, and the image endpoint isn't used to create video frames.

Deep dive

How it works

Sora 2 creates video scenes from text instructions, input images or video. Video generation is asynchronous. You create a job request with your text prompt and video format settings, and the model processes it in the background. You check the job's status and, once it finishes, retrieve the generated video through a download URL.

In the v1 API, the operations map to that flow:

  • Create Video: start a new render job from a prompt, with optional reference inputs or a remix ID.
  • Get Video status: call GET /videos/{video_id} with the ID from the create call. The response shows the job's status, progress percentage and any errors. Expected states are queued, in_progress, completed and failed.
  • Download Video: fetch the finished MP4 once the job is completed.

Sora 2 supports three input modes: text only, image plus text (animating a still image or using it as a starting frame), and video plus text (extending or modifying existing footage). It can also remix an existing video with targeted adjustments instead of regenerating from scratch. Video generation is in preview, and the API uses preview as its version during that period.

The other options, and when you'd use them

  • Call the image generation endpoint with n set to the number of frames: Image generation models create images from text prompts and optional images. Video is a separate, job-based API.
  • Subscribe to a WebRTC session that renders frames: WebRTC is one way to connect to the GPT Realtime API, which handles low-latency "speech in, speech out" conversations. It isn't how video is generated.
  • A synchronous endpoint that streams the MP4: Generation runs as a background job. You poll its status, then download the result.

Exam tip

For Sora, remember "create, poll, download". Polling until the status is completed (or failed) is the expected pattern.

References

Last reviewed:

Ready to test yourself? The quiz asks this and every other AI-103 question, with instant feedback. Practice this in a quiz →

All Computer vision questions · AI-103 study guide

Thanks for your feedback!